Thx Steve. It work ,
Just to do a step forward I try also to define as default a wildcard using this sintax I try settings like this: FILTER "WHERE ID_ING = '%idtpn%' " metadata 'default_idtpn' '9%' ... But the mapserver return an error. msOGRFileWhichShapes(): OGR error. SetAttributeFilter(ID_ING LIKE '9%') failed on layer rt_speleologia.idingrotte.rt. Type mismatch or improper type of arguments to LIKE operator. Reading the gdal/ogr documentation this sintax should be allowed in the OGRSQL. I use gdal 1.9.1 and it seem to support the wildcard option. So perhaps this could be a real bug of gdal. I ask to gdal ML. 2013/4/4 Lime, Steve D (MNIT) <[email protected]> > Filter should look like:**** > > ** ** > > FILTER (ID_ING = '%idtpn%' ) **** > > ** ** > > If MapServer is to execute it, or:**** > > ** ** > > FILTER "WHERE ID_ING = '%idtpn%' "**** > > ** ** > > If OGR is to execute it.**** > > ** ** > > Steve**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Andrea Peri > *Sent:* Thursday, April 04, 2013 8:26 AM > *To:* [email protected] > *Subject:* [mapserver-users] How use the filteritem with a ogr spatialite > db**** > > ** ** > > Hi, > > I'm try-ing to apply a filter to a spatialite db by ogr .**** > > I try this > > CONNECTIONTYPE OGR > CONNECTION "/.../tematici.sqlite" > DATA "select > PK_UID,ID_ING,ID_GRO,NUMERO,NOME,CODCOM,COMUNE,ANNO,DATA_AGG,SCHEDA,RILIEVO,CGBEST,CGBNORD,GEOMETRY > from SPELEOLOGIA_INGRESSI_GROTTE" > FILTER "(ID_ING = '%idtpn%' )" > FILTERITEM 'ID_ING' > VALIDATION > 'idtpn' '^[a-zA-Z0-9\-_]+$' > END > ..... > METADATA > 'default_idtpn' '901707' > .....**** > > But it don't work.**** > > There is some sample of filter usage with ogr format ?**** > > ** ** > > thx,**** > > > **** > > > -- > ----------------- > Andrea Peri > . . . . . . . . . > qwerty àèìòù > -----------------**** > -- ----------------- Andrea Peri . . . . . . . . . qwerty àèìòù -----------------
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
