Opened 11 years ago

Last modified 5 years ago

#22423 closed New feature

Geodjango spatial functions should leverage mysql 5.6 spatial functions. — at Version 12

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

Description (last modified by Tim Graham)

MySQL 5.6 and later implements spatial functions properly. (i.e., 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 poly__contains and other queries for mysql as "MBRContains" instead of "Contains"
https://docs.djangoproject.com/en/dev/ref/contrib/gis/geoquerysets/#std:fieldlookup-gis-contains

related Ticket: #13430

Change History (12)

comment:1 by Claude Paroz, 11 years ago

Component: UncategorizedGIS
Has patch: unset
Triage Stage: UnreviewedAccepted
Version: 1.6master

comment:2 by visu, 11 years ago

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 by Tim Graham, 10 years ago

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 by Claude Paroz, 10 years ago

Patch needs improvement: unset

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

comment:5 by Claude Paroz, 10 years ago

See the pull request for the remaining failure with test_disjoint_lookup.

comment:6 by Tim Graham, 10 years ago

Patch needs improvement: set

comment:7 by Claude Paroz, 9 years ago

#25659 was a duplcate with a patch.

comment:8 by Claude Paroz, 9 years ago

The patch from #25659 has been committed, as it was orthogonal to this ticket.

comment:9 by Claude Paroz, 6 years ago

This PR shows that MySQL is still failing with GeoLookupTest.test_disjoint_lookup, while MariaDB runs it fine. It's a bit sad that the entire patch is blocked just because of the MySQL disjoint issue. Any idea on the way to go forward?

Would it be acceptable to mark the text as expected failure on MySQL?

comment:10 by Tim Graham, 6 years ago

It would be fine with me.

comment:11 by Claude Paroz, 6 years ago

Patch needs improvement: unset

comment:12 by Tim Graham, 6 years ago

Description: modified (diff)
Triage Stage: AcceptedReady for checkin
Note: See TracTickets for help on using tickets.
Back to Top