4

I am trying to set up a system that will post feature objects periodically to a PostGIS db and display them via GeoServer and OpenLayers on a web site. Is it possible to add the new feature objects to the db via GeoServer using the REST API or geoserver-manager (my system is Java based) or will I have to add the features directly into the PostGIS db?

6
  • could you use wfs-t?
    – Ian Turton
    Commented May 28, 2013 at 9:12
  • Thank you, that must be it. I guess I would blame my inability to find the answer in the docs on me being a complete newb at GIS and GeoServer. The multitude of new words...
    – Henrik
    Commented May 28, 2013 at 14:50
  • While waiting for a response to this question I created code that inserts my features into the db directly using postgresql jdbc. Which is the preferred way of doing this among all you GIS gurus, the jdbc or wfs-t way?
    – Henrik
    Commented May 28, 2013 at 15:16
  • it would depend on where your data is coming from
    – Ian Turton
    Commented May 28, 2013 at 15:18
  • By the way iant, if you answer my question "officially" I'll get you the cred that you deserve.
    – Henrik
    Commented May 28, 2013 at 15:19

1 Answer 1

2

If you are adding the data from a client then you should probably use WFS-T - GeoServer will then "know" to update any cached tiles that include the layer. However if you are collecting the data from (or via) a process on the server then doing a direct write to the database will be more efficient (saves the change to GML and back). You might find GeoTools helpful for talking to PostGIS databases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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