[TinyOWS-users] Fids/GML:ids missing if the table has noprimary key

Olivier Courtin olivier.courtin at gmail.com
Mon May 16 05:15:27 EST 2011


On May 16, 2011, at 11:53 AM, Rahkonen Jukka wrote:

Jukka,

>> Humm when you said 'now', you mean it wasn't always the case ?
>
> This has to do with my data and not with TinyOWS. I meant "Now when I
> forgot to create PK". Before the update I did have PK.

Ok :)

>
>> 'Normal' behaviour is to expose PK, only on demand (expose_pk
>> parameter).
>> But what to expose if no PK available ?
>
> Well, Geoserver is generating some random fid in that case, like
> <gml:featureMember>
>    <topp:Vakken fid="fid-20a01e80_11c2d38a583_37bc">
>
> I could not find easily how the Geoserver fid generator works.  
> Anyway I
> do not believe those fids are stable enough for deletes or updates.
> However, they are usable for some strict WFS clients which are  
> checking
> both the existence of fid and that they are unique in the result set.
> With missing fids or double fids they can refure parsing the result  
> set.
>
> I can see that Geoserver folks were considering to utilise oids with
> PostGIS backend but I suppose that solution is not usable any more
> because oids are not compulsory.
> http://jira.codehaus.org/browse/GEOS-186
>
> This is one more pecularity with the OpenStreetMap data, osm_id is not
> necessarily unique but I must create a new serial column for PK.
> Right thing to do is naturally to have a primary key in tables.


With GML 3.2 support we will have to deal with unique (and  
persistent)  id
generation.
Maybe we could tackle this point in the same time.
Ticket created #71


> Sorry about a stupid question but I am a beginner with TinyOWS. Can I
> publish PostGIS views through TinyOWS and if yes, then where are  the
> fids taken?

Views are supported with TinyOWS.
But as PK are not present, i don't think you could publish id through  
it.

--
Olivier


More information about the TinyOWS-users mailing list