projection woes

Frank Warmerdam fwarmerdam at GMAIL.COM
Tue Jan 25 11:17:32 EST 2005


On Tue, 25 Jan 2005 10:02:36 -0600, Mark Adams <markadams at cuestasys.com> wrote:
> Hoping someone can help me out with problems I'm having combining data from
> different projections. I have a set of layers in NAD 27 zone 17, which I'm
> displaying with a PROJECTION object set at the MAP level
> with "init=EPSG:26717". I'm trying to add a layer that is in NAD 83 zone
> 17. If I simply add this layer without specifying a PROJECTION, it displays
> fine, albeit out of sync with the underlying data due to the datum shift.
> If I add a PROJECTION object to the LAYER set with "init=EPSG:26917", the
> layer disappears – no error in the log file, just no data. The same thing
> happens if I add a similar PROJECTION object to any other layer – the data
> disappears.
> 
> I've gone through the proj installation instructions, I can't see anything
> wrong.

Mark,

For this to work you need datum shifting working.  The key to datum shifting
is that at runtime PROJ.4 (used by MapServer) needs to find the NAD27
grid shift files.   

Default installs of PROJ.4 don't even include the grid shift files.  When they
are present the main one is named "conus" (for Continental US).  On unix
it would be found in /usr/local/share/proj by default.    

If you have the file, it might still not be found.  If this is the
problem then you
need to define the PROJ_LIB environment variable to point to the directory
where the file is located.  You likely don't need to do this if your EPSG 
lookups are working as the EPSG lookup file is in the same place as the
grid shift files.  

If you have all that in place, and things are still not working then it might
be related incomplete coordinate system definitions in one of your
PROJECTION blocks.  Is both your UTM 17 NAD27 layer and your map
as a whole defined with init=EPSG:26717?  If you emailed me your .map
file I could make a quick inspection that you have complete definitions
everywhere. 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list