Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Empty response is returned for GeoJSON when no features #5208
When using GeoJSON as output format with the OGR GeoJSON driver, an empty response (
For GML an empty feature collection is returned, I would expect the same for GeoJSON. GeoServer does it this way and OpenLayers 3 also expects an empty feature collection.
According to the GeoJSON spec, a valid GeoJSON is a JSON document containing at least a geometry, a feature or an empty feature collection:
So according to the spec the minimal valid result for an empty response should be:
I'll let you decide if it's an OGR bug or a MapServer bug.
Here's a test mapfile with the test URL to reproduce the issue: