[Mapserver-users] Accessing the spatial part of a shp file

Steve Lime steve.lime at dnr.state.mn.us
Mon Jan 13 13:32:44 EST 2003


You can do just that. Query templates allow you to access at least some
spatial information
about each shape. The [shpext] replacement string will get you the
bounding box of the
feature (suitable for use in creating a map or initializing an
interface) and the [shpmid] gets
you the mid-point of the bounding box. Also useful for creating a map
or interface when
pair with a scale value. To do this, in general:

Steve

>>> "Steve McCrone" <mccrone at pc.jaring.my> 01/12/03 08:25AM >>>
Hi gain,

Would like to get some ideas on how to access the coordinates of a
spatial
shape.
My goal is to have the user 'locate' (i.e. pan & zoom) to a spatial
data.

In other words, the user would select from a list of roads, for
example, and
then push a 'find' button. The
map would zom and pan to the road. Once I extract the coordinates that
make
up the road
I could adjust the map extants to zoom & pan.

I was hoping that i could perform a record search on the shape file,
find
the record that contains the attribute (name for example),
extract the coordinates of the polyline, point or polygon and then
adjust
the map.

Or do I have to create a separate table that contains a pre-defined
centre
coordinate of the spatial data and then use this
to adjust the map extents.

Thanks
Steve


_______________________________________________
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