Tag Info

Hot answers tagged

4

This is because boundedBy / bbox is a property that OpenLayers creates when parsing the GML, it is not a real feature property. So when you update, you should clone the feature and get rid of it. Some example code: // do a WFS transaction to update the geometry var properties = feature.getProperties(); // get rid of bbox which is not a real property delete ...


4

You'll need to enable Transactional in the global WFS settings in the Services section of the side menu. Be careful with the workspace-specific service settings because they don't usually do what people think they do. Those settings only come into effect when you use the virtual endpoints such as http://localhost:8080/geoserver/myworkspace/wfs, but they have ...


3

Your Insert request contains an feature that doesn't match your Schema which is expecting the Point attribute to be called the_geom. You don't get an error because you have marked that feature as Nillable (or optional). <xsd:schema xmlns:gml="http://www.opengis.net/gml" xmlns:opengeo="http://opengeo.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ...


3

You need to use WFS-T, the T standing for transactional, which is what's required to be able to write-back. Both Openlayers and GeoServer support this. This question may help on the script side - WFS-T: changes not saved on an OpenLayers map There's also a sample tutorial here: ...


3

This looks like a bug in GeoServer. GeoServer needs to identify when a schemaLocation references the GeoServer's own WFS service and does this by looking at the hostname of the URL and comparing it to a list of known hostnames it generates at start up by looking at the network interfaces. If it fails to recognize itself it will make an HTTP request to ...


2

Why are creating your own WFS implementation? Can't you just use geoserver? WFS is a complex type of service, this won't be easy. Anyway the response for WFS-GetFeature should include GML and optionally any other format you want. Geotools can provide you with the right JAVA API's to do this. Just look at the documentation of geoserver for WFS if you want ...


2

At the moment I still prefer OpenLayers2. You can find a nice tutorial here: http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html or even have a look at the "official" openlayers-example: http://dev.openlayers.org/releases/OpenLayers-2.13/examples/wfs-protocol-transactions.html ...


2

HttpServletRequest request=...; org.geotools.xml.parser.Parser parser = new Parser(new org.geotools.wfs.v1_1.WFSConfigration()); TransactionType tt = (TransactionType) parser.parse(request.getReader()); InsertElementType insert1 = (InsertElementType) tt.getInsert().get(0);


2

Have a look at my blog for a bit on WFS-T. This uses the OL 3.5 library. http://wordpress-dbauszus.rhcloud.com/?p=71


2

I don't need it everyday so I didn't reuse it recently but you can look at https://github.com/boundlessgeo/suite/tree/master/sdk/src/main/resources/client It's the place where the code for OpenLayers 3 templates in OpenGeo Suite is. One of these templates is for using WFS-T. You have to look at ol3edit and also ol3-common. You will need to analyse ...


2

GeoServer indeed tends to swap coordinates on several occasions when using WFS. I couldn't backtrack this phenomenon to its exact origin, only to this post, where it is assumed, this confusion is created by the different axis orientation of EPSG:4326, and CRS:84, which are otherwise identical projections. A possible workaround could be implemented on the ...


1

OL3.8.2 only supports WFS 1.1.0. See docs: ol.format.WFS Feature format for reading and writing data in the WFS format. By default, supports WFS version 1.1.0. You can pass a GML format as option if you want to read a WFS that contains GML2 (WFS 1.0.0). Also see ol.format.GMLBase which is used by this format.


1

Looking at the source code, the ol.format.WFS constructor can be customized to support different WFS formats (with gmlFormat, and schemaLocation), but it only affects the reading process, not its writeTransaction method. As you can see in the code below, the method is hard coded to support only WFS 1.1.0 transactions. There is a mail on the ol3 dev mailing ...


1

Any valid URI should be working, if it's not, it might be a client issue. I know we do a lot of WFS-T with URIs setup as <company's site>/<projectName> (e.g, http://my.company.com/myproject) from OpenLayers with no issues, but don't have direct experience doing it with QGis.


1

as user stuporglue already mentioned the style is not a specific wfs-t issue, but you can just have a look at a nice website with Information about the Feature-Style and Stylemaps: http://www.peterrobins.co.uk/it/olstyle.html For your Vector-/WFS-T-Layer you could use something like that: var defStyle = { fillColor: "#ff0000", strokeColor: "green", ...


1

This works: <wfs:Update typeName="av_dev:PointModel" > <wfs:Property> <wfs:ValueReference>orientation</wfs:ValueReference> <wfs:Value>2</wfs:Value> </wfs:Property> <fes:Filter> <fes:ResourceId rid="7" /> </fes:Filter> </wfs:Update> </wfs:Transaction> ...


1

I've been trying against a Geoserver / Windows server 2003 installation, and it works. Doesn't work when it's a Geoserver / Centos Installation. With Udig WFS-T updates against a Geoserver / Centos are commited. Please also refer to: QGIS WFS Error - Could not commit changes to layer


1

I've stumbled upon a very similar situation, so I'll add the information I have here with the hopes of contributing to a solution. My setup: On a Debian linux server: PostGIS 2.0/PostgreSQL 8.4 GeoServer 2.4.0 On Windows 7 x64: QGIS 2.6.0-Brighton For testing purposes I'm trying to edit (tried both insert and delete) the demo layer tiger:poi in ...



Only top voted, non community-wiki answers of a minimum length are eligible