Tuesday 25 December 2018

Creating OGC Services via GeoServer automatically?


I am new to GeoServer and wonder how I can create OGC Services via Geoserver automatically. I have to publish my data (Shapefiles) with a Java program as OGC Services. How can I do that?


I checked out the source code of GeoServer, but I don't know how to package as right jar file to use.



Answer




If by OGC services you mean WMS and WFS then you could use GeoServers REST configuration API, which lets you create workspaces, stores, styles, upload shapefiles etc. You can see a list of operations here:


REST Configuration API Reference


GeoServer have examples of how to do this in cURL:


GeoServer cURL REST examples


I don't know much Java, but I am pretty sure you can convert the cURL examples to Java.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...