[mapserver-users] How to display coordinates in lat/long format on a map with UNITS=Meters?
Jan Mantkowski
jan.mantkowski at gmx.de
Wed Mar 27 04:47:59 PST 2002
Hi all,
i have a map with UNITS=Meters. (Still the europa example.)
What i do right now is to save coordinates in meters format as a layer. (I
really do not know what this meters mean, i choosed the coordinates to be
"inside" the extent, thats all).
Then i dispaly them together with the map data which is in meters to.
There are no projection settings at all right now.
So what do i need to do to display real lat /long data instead of that
artificial data?
Jan
I add the complete current europa.map:
NAME FIRSTMAP
SIZE 400 400
STATUS ON
EXTENT -5696501 1923039 5696501 11022882
UNITS Meters
SYMBOLSET "C:\Apache\htdocs\pn_71\html\modules\map5\symbols\symbols.txt"
FONTSET "C:\Apache\htdocs\pn_71\html\modules\map5\fonts\fonts.txt"
SHAPEPATH "C:\Apache\htdocs\pn_71\html\modules\map5\data"
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "c:\Apache\htdocs\tmp\"
IMAGEURL "/tmp/"
END
LAYER
NAME world
TYPE POLYGON
STATUS ON
DATA europa
CLASS
TEMPLATE void
COLOR 200 200 200
OUTLINECOLOR 0 0 0
#END
END
TOLERANCE 10
END
LAYER
NAME "X"
DATA users
STATUS ON
TYPE POINT
CLASS
COLOR 255 0 0
SYMBOL 'circle'
SIZE 10
END
END
LAYER
NAME "PN"
DATA users
STATUS ON
TYPE ANNOTATION
LABELITEM "username"
SYMBOLSCALE 250000
CLASS
COLOR -1 -1 -1 # no marker will be drawn
LABEL
POSITION AUTO
SIZE MEDIUM
COLOR 132 31 31
OUTLINECOLOR 255 255 255
BUFFER 4
END
END
END
END
This is the shpdump:
C:\a>shpdump.exe europa.shp > europa.txt
Shapefile Type: Polygon # of Shapes: 54
File Bounds: (-4362443.744, 3864199.098,4.16405e+202,0)
to ( 2916998.546, 9336805.431,0,0)
Shape:0 (Polygon) nVertices=1258, nParts=4
Bounds:( 31629.715, 4389343.606, 0, 0)
to ( 183200.478, 4723802.771, 0, 0)
The File Bounds: (MINX, MINY, MINZ, MINV)
to (MAXX, MAXY, MAXZ, MAXV)
and
EXTENT MINX MINY MAXX MAXY
-----Original Message-----
From: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu]On Behalf Of Tyler
Mitchell
Sent: Tuesday, March 26, 2002 3:52 PM
To: Jan Mantkowski
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] How to display coordinates in lat/long
format on amap with UNITS=Meters?
Have you looked into the PROJECTION parameters for your map file at all?
It sounds like you will want to set the PROJECTION for the whole map to
Decimal Degrees, then within each LAYER section define what the input
PROJECTION is. If this sounds like what you are trying to do - then you
will need to get PROJECTION settings under your belt. I think you will be
changing your UNITS parameter to something like DD for decimal degrees. I
haven't done it before though. Someone else can probably comment with some
more intelligence.
"Jan Mantkowski"
<jan.mantkowski at gmx.de> To:
"Mapserver-Users" <mapserver-users at lists.gis.umn.edu>
Sent by: cc:
owner-mapserver-users at lists.g Fax to:
is.umn.edu Subject:
[mapserver-users] How to display coordinates in lat/long
format on a map
with UNITS=Meters?
03/26/2002 12:50 AM
Hi list,
i got stuck again.
It´s still the europa example.
What i do right now is to make shapefiles from "artificial" coordinates.
(Choosen to fit the EXTENT)
It works.
But, when i have coordinats in latitude and longitude, how to display the
resulting layer correct on the map that is in Meters?
I did a shpdump and got this:
Shapefile Type: Polygon # of Shapes: 54
File Bounds: (-4362443.744, 3864199.098,4.16405e+202,0)
to ( 2916998.546, 9336805.431,0,0)
Shape:0 (Polygon) nVertices=1258, nParts=4
Bounds:( 31629.715, 4389343.606, 0, 0)
to ( 183200.478, 4723802.771, 0, 0)
The europa.map looks like this:
NAME FIRSTMAP
SIZE 400 400
STATUS ON
EXTENT -5696501 1923039 5696501 11022882
UNITS Meters
...
The layer to display the data in meter format looks like this:
LAYER
NAME "X"
DATA users
STATUS ON
TYPE POINT
CLASS
COLOR 255 0 0
SYMBOL 'circle'
SIZE 10
END
END
What do i need to change to make it to display data in latitude longitude
format?
Thanks,
Jan
More information about the MapServer-users
mailing list