[SPAM] Re: [UMN_MAPSERVER-USERS] National Atlas Projections... driving me crazy!
Ed McNierney
ed at TOPOZONE.COM
Tue Jul 25 06:26:10 PDT 2006
Kelly et al. -
There are two different things going on here, and some of the advice is
a little confusing.
Your National Atlas data sets are distributed as shapefiles using
geographic (lat/lon) coordinates on the NAD83 datum. This is not a
"projection" - these are unprojected geodetic coordinates. That's good.
You can use any projection you like to project this data on to a flat
surface and use it on a map. You can even (as some users do) use a
"geographic projection" and simply leave out the PROJECTION block at the
top level of your map file. This will end up treating latitude and
longitude as X/Y planar coordinates. It will give you a map that is
useless for many applications, but it seems to be a popular way to make
bad maps on the Web.
You don't "have" to use LCC, and the National Atlas data isn't "intended
for" LCC or any other projection. You can choose whatever projection
you like - there are lots of different map projections in the world
because they all have limitations and you can choose the one best suited
for your application. The Mercator projection you mention distorts
areas, distances, and directions, but it shows lines of constant compass
declination as straight lines, so if you're navigating a ship with a
compass that's an excellent application to choose. If that's not what
you're doing there are other projections that are probably better
choices.
The Mercator projection is so commonplace, however, that many users
think that's "how things are supposed to look". For example, your
county is not square - it's a rectangle (with the top left corner cut
out). Sedgwick County is five townships tall and six townships wide, so
it's wider than it is tall. But the Mercator projection stretches
things vertically as you move away from the Equator, so a Mercator
projection of Sedgwick County probably looks square. But it's not, and
that's not the "right" answer any more or less than any other
projection.
We can all help you choose a good output projection for your map, but
you'll need to tell us something about what you want that projection to
show. How large an area do you need to display at once? Do you need to
show distances accurately, or areas accurately?
- Ed
Ed McNierney
TopoZone.com
________________________________
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Kelly Koehn
Sent: Tuesday, July 25, 2006 12:22 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] [SPAM] Re: [UMN_MAPSERVER-USERS]
National Atlas Projections... driving me crazy!
Tyler:
Thanks for the prompt response.
LCC may be the incorrect projection that I need to use but it seems to
be the only projection that I can find that gives me the counties in the
correct (porportional sp?) size. In the end I would really like to use
a Mercator projection but alas I couldn't find any examples to figure
out how to make it work.
The specific National Atlas data I'm using is here:
http://edcftp.cr.usgs.gov/pub/data/nationalatlas/countyp020.tar.gz
According to the text file that came with the data they give the
following information about the data:
Latitude/Longitude Resolution: 0.000278
Geographic Coordinates: Decimal Degrees
Datum: NAD83
Ellipsoid: GRS1980
Semi-major axis: 6378137
Denomiator of Flattening: 298.257222
Like I said, so far I've been able to get it to produce a map in LCC but
its only because I've been playing around with the settings to 'make' it
work. There is a sample map available here:
http://www.aspiredillusion.com/cgi-bin/mapserv?map=fmfinder.map&mode=map
In the end my goal is to be able to specify a specific
latitude/longitude as a center and be able to plot out so many degrees,
miles, whatever out to make a complete map for another project (hence
why I think the Mercator projection would be best).
If any of this makes any sense at all let me know because I feel like
I'm rambling! :)
By the way... another person suggested to use the EPSG codes...
unfortunately my installation is not too happy with using those. It
keeps giving me a Proj.4 error basically saying it can't find the file
even though they are located in /usr/local/share/proj. For now I've
just substituted in the definition (or is this bad?)
Here is a copy of my map file:
MAP
NAME USA
STATUS ON
IMAGETYPE PNG
SIZE 400 400
IMAGECOLOR 255 255 255
SHAPEPATH "/home/aspiredillusion/cgi-bin/gis"
SYMBOLSET "symbol.ref"
FONTSET "font.ref"
extent 2086624.47 2893493.42 2267537.24 3111554.05
UNITS METERS
PROJECTION
"proj=lcc"
"ellps=GRS80"
"datum=NAD83"
# "lat_0=38" # Latitude CENTER
# "lat_1=38" # Set same as lat_0
# "lon_0=-90" # Longitude CENTER
# "x_0=-80000" # Offset for longitude
# "y_0=175000" # Offset for latitude
"lat_0=24"
"lat_1=50"
"lon_0=-99"
END
LAYER
NAME "County"
DATA "countyp020"
TYPE LINE
STATUS DEFAULT
PROJECTION
"proj=latlong"
"ellps=GRS80"
"datum=NAD83"
END
CLASS
OUTLINECOLOR 255 0 0
END
END
LAYER
NAME "State"
DATA "statesp020"
TYPE LINE
STATUS DEFAULT
PROJECTION
"proj=latlong"
"ellps=GRS80"
"datum=NAD83"
END
CLASS
COLOR 0 0 0
END
END
LAYER
NAME "pop_pnt"
DATA "pop_pnt"
TYPE POINT
STATUS DEFAULT
LABELITEM "NAME"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"datum=NAD83"
END
CLASS
STYLE
SYMBOL "circle"
SIZE 3
COLOR 0 0 0
END
LABEL
COLOR 0 0 0
FONT "arial"
SIZE 10
TYPE TRUETYPE
POSITION AUTO
OUTLINECOLOR 255 255 255
BUFFER 8
END
END
END
LAYER
NAME "Notation"
STATUS DEFAULT
TRANSFORM FALSE
TYPE ANNOTATION
FEATURE
POINTS
33 390 # Across, Down
END
TEXT 'FMFinder'
END
CLASS
LABEL
FONT "arial"
TYPE TRUETYPE
SIZE 10
BUFFER 1
COLOR 0 128 255
FORCE TRUE
BACKGROUNDCOLOR 255 255 255
END
END
END
END
----- Original Message -----
From: Tyler Mitchell <mailto:tylermitchell at shaw.ca>
To: Kelly Koehn <mailto:kkoehn at ASPIREDILLUSION.COM>
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: Monday, July 24, 2006 10:42 PM
Subject: [SPAM] Re: [UMN_MAPSERVER-USERS] National Atlas
Projections... driving me crazy!
Hi Kelly,
I'm not familiar with your national atlas specific projections,
but do you have more details about the LCC projection you are referring
to? LCC is a general class of projection that will have some more
localised parameters depending on, generally speaking, where you are
centering your map. The lat_0/1/2 and lon_0 values might change
depending on where you are doing your mapping.
Do you already know the more full description of the LCC
projection you have in mind?
Tyler
On 24-Jul-06, at 6:49 PM, Kelly Koehn wrote:
I've been working with mapserver for quite some time now and I
thought I'd made some strides in the areas of projections but I seem to
have went into it all backwards. I started out with the National Atlas
datasets for counties and states. I've come to the conclusion that the
projection they want you to use is 'latlong', ellps is 'GRS80', and
datum is 'NAD83'. The names are 'statesp020' and 'countyp020' I
believe.
This is all fine and dandy except unless you project the map as
LCC it seems to be vertically challenged. For instance, the county that
I live in (Sedgwick, in Kansas) is not a rectangle.. its square. I've
found some examples of the lat/long to LCC projection but most seem a
bit foggy.
My real question has to do with the whole 'lat/long to meters'
conversion and how to make heads or tails of the 'cs2cs' program that
supposedly converts the values. Is there some magic trick to this
program that I'm not finding?
I have some other questions about exactly what the lat_0, lat_1,
lat_2, lon_0 values should be for the LCC projection but I'll save those
for another time.
Any help would be great! I'm about ready to rip my hair out!
Kelly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060725/198f7081/attachment.htm>
More information about the MapServer-users
mailing list