New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for geojson boundingboxes. auto-generated or using a seperate field on the model #57
Conversation
|
…eperate field on the model
336db4b
to
294357b
Compare
hi @nmandery, the patch looks very good, but I'll need some time to test it. It'd be great to hear the opinions of other contributors too! @dmeehan @erictheise @JesseCrocker @Shanto |
Hi @nemesisdesign, sure thing. Take your time reviewing the patch. |
This looks like a great feature to add. I've got a couple projects where I would use this. 👍for including the bbox_geo_field option. |
Thank you very much @nmandery, will release 0.9 in a few days. |
Thank you for merging. I just switched to the development version in my projects and everything is doing fine. |
@nmandery released now, sorry for the delay |
@nemesisdesign Thanks again |
This pull request adds support for bounding boxes as specified in the GeoJSON specification at http://geojson.org/geojson-spec.html#bounding-boxes.
The patch implements tow ways how boundingboxes can be specifed, see the following extract of the README documentation:
The GeoJSON specification allows a feature to contain a boundingbox of a feature. GeoFeatureModelSerializer allows two different ways to fill this property. The first is using the
geo_field
to calculate the bounding box of a feature. This only allows read access for a REST client and can be achieved usingauto_bbox
. Example:The second approach uses the
bbox_geo_field
to specify an addional GeometryField of the model which will be used to calculate the bounding box. This allows boundingboxes differ from the exact extent of a features geometry. Additionally this enables read and write access for the REST client. Bounding boxes send from the client will be saved as Polygons. Example: