Skip to main content

Reference Library

Go Search
Reference Library
  
Reference Library > Wiki Pages > Figuring out your Projection  

Figuring out your Projection

 
Often times it will be necessary to reproject your data in MDNS.  The most common reason would be to use it in the VirtualEarth template.  This involves discovering what projection your data is in and then converting it to the proper format in your mapfile. 
 
Step 1: Discover your projection
 
In many cases, the source of your data will be an ESRI Shapefile.  Usually shapefiles come with a file with the .prj extension.  This file contains projection info in the ESRI Well-Known Text (WKT) format.  If you don't have this, your spatial database may contain this info.  If you are unsure, contact the source of the data or the person in charge of it in your organization.
 
Step 2: Convert it to Proj4
 
Proj4 is the format that projections are specified in mapfiles.  It is a common industry format.  If you do not already have this information available, you can use http://spatialreference.org/ which is a great site for getting projection info in various formats. 
 
For example, if I have a shapefile with a .prj file containing:
 
PROJCS["NAD_1983_HARN_StatePlane_Florida_North_FIPS_0903_Feet",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1968500.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-84.5],PARAMETER["Standard_Parallel_1",29.58333333333333],PARAMETER["Standard_Parallel_2",30.75],PARAMETER["Latitude_Of_Origin",29.0],UNIT["Foot_US",0.3048006096012192]]
 
I can look at the beginning and deduce that projection is State Plane for Florida North in Feet.  So, I go to http://spatialreference.org/ and search for "Florida North".  I get several results.  The one I want is:
 
EPSG:2883: NAD83(HARN) / Florida North (ftUS)

I can deduce this because my WKT specifies feet and this one says it's in feet (ftUS) and my datum mentions HARN ("GCS_North_American_1983_HARN").  I select this link and get a page with details on the projection.  This has links to various formats.  Select the Proj4 link.  This brings up:
 
+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +to_meter=0.3048006096012192 +no_defs
 
You can use this in your mapfile.
 

Last modified at 11/11/2008 6:10 PM  by WEB\mark