openwisp / django-rest-framework-gis

Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.
http://openwisp.org
MIT License
1.08k stars 199 forks source link

Should probably by 'intersects' rather than 'bboverlaps' #157

Open joshuamaxwell opened 6 years ago

joshuamaxwell commented 6 years ago

https://github.com/djangonauts/django-rest-framework-gis/blob/8febe79fb8291f20b8f6e9c53ac8db8a24ceb26e/rest_framework_gis/filters.py#L65

The bboverlaps comparison will only return geometries whose boundaries cross over the bbox but it WILL NOT return any geometries that are wholly contained within the bbox (at least not for mySQL/mariaDB)

nemesifier commented 6 years ago

Changing the behaviour may lead to unwanted behaviour in applications that depend on this library.

Maybe the best path is to document this properly and add also the possibility to use the other filter.

nemesifier commented 4 years ago

@joshuamaxwell do you have any suggestion regarding this?