Reputation: 41
I'm using GeoDjango to find all points within a Polygon but it seems to be using the Boundaries (NMW,NME,SME,SMW) to find points. So it brings back results that are outside of the primary shape.
polygon = Polygon((18.3825363358424 -33.97219070578159,...))
Order.objects.filter(location__within=polygon)
I would like the query to bring points inside the shape and not inside its bounds.
i.e if * was my shape; I'm getting points in # that seems to suggest that it's querying on the bounds instead of the actual shape.
**************
**************
******########
******########
******########
Please tell if I'm doing some wrong?
Upvotes: 1
Views: 433
Reputation: 41
Ok looks like this is a MySQL Limitations
https://docs.djangoproject.com/en/2.2/ref/contrib/gis/db-api/#mysql-spatial-limitations
In other words, while spatial lookups such as contains are available in GeoDjango when using MySQL, the results returned are really equivalent to what would be returned when using bbcontains on a different spatial backend.
:( any other way of solving this problem
Upvotes: 1