MapServer / MapServer-import

3 stars 2 forks source link

PropertyIsLike, item not found while it is in the data #1393

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: BEN@syncera-itsolutions.nl Date: 2005/06/23 - 13:45

Shapefile is MULTIPOINT.

When issuing a GetFeature with PropertyIsEqualTo I get back a gml:null type of
result (see below), while the query should actually return features. If I use a
different value (eg 2353KK) I do get back the right values, so configuration
must be okay.

It doesn't make any difference if I use a Mapserver native shapefile connection
or an OGR connection.

Ogrinfo does return the features:
C:\Programs\FWTools0.9.8>ogrinfo D:\ms4w\apps\stragisweb\htdocs\sites\mdwh\data\
basis\geo\Adrloc_point.shp Adrloc_point -where PSTK="2353JB"

INFO: Open of
`D:\ms4w\apps\stragisweb\htdocs\sites\mdwh\data\basis\geo\Adrloc_point.shp'
using driver `ESRI Shapefile' successful.

Layer name: Adrloc_point
Geometry: Multi Point
Feature Count: 19
Extent: (95355.000000, 460768.000000) - (98485.000000, 466231.000000)
Layer SRS WKT:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["Amersfoort",
            SPHEROID["Bessel - 1841",6377397.155,299.152812825426]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Stereographic"],
    PARAMETER["latitude_of_origin",52.156160556],
    PARAMETER["central_meridian",5.387638889],
    PARAMETER["scale_factor",0.9999079],
    PARAMETER["false_easting",155000],
    PARAMETER["false_northing",463000],
    UNIT["METER",1]]
PSTK: String (6.0)
STRAAT_OFF: String (43.0)
STRAATNAAM: String (17.0)
STRAAT_NEN: String (24.0)
HUISNUMMER: Integer (5.0)
TOEVOEGING: String (6.0)
WOONPLAATS: String (18.0)
PLAATS_NEN: String (24.0)
GEMEENTE: String (24.0)
BVLK_ID: String (11.0)
X: Integer (6.0)
Y: Integer (6.0)
KWALITEIT: String (1.0)
OGRFeature(Adrloc_point):2122
  PSTK (String) = 2353JB
  STRAAT_OFF (String) = Dotterbloemkreek
  STRAATNAAM (String) = DOTTERBLOEMKREEK
  STRAAT_NEN (String) = Dotterbloemkreek
  HUISNUMMER (Integer) = 53
  TOEVOEGING (String) = (null)
  WOONPLAATS (String) = LEIDERDORP
  PLAATS_NEN (String) = LEIDERDORP
  GEMEENTE (String) = LEIDERDORP
  BVLK_ID (String) = 30FZ2002077
  X (Integer) = 97223
  Y (Integer) = 464223
  KWALITEIT (String) = 1
  MULTIPOINT (97223 464223)

..

WFS Request used:
<GetFeature service="WFS" version="1.0.0" xmlns="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0 WFS-basic.xsd"><Query
typeName="acn"><ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>PSTK</ogc:PropertyName><ogc:Literal>2353JB</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></Query></GetFeature>

LAYER definition used:

LAYER
  DEBUG ON
  NAME "acn"
  METADATA
    wms_title "Acn"
    wfs_title "Acn"
    gml_include_items "all"
  END
  DUMP TRUE
  STATUS ON
  TYPE POINT
  DATA "basis/geo/Adrloc_point"
  MAXSCALE 501
  PROJECTION
    "init=epsg:28992"
  END
  TOLERANCE 12
  TOLERANCEUNITS METERS
  LABELITEM "STRAATNAAM"
  CLASS
    COLOR 153 0 153
    OUTLINECOLOR 153 0 153
    SYMBOL "circle"
    SIZE 5
    TEXT ([STRAATNAAM][HUISNUMMER])
    LABEL
      TYPE truetype
      FONT "arial"
      POSITION AUTO
      SIZE 8
      COLOR 153 0 153
    END
  END
END

I will attach the shapefile. No errors or debug info.

