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?
-
could you use wfs-t?– Ian TurtonCommented 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...– HenrikCommented 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?– HenrikCommented May 28, 2013 at 15:16
-
it would depend on where your data is coming from– Ian TurtonCommented 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.– HenrikCommented May 28, 2013 at 15:19
|
Show 1 more comment
1 Answer
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.