[Mapserver-users] Indexquery

kenboss kenboss at dilbert.dnr.state.mn.us
Wed Jun 11 12:55:29 EDT 2003


I believe the default behavior of mapserver is to query only within the bounds 
of the current map extent.  I have used this feature to good effect in a perl 
mapscript environment where I'm trying to locate a PLS 40-acre parcel.  There 
are too many forties in my state (1.3 million) to do a straight attribute query 
on a forties shapefile, and in the absence of dbf index support I worked around 
this by setting up a staged query.  I first query a township layer for the 
relevant township, then set my mapextent to the bounds of the township, then 
query a section layer for the relevant section within the township, set my 
mapextent to the bounds of the section, and finally query my forty layer for the 
relevant forty.  Works great and is quite fast.

HTH,

--Ken

> From: "John Rubin" <RUBINJ at gov.ns.ca>
> Date: Wed, 11 Jun 2003 12:05:29 -0300
> 
> Is it possible to query a polygon only within the present map extent?
> 
> I have 20 county tile indexed shapefiles which contain forest polygons.  In 
the attributes of these shapefiles is a unique code for each polygon  which 
contains a mapsheet number and a stand number. 
> An itemquery is too slow for the number of polygons.  
> I can determine the tileindex of the county number by the mapsheet number.  I 
suspect an indexquery would speed up the process.  Can anyone give some advice 
or example on how to use an indexquery?
> 
> Yours truly
> 
> 
> John Rubin
> Telephone:   902-893-5712
> E-mail:   RUBINJ at gov.ns.ca
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list