[mapserver-dev] Regression test issue: NULLs in shapefiles...

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Mon Aug 25 08:42:26 PDT 2014

Hi all: I'm trying to debug a failing CITE test (wfs_200_cite_filter_like.xml) for RFC 91 that uses PropertyIsLike. In master that resolves to "item like '%'"  for OGR and other databases. For a shapefile it resolves to "item ~ '.*'". In the test shapefile data there are a bunch of null values for the item being checked. The test in question uses the OGR driver. Here's a quick summary:


-          Using OGR driver gets expression WHERE island_e like "%" and returns 3 features, ignoring nulls

-          Using shapefile driver gets expression "[island_e]" ~ ".*" and returns all features

RFC 91:

-          Using OGR driver gets expression  "[island_e]" ~ ".*" and returns all features

-          Using shapefile driver gets expression "[island_e]" ~ ".*" and returns all features

This change is because RFC 91 translation runs through the MapServer expression syntax and the OGR driver can handle both cases. However, that's not the problem since you shouldn't see the difference in master either - a straight shapefile fails. I'm guessing that way down in the shapefile driver nulls in the DBF are handled as empty string which technically match the "0 or more character" pattern. Any ideas on how to deal with something like this? Changing the regex to ".+" makes the test pass but I don't think that's the correct solution.


StEVE LIME  | DATA & Applications MANAGER
MN.IT Services @ MnDNR
651-259-5473 (w)  |  651-297-4946 (f) |  steve.lime at state.mn.us<mailto:Your.name at state.mn.us>

[cid:image003.jpg at 01CFC051.43750460]<http://www.mn.gov/oet>

Information Technology for Minnesota Government   |   mn.gov/oet<http://www.mn.gov/oet>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20140825/909c9466/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 1611 bytes
Desc: image003.jpg
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20140825/909c9466/attachment-0001.jpg>

More information about the mapserver-dev mailing list