PHP Select List of Polygons

Bob Bruce covariance at SHAW.CA
Wed Mar 23 14:12:57 EST 2005


Steve:
        coincidently I encountered the same kind of problem not too long
ago. My problem was that I had not identified a CLASSITEM for my class so
when I queried a layer by rectangle I was unable to obtain the IDs for my
selected shapes. When I added this to my layer definition I was able to
access the IDs through the numvalues and values members of the shapeObj
class.

I recently responded to a request about how to do this in the following
listserv entry:

http://lists.umn.edu/cgi-bin/wa?A2=ind0503&L=MAPSERVER-
USERS&T=0&F=&S=&X=6F78C127C2E12F8CA9&Y=covariance at shaw.ca&P=26839

on Tuesday, 8 March 2005.

The only thing that I forgot in reviewing that response later was that I
forgot to mention that I had to set up a template for the layer between
steps 2 and 3. You may have to make a real template file up to do a
reliable query, since I found that MapScript kept producing errors on my
own WIN2K system when I was using a dummy template name.

hopefully this helps you,
                          Bob Bruce, Winnipeg, Manitoba

On Tue, 22 Mar 2005 21:46:31 -0600, Steve Lehr <lehrs at ERAU.EDU> wrote:
 -
 -
 -
 -
>Can I query one layer by rectangle, then store those shapeids and then add
>the shape ids to another layer?  If so, how do I turn on the individual
>shape ids?  Do I need a classitem?  expression?  or can I just turn on the
>layer and loop over the list of shape_ids then turn on those shapes for
>that layer?
>
>LAYER
>  NAME "showme"
>  DATA parcels
>  STATUS OFF
>  CLASS
>    COLOR 0 0 255
>  END
>END
>
>Thanks for your help!
>
>Steve Lehr



More information about the mapserver-users mailing list