You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think a runtime error is applicable when the geoJSON returned is technically valid. Can we find a better way of handling this case?
The text was updated successfully, but these errors were encountered:
esonica
changed the title
"crs is null" runtime error when handling a valid empty GeoServer request
"crs is null" runtime error when handling a valid empty GeoServer response
Oct 17, 2016
We could probably special-case an empty feature collection and ignore a crs value of null in this case. But empty data is the only possible use case where a crs of null "makes sense" (though why you would include it at all, I have no idea.). Do you have any other suggestions on how null crs should be handled?
When querying a geoserver that returns an empty collection, the following valid JSON is returned:
{"type":"FeatureCollection","totalFeatures":0,"features":[],"crs":null}
As per the GeoJSON Spec, the CRS value can be a JSON null as valid response :
http://geojson.org/geojson-spec.html#coordinate-reference-system-objects
Currently the Cesium.GeoJsonDataSource.load() function does not handle a null CRS value gracefully, throwing a runtime error.
https://github.com/AnalyticalGraphicsInc/cesium/blob/5a4b5ead78bcb6671f7a55a0cb0847d01e95383c/Source/DataSources/GeoJsonDataSource.js#L873
I don't think a runtime error is applicable when the geoJSON returned is technically valid. Can we find a better way of handling this case?
The text was updated successfully, but these errors were encountered: