projection questions
Ed McNierney
ed at TOPOZONE.COM
Fri Jan 21 09:56:45 PST 2005
Jeff -
A datum is not a projection, but a mathematical model of the Earth. Every geographic (i.e. latitude/longitude) and projected coordinate system is expressed relative to a datum. Many people incorrectly think that the latitude and longitude of a point are absolute, unchangeable values. Latitude and longitude are geographic coordinates expressed relative to a datum. If you change the datum, the coordinates will change. In the United States, the NAD27 and NAD83 datums are commonly used. WGS84 is also used because it is a world-wide datum, but in the USA you can consider it identical to NAD83.
For example, I'm typing this from a location that's latitude 42.5860°N, 71.5553°W in WGS84/NAD83 coordinates, and 42.5859°N, 71.5558°W in NAD27 coordinates. Not a big difference, but a real one.
If ALL of your shapefiles are geographic NAD83, things are pretty easy. If your input and output projections are all the same (and let's start with that case) then you can completely ignore projections. Just be sure the extents in your .mapfile are appropriate for the area and the UNITS are DD (decimal degrees).
It sounded, however, from your last email, as if you'd already had that working. What works and doesn't work? Can you get one shapefile to display using latitude/longitude extents for the northeastern US?
- Ed
________________________________________
From: Jeff Portwine [mailto:jdport at veritime.com]
Sent: Friday, January 21, 2005 12:34 PM
To: Ed McNierney; MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] projection questions
As I've looked closer at some of the metadata that is available on the downloads I have, I've noticed that they sometimes say they are a geographic projection, and use datum like NAD83... so that tells me a little bit. However I had the mistaken idea before that NAD83 was a "projection". I really am confused about the difference between the data set and the projection. I thought that NAD83 was a set of data that used a particular projection.... but then I noticed in at least one case the metadata showed a "geographic projection", a horizantal datum, and a vertical datum.... so I'm a bit confused.
So Assuming that all my shapefiles are Geo Lat/Long projections with NAD83 datum, how do I make them look right when they are drawn with mapserver/mapscript?
Thanks again,
Jeff
----- Original Message -----
From: Ed McNierney
To: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: Friday, January 21, 2005 11:23 AM
Subject: Re: [UMN_MAPSERVER-USERS] projection questions
Jeff -
Unfortunately, ESRI forgot about projections when the shapefile format was created. There was a later addition of a .prj file to go along with shapefiles and describe their projection. If you have a .prj file of the same base name, you will have that information - I expect you do not.
Without that information you're down to educated guesses. There are three likely candidates for US data - geographic (unprojected) coordinates, a UTM projection, or a state plane projection. If you are dealing with a multiple-state area, state plane is unlikely.
Can you examine the coordinates in the shapefile by either using the shpdump utility or loading the shapefile into a GIS viewer and reading the coordinates? For New England, geographic coordinates will have X values ranging from around -74 to -66, and Y values between 41 and 48. UTM coordinates will range between X values of 200000 to 700000 and Y values between 4500000 and 5250000. As you can see, these are obviously different and easy to distinguish.
If you find you have values that don't match either of these, let us know what they are; the shpdump utility will give you the bounding box of all shapes in the shapefile, and that's a good guide.
- Ed
Ed McNierney
TopoZone.com
________________________________________
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jeff Portwine
Sent: Friday, January 21, 2005 10:49 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] projection questions
Is there an easy way to figure out what projection my shapefile was created with? I have a map of the New England area that was created in Microsoft's Map Point, and I am more or less trying to re-create that map with mapserver. I started with an outline of the United States and then set the extents to display the area that I wanted, but the maps look very different and i'm positive it's becuase I'm not using proper projections (I don't expect the maps to look exactly alike of course, but the general shape should be pretty close). I always use ogrinfo to get the extents and see projection information of shapefiles that I've downloaded but more often than not , the ogrinfo just returns: "Layer SRS WKT: (Unknown)" instead of telling me the projection it was created with.
I also am not sure how to go about choosing my output projection... I've been using EPSG:4269 because as I understand it that is a midwest projection and when I first started playing with mapserver I was making maps of Michigan. Anybody know a good source to look up what would be the best output projection for different areas of the country/world?
As you can tell i'm really new to GIS and while I do understand the idea of projections I just don't know anything about them or how to apply them.
Thanks a lot,
Jeff
More information about the MapServer-users
mailing list