WFS response:
D:\sources\python>mapserver_getfeature.py
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
   xmlns:stragisweb="http://www.syncera.net/stragisweb"
   xmlns:wfs="http://www.opengis.net/wfs"
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.cubewerx.com/sc
hemas//wfs/1.0.0/WFS-basic.xsd
                       http://www.syncera.net/stragisweb http://localhost:8080/s
tragisweb/cgi-bin/mapserv.exe?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=Describe
FeatureType&amp;TYPENAME=acn&amp;OUTPUTFORMAT=XMLSCHEMA">
   <gml:boundedBy>
      <gml:null>missing</gml:null>
   </gml:boundedBy>
</wfs:FeatureCollection>
tbonfort commented 12 years ago

Author: assefa Date: 2005/06/27 - 16:50

looking into this
tbonfort commented 12 years ago

Author: assefa Date: 2005/06/27 - 17:07

First test I did after setting app the wfs server was trying to do a get 
request using this url :
http://127.0.0.1/cgi-bin/mapserv.exe?
map=d:/msapps/tmp/Bug1393/test.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature
&TYPENAME=acn&FILTER=<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>PSTK<
/ogc:PropertyName><ogc:Literal>2353JB</ogc:Literal></ogc:PropertyIsEqualTo></og
c:Filter>&

 It retunrs 19 features to this request. The layer is setup exactly as 
described in the bug. I used the following extents for the map EXTENT 
95355.000000 460768.000000  98485.000000 466231.000000. 

 I am currently using mapserver cvs on windows.

 Bart : few questions before I continue the tests :
  - Is a get request as I did work for you ?
  - what version of mapserver are you using ans OS ?
  - Should I setup a client wfs client layer to do the tests ? 
tbonfort commented 12 years ago

Author: BEN@syncera-itsolutions.nl Date: 2005/06/27 - 17:16

Hi Assefa,

I just tried this:
http://localhost:8080/stragisweb/cgi-bin/mapserv.exe?map=/ms4w/apps/stragisweb/htdocs/sites/mdwh/map/stragisweb.map&&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=acn&FILTER=%3Cogc:Filter%3E%3Cogc:PropertyIsEqualTo%3E%3Cogc:PropertyName%3EPSTK%3C/ogc:PropertyName%3E%3Cogc:Literal%3E2353JB%3C/ogc:Literal%3E%3C/ogc:PropertyIsEqualTo%3E%3C/ogc:Filter%3E&

Getting back:
<wfs:FeatureCollection xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.cubewerx.com/schemas//wfs/1.0.0/WFS-basic.xsd                   
     http://www.syncera.net/stragisweb
http://localhost:8080/stragisweb/cgi-bin/mapserv.exe?map=/ms4w/apps/stragisweb/htdocs/sites/mdwh/map/stragisweb.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=acn&OUTPUTFORMAT=XMLSCHEMA">
-
    <gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>

So does not work for me.

Mapserv -v on Windows 2000 returns:

D:\ms4w\apps\stragisweb\htdocs\cgi-bin>mapserv -v
MapServer version 4.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
 OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPO
RTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT
=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

These are 4.6.0 binaries from maptools.org

Can you send me your binaries?

Bart
tbonfort commented 12 years ago

Author: BEN@syncera-itsolutions.nl Date: 2005/06/27 - 17:18

Okay, actually it is the EXTENT.

If I use your EXTENT values it does work Assefa.

Why is the EXTENT influencing the WFS GetFeature results?
tbonfort commented 12 years ago

Author: BEN@syncera-itsolutions.nl Date: 2005/06/27 - 17:24

Okay, I get it Assefa. My EXTENT was not large enough to cover the whole area of
the SHAPEFILE.

Let's close this bug and forget about my stupid mistake :-).

1394 is still an issue though. Can you look into that one?
tbonfort commented 12 years ago

Author: assefa Date: 2005/06/27 - 17:40

ok checking the extents.

 I was preparing the binaries and did not see your last note. Will get back to 
you soon. I will also check the 1394.