Home > geoserver > Allow GeoServer WFS request by featureID

Allow GeoServer WFS request by featureID

April 6Hits:8

I'm not able to use the featureID parameter in a WFS URL request for my dataset on GeoServer.



The above URL returns ONE feature because i have appended the &featureID=tasmania_roads.2

The featureID paramter works great with the topp:tasmania_roads dataset on the demo.opengeo.org geoserver and on my geoserver as well.

Howerver, It does NOT work on the layer I have published. And I cannot see any differences. My geoserver is internal so I regret that I cannot provide a URL. But this is how i'm constructing my URL (same way I did for tasmania_roads):

From the GetCapabilities:

... <FeatureType xmlns:catalog="http://mydomain.com/catalog">   <Name>catalog:myData</Name>   <Title>myData</Title> ... 

From the GetFeature:

... <gml:featureMembers>   <catalog:myData gml:id="myData.fid--57bd457b_134ae684781_8989">     <catalog:id>190004</catalog:id>     <catalog:type>SICD</catalog:type> ... 

So based on the above information my url should be:


But I get ZERO results.

I tried URLencoding, republishing and different namespace/feature type naming configurations, with no luck.

I'm thinking there must be a setting on GeoServer when publishing the dataset that I'm overlooking?


Your feature ID looks suspiciously random as in randomly generated by Geoserver. The reason for that is that Geoserver (GeoTools actually) cannot pick a unique identifier from the datastore.

This document, though vague, explains what GeoTools consider a fid:


Solution: if you are using postgis define a Primary Key (though I have not tried, you could get the same result with a unique index) on the table and recreate the layer.

On shapefiles this should not be necessary because GeoServer will use the position of the feature in the shapefile.

Tags:geoserver, wfs

Related Articles

  • Allow GeoServer WFS request by featureIDApril 6

    I'm not able to use the featureID parameter in a WFS URL request for my dataset on GeoServer. Example: http://demo.opengeo.org/geoserver/wfs?version=1.1.0&service=wfs&request=GetFeature&typeName=topp:tasmania_roads&maxFeatures=10&featu

  • GeoServer WFS Request

    GeoServer WFS RequestDecember 3

    I have configured WFS request on Geoserver. i am getting following error "Failed to load attribute list, internal error is: null" after configuration. After Configuration Following Error message displaying.

  • QGIS does not update data in Geoserver WFS-TNovember 14

    I am trying to edit a WFS from geoserver (using PostGIS data) within QGIS. This is the request as recorded by Fiddler <Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version=&quo

  • Geoserver WFS-T insert no response. bug?December 1

    I use Geoserver + Openlayers and want to add and save some new Points via WFS-T. I created insert transaction (correct) and sent it, but no response (include errors) was returned. In console was only: 01 dec 17:34:16 INFO [geoserver.wfs] - Request: g

  • Geoserver WFS-T "Feature type 'Workspace:Layer' is not available" Error on update / deleteDecember 1

    I am using the following code for insert / update (changed from this source: http://wordpress-dbauszus.rhcloud.com/?p=71): var formatWFS = new ol.format.WFS(); // GML Format zur Interaktion mit WFS var formatGML = new ol.format.GML({ featureNS: 'http

  • Openlayers: authenticate users to send any wfs requests to geoserverJune 5

    I can see that this question is asked before but not answered properly. I'm trying to authenticate with geoserver before trying to send any wfs requests. I need to use the geoserver users. I already tried this and the login was succesfull but i can't

  • GeoServer 2.4.1: How to use JSONP in a WFS request?November 6

    I've ready that I can enable JSONP by setting ENABLE_JSONP in web.xml: <context-param> <param-name>ENABLE_JSONP</param-name> <param-value>true</param-value> </context-param> And I've read you can set outputFormat=json&a

  • How to make a wfs request to Geoserver with Openlayers 3November 17

    This is OpenLayers 2 code I'm upgrading to Openlayers 3. A set of filters (for example fromDate and toDate to for query) are created and inserted. How can i do this in OpenLayers 3? I have a set of parameters which the user changes before the query.

  • WFS request works in Geoserver but server returns errorOctober 15

    I'm trying to send a WFS request to my Geoserver but there is something wrong. Here's what I get when I select the JSONP:

  • Obtaining feature using ArcGIS for Server and WFS based on featureid?September 4

    This has baffled me for hours, I've tried nearly every combination of request parameters without success. I have a points coverage published in arcgis and can download the feature GML via WFS for the entire layer using the following request (sorry th

  • Accessing GeoServer WFS services in ArcGIS Online map viewer?September 9

    Has anyone was able to add GeoServer WFS service into ArcGIS Online map viewer? By this I mean having an ArcGIS Online account (either free or for Organizations), logging in and adding layers from the web. I have no problems adding a WMS service such

  • Drupal-Geoserver WFS error September 24

    I am having trouble getting a WFS layer working using Geoserver, OpenLayers and GeoExt. I get the following error: XMLHttpRequest cannot load Origin is not allowed by Access-Control-Allow-Origin

  • Releasing GeoServer WFS-T Feature LockMay 24

    For some reason I'm having trouble finding any documentation about releasing feature locks in a GeoServer WFS (or any WFS for that matter). I can easily request a FeatureLock with a request like this http://localhost:8080/geoserver/wfs?service=WFS&ve

  • WFS Request Layer (GML) with FilterMay 28

    Is there a solution to request the GML layer from Geoserver with filter like using bbox: http://localhost:8080/geoserver/tiger/ows?service=WFS&version=1.0.0 &request=GetFeature&typeName=tiger:poi&maxFeatures=50& bbox=-74.0104611,40.707

  • Send XML WFS Request via PHPJune 20

    I'm trying to build a web mapping app that retrieves data from our WFS server. I'd like to avoid JavaScript for the main search scripts. From what's I've read the best way to send the XML POST request to the server is to use CURL. I have tested the f

  • Passing selected polygon to INTERSECTS filter in a WFS requestJuly 16

    In the code below, <ogc:Filter> <ogc:Intersects> <ogc:PropertyName>the_geom</ogc:PropertyName> <ogc:Function name="querySingle"> <ogc:Literal>sf:restricted</ogc:Literal> <ogc:Literal>the_geom</o

  • WFS request with Openlayers; blank requestJune 28

    I'm having trouble to add a WFS layer over an OSM map. At first I thought that my data had a problem, and I thus decided to adapt one of the example on the Openlayers website. I have no error returned, but the layer is not appearing... Instead, I see

  • Geoserver WFS get feature doesn't work - "SyntaxError: missing ; before statement"

    Geoserver WFS get feature doesn't work - "SyntaxError: missing ; before statement"December 3

    I'm trying to use geoserver WFS json for creating vector layer (instead of using WMS) because this is a layer I redraw every 20 seconds. This is the code I use : function getJSON() { var geoJsonUrl = "http://localhost:8080/geoserver/test/ows?service=

  • What's the correct link for adding GeoServer WFS to ArcMap?

    What's the correct link for adding GeoServer WFS to ArcMap?January 27

    What is the correct URL to enter in ArcCatalog WFS Parameters when adding a WFS layer from GeoServer into ArcMap? Here's a link to our Get Capabilities document: https://weaveprod.ucdp.utah.edu/geoserver/ows?service=wfs&version=1.0.0&request=GetCa

  • Geoserver WFS POST and format_options=PRJFILEFORMATMay 9

    I'm using geoserver (2.4.4) to provide users with shapefile downloads. Some of the software the shapefiles are going to be used in requires .prj-files that follows the "ESRI-standard". A bit of searching lead me to a Geoserver ticket (GEOS-4503)

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.487 s.