After sending a transactionrequest to a 1.6.1 GeoServer (default
installation), I get a response like this:
<InsertResult>
<ogc:FeatureId fid="new0"/>
<ogc:FeatureId fid="new1"/>
</InsertResult>
Why the bogus fid? How do I get the valid fid?
Thanks for any insight.
(Here's one Insert element in the request:
<wfs:Insert">
<tiger:tiger_roads xmlns:tiger="http://www.census.gov">
<tiger:the_geom>
<gml:MultiLineString
xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
<gml:lineStringMember>
<gml:LineString>
<gml:coordinates>-74.000069,40.735937
-73.999099,40.735868</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</tiger:the_geom>
<CFCC>Z99</CFCC>
<NAME>East</NAME>
</tiger:tiger_roads>
</wfs:Insert>
)
After sending a transactionrequest to a 1.6.1 GeoServer (default
installation), I get a response like this:
<InsertResult>
<ogc:FeatureId fid="new0"/>
<ogc:FeatureId fid="new1"/>
</InsertResult>
Why the bogus fid? How do I get the valid fid?
Hum, bogus fids are usually generated when the backing datastore
does not have a good way to compute one... which datastore
are you using?
Should work fine with JDBC based datastores on tables
that do have a serial type primary key.
CB ha scritto:
> Hello,
>
> After sending a transactionrequest to a 1.6.1 GeoServer (default
> installation), I get a response like this:
> <InsertResult>
> <ogc:FeatureId fid="new0"/>
> <ogc:FeatureId fid="new1"/>
> </InsertResult>
>
> Why the bogus fid? How do I get the valid fid?
Hum, bogus fids are usually generated when the backing datastore
does not have a good way to compute one... which datastore
are you using?
Should work fine with JDBC based datastores on tables
that do have a serial type primary key.
No idea what the datastore is -- I installed GeoServer with, as far as
I know, all the default settings.
The table is one of the samples installed with GeoServer -- tiger_roads.
Sounds like we need a different datastore.
Thanks for the reply.
Yeah, that layer is actually just a shapefile, which does not do ID's with transactions properly. You should be able to load it into a PostGIS database, define a primary key, and then readd the layer to GeoServer. Then you will see better results.
-Justin
CB wrote:
CB ha scritto:
Hello,
After sending a transactionrequest to a 1.6.1 GeoServer (default
installation), I get a response like this:
<InsertResult>
<ogc:FeatureId fid="new0"/>
<ogc:FeatureId fid="new1"/>
</InsertResult>
Why the bogus fid? How do I get the valid fid?
Hum, bogus fids are usually generated when the backing datastore
does not have a good way to compute one... which datastore
are you using?
Should work fine with JDBC based datastores on tables
that do have a serial type primary key.
No idea what the datastore is -- I installed GeoServer with, as far as
I know, all the default settings.
The table is one of the samples installed with GeoServer -- tiger_roads.
Sounds like we need a different datastore.
Thanks for the reply.
I could be wrong (someone with better knowledge of the shapefile code will know for sure), but unfortunately not. This only works properly with a relational database.
GeoUser wrote:
is it even possible to get a proper feature id after the insert operation
when using shapefiles?
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
Ok, thanks anyway. I used the PostGIS instead. Works great
Justin Deoliveira-4 wrote:
I could be wrong (someone with better knowledge of the shapefile code
will know for sure), but unfortunately not. This only works properly
with a relational database.
GeoUser wrote:
is it even possible to get a proper feature id after the insert operation
when using shapefiles?
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users