Opened 16 months ago

Last modified 6 months ago

#22423 new New feature

Geodjango spatial functions should leverage mysql 5.6 spatial functions.

Reported by: visu Owned by: visu
Component: GIS Version: master
Severity: Normal Keywords: gis, mysql,
Cc: visumrs@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Hi,

Starting from 5.6 version, mysql implemented spatial functions properly.
(ie, similar to postgis, mysql also supports ST_Contains, ST_Within and other ST_ queries.)
http://dev.mysql.com/doc/refman/5.6/en/functions-for-testing-spatial-relations-between-geometric-objects.html#function_st-contains

Geodjango currently implements polycontains and other queries for mysql as "MBRContains" instead of "Contains"
https://docs.djangoproject.com/en/dev/ref/contrib/gis/geoquerysets/#std:fieldlookup-gis-contains

This needs to be fixed.
related Ticket :

https://code.djangoproject.com/ticket/13430

Change History (6)

comment:1 Changed 16 months ago by claudep

  • Component changed from Uncategorized to GIS
  • Has patch unset
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.6 to master

comment:2 Changed 16 months ago by visu

  • Has patch set
  • Needs documentation set

Hi,

I sent a pull request. Please review and let me know.
I attached a unit test in the pull request as well.

https://github.com/django/django/pull/2574

thanks,
Visu M

comment:3 Changed 10 months ago by timgraham

  • Needs documentation unset
  • Patch needs improvement set

I left comments for improvement on the PR. Please uncheck "Patch needs improvement" when you update it, thanks.

comment:4 Changed 6 months ago by claudep

  • Patch needs improvement unset

https://github.com/django/django/pull/3941, MySQL 5.6.1+ testers welcome.

comment:5 Changed 6 months ago by claudep

See the pull request for the remaining failure with test_disjoint_lookup.

comment:6 Changed 6 months ago by timgraham

  • Patch needs improvement set
Note: See TracTickets for help on using tickets.
Back to Top