Projection Issues
Ed McNierney
ed at TOPOZONE.COM
Fri Mar 25 16:39:55 PST 2005
Bill -
Those all look reasonable - good job! Those SRID codes are EPSG
projection codes, and you can use them directly as:
PROJECTION
"init=epsg:26759"
END
which will save you a lot of typing and some typos! It also makes it
obvious to the reader what projection it is (or at least easy for the
reader to look up).
Could you post your entire MAP file? Since your output is in the state
plane projection, your EXTENT needs to be specified in that projection
and units. I would recommend that you start with a map file with the
county PROJECTION block at the MAP level and one layer with the county
data, also with the same PROJECTION block. Get that working correctly,
the add the second layer with the UTM PROJECTION block.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of bill at BINKO.NET
Sent: Friday, March 25, 2005 7:09 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Projection Issues
Hello everyone,
I am using Mapserver 4.4.1 to display data from shapefiles and postGIS.
I have been thrilled with how fast I have gotten everything going, and I
actually think I understand projections better thanks to recent posts on
this list -- thanks!
However, I am failing to get projections to work (at all). This is very
frustrating, since I actually thought I knew what I was doing :)
I have Proj4 compiled in:
MapServer version 4.4.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG
INPUT=POSTGIS INPUT=SHAPEFILE
I have two data sources: the county, and the state. The county uses
this projection (from their shapefiles):
PROJCS["NAD27 Florida State Planes, Western Zone, US Foot",
GEOGCS["North_American_Datum_1927",DATUM["D_North_American_1927",
SPHEROID["Clarke - 1866",6378206.4,294.9786982139006]],
PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",24.3333333333333],
PARAMETER["central_meridian",-82],
PARAMETER["scale_factor",0.9999411765],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],UNIT["Foot_US",0.30480
I looked in the postGIS spatial_ref_system table, and found that the
SRID for that is 26759. The Proj4 parameters in that table are:
+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941
+x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27
+to_meter=0.3048006096012192 +no_defs
I want that to be my output projection (if that's foolish, please let me
know, but since all of my maps are at the county level, it seemed to
make sense). So, I put that as the PROJECTION block in the MAP section:
PROJECTION
"proj=tmerc"
"lat_0=24.33333333333333"
"lon_0=-82"
"k=0.999941"
"x_0=152400.3048006096"
"y_0=0"
"ellps=clrk66"
"datum=NAD27"
"to_meter=0.3048006096012192"
"no_defs"
END
The other data I want to show (right now) is from the state, which uses
this projection (from its shape file)
PROJCS["NAD_1983_UTM_Zone_17N",GEOGCS["GCS_North_American_1983",DATUM["D
_North_A
merican_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Gree
nwich",0
.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"]
,PARAMET
ER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["
Central_
Meridian",-81.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of
_Origin"
,0.0],UNIT["Meter",1.0]]
Lookint in the PostGIS table again, I find an SRID of 26917 with proj4
codes of:
+proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m +no_defs
So I put that in the PROJECTION block of the state's LAYER section:
PROJECTION
"proj=utm"
"zone=17"
"ellps=GRS80"
"datum=NAD83"
"units=m"
"no_defs"
END
The problem is that it simply doesn't show that layer! If I make a new
mapfile with just that layer, and no projections, it draws it (it's a
set of roads), so I know the data is valid. However, I can't seem to
get the two projections on one map.
Any help would be appreciated!
Thanks
Bill
bill at binko.net
More information about the MapServer-users
mailing list