[GIS] Adding GML files in GeoServer

geoservergmlwfs

How can I add GML files to a GeoServer 2.2.2 instance?

How can I edit them "on the fly" and save the results back to the server using OpenLayers?

I'm adding a vector layer. in which we want to use gml. we want to add feature like point ,line etc. to gml. when we do editing on line that features will be saved on this layer.
i want to insert that feature using openlayers on line like in wfs layer we do using transanction.
similar type i want to do using gml ….

Best Answer

As noted in the comments, XML (and thus GML) is not best used to store data, you would be far better using a spatial database to store your data.

Let's assume you have your data in such a spatial database, and have connected to this data source using GeoServer. If you set up a Web Map Service (WMS), then one of the output formats for the GetFeatureInfo requests is GML. Similarly you can set up a simple feature Web Feature Service (WFS), that provides GML as the (or one of the ~ depending on WFS version used) output formats. That's all standard functionality without the need to install any extension.

If you want to output a complex feature WFS (to conform to a particular application schema of GML), then there is also the `app schema' extension; but again the data itself is stored in a database.

WMS and WFS services are able to be consumed by an OpenLayers client application.