[GIS] PHP script for publishing a layer

geoserverpostgis

I want to publish a layer automatically in geoserver. Each layer is a database table in postgis db. I can see the table in geoserver store(already contains some layer tables of that particular db) as soon as I create it in postgis but publishing it should be done manually. Can I find any php script for just publishing the layer….

Does "Adding a postgis table" section in http://docs.geoserver.org/2.0.x/en/user/extensions/rest/rest-config-examples-curl.html also publishes the layer????

Best Answer

This re-publishes a Layer when the user adds (or deletes) a polygon - it is using WFS-T to add the data to the database from the browser.

Protocol Transactions can be found here:

http://openlayers.org/dev/examples/wfs-protocol-transactions.js

enter image description here

http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html