Opened 2 years ago

Last modified 11 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 (8)

comment:1 Changed 2 years ago by Claude Paroz

Component: UncategorizedGIS
Has patch: unset
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted
Version: 1.6master

comment:2 Changed 2 years 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 2 years ago by Tim Graham

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 21 months ago by Claude Paroz

Patch needs improvement: unset

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

comment:5 Changed 21 months ago by Claude Paroz

See the pull request for the remaining failure with test_disjoint_lookup.

comment:6 Changed 20 months ago by Tim Graham

Patch needs improvement: set

comment:7 Changed 11 months ago by Claude Paroz

#25659 was a duplcate with a patch.

comment:8 Changed 11 months ago by Claude Paroz

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

Note: See TracTickets for help on using tickets.
Back to Top