projection questions

Ed McNierney ed at TOPOZONE.COM
Tue Jan 25 09:37:11 PST 2005


Jeff -

Using different map projections isn't rocket science, but it isn't
trivial, either.  You need to know how to describe the projection via
its parameters, and details are important.  For example, the
Massachusetts Mainland State Plane projection you mention is described
as:

PROJECTION
    "proj=lcc"
    "lat_1=42.683333333"
    "lat_2=41.716666667"
    "lat_0=41.000000000"
    "lon_0=-71.500000000"
    "x_0=200000.000"
    "y_0=750000.000"
    "ellps=GRS80"
    "datum=NAD83"
    "units=m"
    "no_defs"
END

If, however, you use cs2cs to calculate the extents you want using the
projection definition you created, then you're likely to get results
that are at least visible - you don't really need to duplicate the Mass.
State Plane coordinates.  But if you create extreme conditions you might
NOT get what you want, which is what you did with your last Transverse
Mercator definition.

Your last attempt at Transverse Mercator wasn't bad - but you forgot
that Albany is in the Western hemisphere and centered the projection in
Kyrgyzstan.  Again, details REALLY matter with projections.  They're the
perfect "garbage in, garbage out" example - you'll get exactly what you
asked for, whether you wanted it or not.  Mapping a point 180 degrees
away from the center of a Transverse Mercator projection will give you
nonsense (it's undefined in that projection), which may be why you got
nothing at all.

The old New York State Plane East Zone projection was Transverse
Mercator and is a decent starting point.  Here's what it looks like,
modified to NAD83 and meters from the original NAD27 feet:

PROJECTION
    "proj=tmerc"
    "lat_0=40.000000000"
    "lon_0=-74.333333333"
    "k=0.999967"
    "ellps=GRS80"
    "datum=NAD83"
    "units=m"
    "no_defs"
END

Use cs2cs to calculate the extents you want and give it a try.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

-----Original Message-----
From: Jeff Portwine [mailto:jdport at veritime.com] 
Sent: Tuesday, January 25, 2005 11:08 AM
To: Ed McNierney; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] projection questions


I've looked through a lot of information, the links you all sent, and
other places on the web, but I simply can't figure out how to get the
settings right for projecting my map.

I set every layer to "proj=latlong" with no other settings (I'm pretty
sure that all the shapefiles I have are lat/long NAD83) and then in the
map 
section I added a projection block.   I tried a lot of different 
settings.... most of them just give me a blank map.     I read on one of

those web pages that Massachusettes has a standard projection of
Lamberts 
Conformal Conic with 2 latitudes of 41.6 and 42.7.     So, I converted
my 
extents over with the cs2cs utility and set my output projection to:

PROJECTION
   "proj=lcc"
   "lat_1=41.6"
   "lat_2=42.7"
END

This actually came out better than anything else I've tried... the
extents looked like they were about as correct as I could get them but
the entire map was twisted clockwise about 45 degrees....

The rest of my attempts revolved around the Transvers Mercator
projection. 
I tried using UTM:

PROJECTION
    "proj=utm"
    "ellps=GRS80"
    "zone=19"
    "north"
    "no_defs"
END

These settings were from an example in the mapserver mapfile
documentation, I used zone 19, though the area i'm mapping is right on
the line between zone 18 and zone 19.

PROJECTION
   "proj=tmerc"
   "k=0.9996"
   "x_0=0"
   "y_0=500000"
   "lat_0=42.75"
   "lon_0=73.8"
END

I got these settings from
http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html
and used the longitude and latitude of Albany as my lat/long of origin
since that was roughly in the middle of my map.

Of the multitude of attempts I made to get the right settings, these two
made the most sense to me based on what I'd read... but they didn't work
at 
all, or perhaps I just screwed up when I was getting my extents.
This 
stuff is really really confusing, adn I'm beginning to wonder if I
should just use the lat/long map even though it's not really right and
looks funny.... but any pointers on how to get the right settings is
really appreciated.

-Jeff



More information about the MapServer-users mailing list