[mapserver-users] mapfile projection

Andy Colson andy at squeakycode.net
Wed Jul 15 07:44:04 PDT 2009


Richard Greenwood wrote:
> 
> 
> On Tue, Jul 14, 2009 at 11:27 AM, Andy Colson <andy at squeakycode.net 
> <mailto:andy at squeakycode.net>> wrote:
> 
>     Hi all,
> 
>     I'm working on my first mapping project, so IANAM (I am no a
>     mapper). Here is the projection info from a shapefile I'm using:
> 
>     PROJCS["NAD_1983_StatePlane_Iowa_North_FIPS_1401_Feet",
>     GEOGCS["GCS_North_American_1983",
>     DATUM["D_North_American_1983",
>     SPHEROID["GRS_1980",6378137.0,298.257222101]],
>     PRIMEM["Greenwich",0.0],
>     UNIT["Degree",0.017453292519943295]],
>     PROJECTION["Lambert_Conformal_Conic"],
>     PARAMETER["False_Easting",4921250.0],
>     PARAMETER["False_Northing",3280833.333333333],
>     PARAMETER["Central_Meridian",-93.5],
>     PARAMETER["Standard_Parallel_1",42.06666666666667],
>     PARAMETER["Standard_Parallel_2",43.26666666666667],
>     PARAMETER["Latitude_Of_Origin",41.5],
>     UNIT["Foot_US",0.30480060960121924],
>     PARAMETER["scale_factor",1.0]]
> 
>     I used QGIS to create a mapfile, and it generated this:
> 
>     PROJECTION
>      'proj=longlat'
>      'ellps=WGS84'
>      'datum=WGS84'
>      'no_defs'
>      ''
>     END
> 
>     I was kind of thinking this (Thanks to FrankW for helping me find
>     the right epsg code):
> 
>     PROJECTION
>      'init=epsg:3417'
>     END
> 
> 
>     Is the first one even right?  
> 
> 
> No
>  
> 
>     Would there be a difference?  
> 
> 
> The first one is spherical, but State Plane is Cartesian (on a plane).
>  
> 
>     Why might I choose one over the other?  I'm going to put this into
>     postgis, with srid = 3417, will that make any difference. 
> 
> 
> Yes.
>  
> 
>      (I'd like to avoid re-projections.. I think... don't I?)
> 
> 
> Reprojection isn't evil. You may as well do it right, but the main thing 
> with postgis is that you put it in, and take it out, calling the same 
> projection. Which could be -1 if you really don't know/care. MapServer 
> doesn't set a layer's projection from postgis. If you have a layer(s) 
> that's different from the map's overall projection, then you'd need to 
> set the projection in the layer definition, not necessarily in postgis. 
> Setting a layer's projection different from the map's projection is what 
> will trigger reprojection.
> 
> HTH,
> -- 
> Richard Greenwood
> richard.greenwood at gmail.com <mailto:richard.greenwood at gmail.com>
> www.greenwoodmap.com <http://www.greenwoodmap.com>

Ahh, so QGIS didn't export a projection that matched my data.  (I assume 
its a default that it always exports...)

 > The first one is spherical, but State Plane is Cartesian (on a plane).

Heh.. that's one of those answers that brings up more questions.  But 
google is helping me out.

Thanks for the help,

-Andy



More information about the MapServer-users mailing list