QueryByAttribute on Mapinfo Tab files

mikiet mike.talbutt at DOTTEDEYES.COM
Tue Aug 7 12:26:49 EDT 2007


Hi, can someone give me some pointers please

I'm using Java mapscript to query a Mapinfo TAB layer in my map. Basically I
want to pick out all features in my mapinfo tab file that have an id of
"A00"


The layer is defined as follows

LAYER
NAME regions
TYPE POLYGON
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "C:/MapBase/regions.TAB"
STYLEITEM "AUTO"
TEMPLATE "ffff" 
CLASS
  NAME "regions"
END
END

The code I have wrote is as follows

String columnName = "regionid";
String value = "A00";
System.out.println("query result = " + internalLayer.queryByAttributes(map,
columnName, value, mapscript.MS_MULTIPLE));
resultCacheObj resultCache = internalLayer.getResults();

System.out.println("resultCache.getNumresults() = " +
resultCache.getNumresults());

However when this code runs I always get the following output

query result = 1
resultCache.getNumresults() = 0

I have managed to do a queryByRect on the same layer and it is working fine,
so I presume its something to do with the parameters I am passing to
queryByAttributes method ?

Any advice greatly appreciated

-- 
View this message in context: http://www.nabble.com/QueryByAttribute-on-Mapinfo-Tab-files-tf4231201.html#a12037582
Sent from the Mapserver - Dev mailing list archive at Nabble.com.



More information about the mapserver-dev mailing list