[SPAM] Re: [UMN_MAPSERVER-USERS] National Atlas Projections... driving me crazy!
Kelly Koehn
kkoehn at ASPIREDILLUSION.COM
Mon Jul 24 21:22:02 PDT 2006
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
To: Kelly Koehn
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/20060724/fc2a07f7/attachment.htm>
More information about the MapServer-users
mailing list