When creating a layer, Geoserver has the option of calculating bounding boxes from the data. I have only succeeded in doing this when I pass a Geometry type object in my SQL query. How can I define the SRS and bounding box when passing only, lon, lat, elevation, for example? Is this possible or do I have to use Geometry objects?

  • Depending on the data store GeoServer can for example send a SQL query which reads the extents from some metadata table, or fires a query that collects the aggregated extents of all geometries. It may be that in your case you must give the bounds manually. – user30184 Jun 21 '17 at 15:54

GeoServer does not recognize tables with x/y columns as being point tables, so yes, you have to build geometries.

Or, you can push for this feature to be implemented: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.