makinacorpus / django-geojson

django-geojson is a collection of helpers to (de)serialize (Geo)Django objects into GeoJSON.
GNU Lesser General Public License v3.0
259 stars 69 forks source link

Use explicit srid in get_queryset #106

Closed jeffreykog closed 4 years ago

jeffreykog commented 4 years ago

When manually defining an srid for your geometry field, Django by default queries using the manually specified srid, resulting in an empty viewport even when items are in the viewport. This is caused by a difference in srid. When constructing the bounding-box Polygon, manually specify the srid to use, so Django won't query the database with a wrong srid.

Gagaro commented 4 years ago

Thanks :+1: