[Mapserver-users] proj.4 stuff

Frank Warmerdam warmerdam at pobox.com
Thu Apr 22 16:28:48 EDT 2004


Bob Basques wrote:
> Ok, I can't get it to work:
> 
> HELP!!
> 
> How do I translate this (From the MNDOT website)
> 
> PROJCS<br> <br> ["Ramsey - county coordinates - english",GEOGCS
>    ["Ramsey - county coordinates - english",DATUM
>    ["&lt;custom&gt;",SPHEROID
>    ["&lt;custom&gt;",6378418.941,298.2572242549207]<br> ],PRIMEM
>    ["Greenwich",0.0],UNIT
> ["Degree",0.0174532925199433]],PROJECTION
> ["Lambert_Conformal_Conic"],PARAMETER
> ["False_Easting",499999.999998],PARAMETER
> ["False_Northing",99999.9999996],PARAMETER
> ["Central_Meridian",-93.38333333333334],PARAMETER
> ["Standard_Parallel_1",44.88333333333333],PARAMETER
> ["Standard_Parallel_2",45.13333333333333],PARAMETER
> ["Latitude_Of_Origin",44.79111111111111],UNIT
> ["Foot_US",0.3048006096012192]
> 
>  ]

This corresponds to the PROJ.4 definition:

   +proj=lcc +lat_1=44.88333333333333 +lat_2=45.13333333333333 +lat_0=44.79111111111111 +lon_0=-93.38333333333334 
+x_0=152400.3048 +y_0=30480.06096 +a=6378418.941 +b=6357033.31 +to_meter=0.3048006096012192 +no_defs

I got this by putting your definition in a text file, trimming some of the
HTML junk out and then doing the following.  The testepsg program in gdal/ogr
(needs to be forced to build ... not a default utility) converts between different
coordinate system formats.  The ESRI:: prefix tells the program the. prj file has
ESRI WKT instead of OGR WKT.


warmerda at gdal2200[44]% testepsg ESRI::./wrk.prj

Which gave:

WKT[ESRI::./wrk.prj] =
PROJCS["Ramsey - county coordinates - english",
     GEOGCS["Ramsey - county coordinates - english",
         DATUM["&lt;custom&gt;",
             SPHEROID["&lt;custom&gt;",6378418.941,298.2572242549207]],
         PRIMEM["Greenwich",0.0],
         UNIT["Degree",0.0174532925199433]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["False_Easting",499999.999998],
     PARAMETER["False_Northing",99999.9999996],
     PARAMETER["Central_Meridian",-93.38333333333334],
     PARAMETER["Standard_Parallel_1",44.88333333333333],
     PARAMETER["Standard_Parallel_2",45.13333333333333],
     PARAMETER["Latitude_Of_Origin",44.79111111111111],
     UNIT["Foot_US",0.3048006096012192]]

Simplified WKT[ESRI::./wrk.prj] =
PROJCS["Ramsey - county coordinates - english",
     GEOGCS["Ramsey - county coordinates - english",
         DATUM["&lt;custom&gt;",
             SPHEROID["&lt;custom&gt;",6378418.941,298.2572242549207]],
         PRIMEM["Greenwich",0.0],
         UNIT["Degree",0.0174532925199433]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["False_Easting",499999.999998],
     PARAMETER["False_Northing",99999.9999996],
     PARAMETER["Central_Meridian",-93.38333333333334],
     PARAMETER["Standard_Parallel_1",44.88333333333333],
     PARAMETER["Standard_Parallel_2",45.13333333333333],
     PARAMETER["Latitude_Of_Origin",44.79111111111111],
     UNIT["Foot_US",0.3048006096012192]]

Old Style WKT[ESRI::./wrk.prj] = PROJCS["Ramsey - county coordinates - english",
GEOGCS["Ramsey - county coordinates - english",DATUM["&lt;custom&gt;",SPHEROID["
&lt;custom&gt;",6378418.941,298.2572242549207]],PRIMEM["Greenwich",0.0],UNIT["De
gree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["
False_Easting",499999.999998],PARAMETER["False_Northing",99999.9999996],PARAMETE
R["Central_Meridian",-93.38333333333334],PARAMETER["Standard_Parallel_1",44.8833
3333333333],PARAMETER["Standard_Parallel_2",45.13333333333333],PARAMETER["Latitu
de_Of_Origin",44.79111111111111],UNIT["Foot_US",0.3048006096012192]]
ESRI'ified WKT[ESRI::./wrk.prj] =
PROJCS["Ramsey - county coordinates - english",
     GEOGCS["Ramsey - county coordinates - english",
         DATUM["D_&lt;custom&gt;",
             SPHEROID["_lt_custom_gt",6378418.941,298.2572242549207]],
         PRIMEM["Greenwich",0.0],
         UNIT["Degree",0.017453292519943295]],
     PROJECTION["Lambert_Conformal_Conic"],
     PARAMETER["False_Easting",499999.999998],
     PARAMETER["False_Northing",99999.9999996],
     PARAMETER["Central_Meridian",-93.38333333333334],
     PARAMETER["Standard_Parallel_1",44.88333333333333],
     PARAMETER["Standard_Parallel_2",45.13333333333333],
     PARAMETER["Latitude_Of_Origin",44.79111111111111],
     UNIT["Foot_US",0.30480060960121924]]
PROJ.4 rendering of [ESRI::./wrk.prj] = +proj=lcc +lat_1=44.88333333333333 +lat_
2=45.13333333333333 +lat_0=44.79111111111111 +lon_0=-93.38333333333334 +x_0=1524
00.3048 +y_0=30480.06096 +a=6378418.941 +b=6357033.31 +to_meter=0.30480060960121
92 +no_defs

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-users mailing list