planetfederal / geoserver-exts

Other
31 stars 40 forks source link

GSR should ignore layers that fail #45

Closed ScottEvil closed 10 years ago

ScottEvil commented 10 years ago

GeoServer supports geometry collections (multiple geometry types in one layer) but the ESRI specification does not. GSR should ignore these layers instead of throwing an error.

smesdaghi commented 10 years ago

It would be great if we can catch any exceptions when gsr is trying to process a layer and simply skip the layer (while still reflecting the exceptions in the logs). This will make gsr much less fragile and at least let users move forward with layers that do work instead of not being able to use the response from gsr.

dwins commented 10 years ago

What exceptions are you getting?

smesdaghi commented 10 years ago

A layer with a geometry of type GeometryCollections gives this error: { "code": 500, "message": "Requested operation is not implemented", "details": [ [ "No GeoServices Geometry equivalent known for class com.vividsolutions.jts.geom.GeometryCollection" ] ] }

LineString not supported: java.lang.IllegalStateException: Geometry encoding not yet supported for LineString at org.opengeo.gsr.core.geometry.GeometryEncoder.toJson(GeometryEncoder.java:123)

if something is not supported, it would be to still get a proper json response with the 'unsupported' layer simply skipped. As for other exceptions, consider other problems you had fixed in the past that resulted in partial json response. In addition to catching unsupported geometry type(s) it would be great for other problems to simply result in a skipped layer closer to how wms can be set to skip misconfigured layers.