[mapserver-users] How to display coordinates in lat/long format on a map with UNITS=Meters?
Ed McNierney
ed at topozone.com
Wed Mar 27 08:33:20 PST 2002
MapServer-folks:
I can't find any documentation on the projection used in the Europe map
in the example Jan's using (see below). Can anyone help?
- Ed
Ed McNierney
Chief Mapmaker
TopoZone.com
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: Jan Mantkowski [mailto:jan.mantkowski at gmx.de]
Sent: Wednesday, March 27, 2002 11:06 AM
To: Ed McNierney
Cc: Mapserver-Users
Subject: RE: [mapserver-users] How to display coordinates in lat/long
format on a map with UNITS=Meters?
Hi Ed,
its the europa example from
http://mapserver.gis.umn.edu/doc/phpmapscript-byexample-howto.html
All i know about the shapefiles is from the shpdump:
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)
( 50395.681, 4534532.400, 0, 0) Ring
( 50773.355, 4534413.439, 0, 0)
( 50663.630, 4533848.958, 0, 0)
( 50310.488, 4533921.135, 0, 0)
( 50249.606, 4534320.032, 0, 0)
( 50395.681, 4534532.400, 0, 0)
+ ( 51767.905, 4533962.997, 0, 0) Ring
( 51513.193, 4533847.753, 0, 0)
( 51218.772, 4534212.374, 0, 0)
( 51357.135, 4534404.725, 0, 0)
( 51692.574, 4534310.938, 0, 0)
( 51767.905, 4533962.997, 0, 0)
+ ( 33686.562, 4480980.435, 0, 0) Ring
( 33076.118, 4481226.240, 0, 0)
( 32559.723, 4482578.622, 0, 0)
( 32166.277, 4482948.215, 0, 0)
The original europe.map looks like this:
NAME FIRSTMAP
SIZE 400 400
STATUS ON
SYMBOLSET ../symbols/symbols.sym
EXTENT -5696501 1923039 5696501 11022882
UNITS METERS
SHAPEPATH "../data"
WEB
IMAGEPATH "/var/www/html/ms/tmp/"
IMAGEURL "/tmp/"
END
LAYER
NAME world
TYPE POLYGON
STATUS ON
DATA europa
CLASS
TEMPLATE void
COLOR 110 50 100
OUTLINECOLOR 200 200 200
#END
END
TOLERANCE 10
END
END
Thanks for your help.
Jan
-----Original Message-----
From: Ed McNierney [mailto:ed at topozone.com]
Sent: Wednesday, March 27, 2002 3:49 PM
To: Jan Mantkowski; Mapserver-Users
Subject: RE: [mapserver-users] How to display coordinates in lat/long
format on a map with UNITS=Meters?
Jan -
What you need to do is to convert your map / shapefile coordinates to
lat/long. That's certainly something you can do, but you need to know
what projection the map data uses before you can do that - otherwise
it's like trying to translate a foreign language to French without
knowing what the foreign language is!
What information do you have about the shapefiles and their projection?
- Ed
Ed McNierney
Chief Mapmaker
TopoZone.com
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: Jan Mantkowski [mailto:jan.mantkowski at gmx.de]
Sent: Wednesday, March 27, 2002 7:48 AM
To: Mapserver-Users
Subject: [mapserver-users] How to display coordinates in lat/long format
on a map with UNITS=Meters?
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