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 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
This needs to be fixed.
related Ticket :
https://code.djangoproject.com/ticket/13430
--
Ticket URL: <https://code.djangoproject.com/ticket/22423>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* component: Uncategorized => GIS
* needs_tests: => 0
* version: 1.6 => master
* needs_docs: => 0
* has_patch: 1 => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:1>
* needs_docs: 0 => 1
* has_patch: 0 => 1
Comment:
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
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:2>
* needs_docs: 1 => 0
* needs_better_patch: 0 => 1
Comment:
I left comments for improvement on the PR. Please uncheck "Patch needs
improvement" when you update it, thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:3>
* needs_better_patch: 1 => 0
Comment:
https://github.com/django/django/pull/3941, MySQL 5.6.1+ testers welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:4>
Comment (by claudep):
See the pull request for the remaining failure with
`test_disjoint_lookup`.
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:5>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:6>
Comment (by claudep):
#25659 was a duplcate with a [https://github.com/django/django/pull/5532
patch].
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:7>
Comment (by claudep):
The patch from #25659 has been committed, as it was orthogonal to this
ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:8>
Comment (by Claude Paroz):
This [https://github.com/django/django/pull/10876 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?
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:9>
Comment (by Tim Graham):
It would be fine with me.
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:10>
* needs_better_patch: 1 => 0
Comment:
[https://github.com/django/django/pull/10877 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:11>
* stage: Accepted => Ready for checkin
Old 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 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
>
> This needs to be fixed.
> related Ticket :
>
> https://code.djangoproject.com/ticket/13430
New description:
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
--
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:12>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"15715bf2a2303b8f24edefc6c517cad7294edbe9" 15715bf2]:
{{{
#!CommitTicketReference repository=""
revision="15715bf2a2303b8f24edefc6c517cad7294edbe9"
Fixed #22423 -- Added support for MySQL operators on real geometries.
Thanks Viswanathan Mahalingam for the report and initial patch, and
Nicke Pope and Tim Graham for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:13>
Comment (by GitHub <noreply@…>):
In [changeset:"5becb36a79a0c31c7cc9e76237239ebd0fdda18d" 5becb36a]:
{{{
#!CommitTicketReference repository=""
revision="5becb36a79a0c31c7cc9e76237239ebd0fdda18d"
Refs #22423 -- Corrected crosses lookup support on MySQL in documentation.
Support was added in 15715bf.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:14>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"76e159e2c3059f04f3a56e79e8a27297b264b33c" 76e159e2]:
{{{
#!CommitTicketReference repository=""
revision="76e159e2c3059f04f3a56e79e8a27297b264b33c"
[3.0.x] Refs #22423 -- Corrected crosses lookup support on MySQL in
documentation.
Support was added in 15715bf.
Backport of 5becb36a79a0c31c7cc9e76237239ebd0fdda18d from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22423#comment:15>