Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm using ArcGIS 9.3.1 to host WMS and WFS services.

I have a map (.mxd file) with a layer whose attribute table includes fields with mixed-case string data. When I open this map in ArcMap and perform a Find (Edit -> Find), selecting the appropriate layer and field, I get all matching results back, no matter what case I use in entering the search criteria. Searching for 'fireside', 'Fireside', and 'FIRESIDE' in STR_NAME all return features whose STR_NAME is 'Fireside Ln'.

However, if I take the same map and publish it to WFS in ArcCatalog, when I perform a WFS request against it, I only get matching results when searching for 'Fireside' (not 'fireside' or 'FIRESIDE').

I am performing a WFS request in the form of an XML POST. This is an example request that returns no results:

<wfs:GetFeature service="WFS" version="1.1.0" maxFeatures="1000" resultType='results' xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
 <wfs:Query srsName="EPSG:4326" typeName="centerlines:street_centerline">
  <ogc:PropertyName>STR_NAME</ogc:PropertyName>
  <ogc:PropertyName>TYPE</ogc:PropertyName>
  <ogc:PropertyName>Shape</ogc:PropertyName>
  <ogc:Filter>
   <ogc:PropertyIsLike wildCard="*" singleChar="." escape="!">
   <ogc:PropertyName>STR_NAME</ogc:PropertyName>
   <ogc:Literal>*fireside*</ogc:Literal>
  </ogc:PropertyIsLike>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>

I have also tried adding a matchCase="false" attribute to the ogc:PropertyIsLike tag (based on a discussion I found on osgeo.org), but this also returned no results.

Is there any way to perform a case-insensitive attribute search against a WFS service hosted on ArcGIS Server, either through modifying the request, or by performing some kind of configuration of the layer, map, or service on the server end?

share|improve this question
add comment

1 Answer

There is no standard way to make a case insensitive search in WFS requests. The best way to do this is to normalize your database and then use some code on the client side to apply the same normalization.

share|improve this answer
    
"Normalize" typically refers to formal transformations of DB schemata into normal forms. I suspect you don't mean that, but are you seriously recommending that all case distinctions in the actual data be obliterated? –  whuber Mar 23 '11 at 18:46
    
I mean that you should create a column called lwr_name and set that to contain the lower case form of the name. Then you can apply toLower() or what ever to the user supplied string. –  iant Mar 23 '11 at 18:56
    
Ah, thank you: interesting idea. –  whuber Mar 23 '11 at 19:50
    
If you do it any other way you have thrown away your indexing –  iant Mar 23 '11 at 20:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.