Re: [mapserver-users] feature_id not found as wfs feature_id in a spatialite db

2016-07-18 Thread Andrea Peri
Hi Even,
Your workaround is work and is perfect for me.

Thx,

A.


2016-07-18 10:02 GMT+02:00 Even Rouault :
> Andrea,
>
>> I like to understand why mapserver seem don't recognize a field that
>> is primary key as feature_id field.
>
> The issue is that PK_UID is recognized by OGR as the field for the OGR
> featureid and thus not exposed as an item to MapServer. One way to workaround
> this is to make the PK_UID field available as a regular field with a SELECT
>
> For example, like this :
>
>   NAME towns
>   DATA "SELECT ROWID as msFID, * FROM towns"
>   CONNECTIONTYPE OGR
>   CONNECTION "./data/db.sqlite"
>   METADATA
> "ows_title" "towns"
> "wfs_featureid" "msFID"
> "gml_exclude_items" "msFID"
> "gml_include_items" "all"
> "gml_types" "auto"
>   END
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] feature_id not found as wfs feature_id in a spatialite db

2016-07-18 Thread Even Rouault
Andrea,

> I like to understand why mapserver seem don't recognize a field that
> is primary key as feature_id field.

The issue is that PK_UID is recognized by OGR as the field for the OGR 
featureid and thus not exposed as an item to MapServer. One way to workaround 
this is to make the PK_UID field available as a regular field with a SELECT

For example, like this :

  NAME towns
  DATA "SELECT ROWID as msFID, * FROM towns"
  CONNECTIONTYPE OGR
  CONNECTION "./data/db.sqlite"
  METADATA
"ows_title" "towns"
"wfs_featureid" "msFID"
"gml_exclude_items" "msFID"
"gml_include_items" "all"
"gml_types" "auto"
  END

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] feature_id not found as wfs feature_id in a spatialite db

2016-07-18 Thread Andrea Peri
Hi,
I have a dataset in a spatialite and try to set a wfs 2.0.0 service.

It seem work all ok but

I have this warning:



The result of thi warning is that the gml feture as numberes as this:
.1
.2
.3

Not really beautiful.
:(



This is my mapfile setting:
  "wfs_featureid" "PK_UID"

And I verify that the PK_UID field is an integer and primary key fied
in my spatialite table.

I like to understand why mapserver seem don't recognize a field that
is primary key as feature_id field.

Any hint is welcome.
Thx,

Andrea


-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users