[Mapserver-users] How to get the x y value of a pixel from the tiff file by mapserver
Steve Lime
steve.lime at dnr.state.mn.us
Thu Jan 23 17:01:08 PST 2003
Yes you can.
One way is to set up a dummy shapefile (1 big polygon consisting of
4 points, a rectangle) that is larger than the extent of your image
dataset. With that file
you have something to query since you can't query raster layers. Then
you can create
a query template and use the [mayx] [mapy] substitutions to get at the
mouse click. There
are also [maplat] [maplon] substitutions to get lat/lon if you have
proj.4 support.
Another way to do this would be to actually switch template files. So,
if a user want's just
the xy coordinate you use a template file that doesn't actually show a
map, but just uses
the substitutions mentioned above.
There also used to be a showxy mode, but it's undocumented and I'll
have to look at source
to tell you how to use it.
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> "pond bear" <pond_bear at hotmail.com> 01/23/03 05:32PM >>>
I succeeded to compile mapserver and run it on my Redhat 7.3 machine.
Now I
can show a tiff image by mapserver and zoom in or zoom out.
Can I get the x/y value or latitude/longitude value when I click on the
tiff
image?
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
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