clickbar / laravel-magellan

A modern PostGIS toolbox for Laravel
MIT License
193 stars 11 forks source link

Box2D & Box3D aren't json serializable #36

Open ahawlitschek opened 1 year ago

ahawlitschek commented 1 year ago

Since Geojson has no geometry type for box, we had not implemented the interface providing the necessary code to serialize it. @saibotk I would suggest we add a custom serialization besides the JsonGenerator that returns all 4 floats as array (as accepted by most of the frontend map libraries)

saibotk commented 1 year ago

Sounds good,

But we may also want to look into https://datatracker.ietf.org/doc/html/rfc7946#section-5 and see if there are any available usecases for also supporting bbox properties on GeoJson in Magellan.