[Mapserver-users] Extent and units

Eric Waters ewaters at xmission.com
Tue Mar 23 10:13:04 EST 2004


>	Hi all,
>
>I don't understand the extent of the data in the demo of the mapserver :
>
>in the map file : EXTENT
>201621.496941 -294488.285333
>1425518.020722
>498254.511514
>the same data with ogrinfo : -97.238976 41.619778 -82.122902 49.385620
>The 1rst are in meter and the second in degrees, how do you pass from the 2nd to the first ?
>Can't we define the EXTENT with decimal degrees in the mapfile ?
>
>Thanks for the help,
>Tony

Tony,

To convert from one projection to the other, use cs2cs as follows:

Running "echo '201621.496941 -294488.285333' | cs2cs +init=epsg:2163 +to +proj=latlong -v" yields '97d32'51.868"W  42d19'27.254"N 0.000' (but I don't know how to make it output in full decimal degrees)

Running "cs2cs +init=epsg:4326 +to +init=epsg:2163 -v" with input '97d32'51.868"W  42d19'27.254"N' then yields the coord in meters "201621.50       -294488.28 0.00"

You can't write the extent of the map in Lat/Long degrees when the Projection of the map is in LAEA (meters).  Notice that each layer is in geodetic (lat/long) projection since the data is in decimal degrees, but the map itself is in LAEA projection to make it look more realistic.

Eric Waters



More information about the mapserver-users mailing list