Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
could you use wfs-t? – iant May 28 '13 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 May 28 '13 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 May 28 '13 at 15:16
it would depend on where your data is coming from – iant May 28 '13 at 15:18
By the way iant, if you answer my question "officially" I'll get you the cred that you deserve. – Henrik May 28 '13 at 15:19
up vote 2 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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