MapServer / MapServer-import

3 stars 2 forks source link

Mapserver fails to reproject raster tiles south of 40 degrees north #1726

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: rindahl@lrcwe.com Date: 2006/03/26 - 22:44

I have two seperate raster tiles served in mapserver.  When they are displayed
in their native projections (UTM13 NAD83 and UTM13 NAD27) everything works
perfectly.  When the request is sent to reproject the maps, anything north of 40
degrees is reprojected fine but it is blank south of 40 degrees.  Both of the
maps show the same behavior even though they are different projections.  A
single image that is not tiled is reprojected fine.

Example links are as follows. A DRG layer in native NAD27 displays fine:
http://www.lrcwe-data.com/cgi-bin/mapserv.exe?map=/Web/lrcwe-data/topo.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:26713&BBOX=475295,4427041,480767,4431133&WIDTH=948&HEIGHT=709&LAYERS=topo&
While a request in NAD83 clips off the image below 40 degrees:
http://www.lrcwe-data.com/cgi-bin/mapserv.exe?map=/Web/lrcwe-data/topo.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:26913&BBOX=475295,4427041,480767,4431133&WIDTH=948&HEIGHT=709&LAYERS=topo&

An aerial photograph layer in native NAD83 displays fine:
http://www.lrcwe-data.com/cgi-bin/mapserv.exe?map=/Web/lrcwe-data/naip.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:26913&BBOX=475295,4427041,480767,4431133&WIDTH=948&HEIGHT=709&LAYERS=naip&
while a request in NAD27 again clips off everything below 40 degrees:
http://www.lrcwe-data.com/cgi-bin/mapserv.exe?map=/Web/lrcwe-data/naip.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:26713&BBOX=475295,4427041,480767,4431133&WIDTH=948&HEIGHT=709&LAYERS=naip&

Further south of 40 degrees nothing shows at all.
The error log from the server gives the following message:
msProjectRect(): some points failed to reproject, doing internal sampling.
tbonfort commented 12 years ago

Author: dmorissette Date: 2006/03/27 - 15:15

Reassigned to Frank, MapServer's projection expert.
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2006/03/27 - 20:28

Bruce,

I suspect this has to do with the limits of available NAD27->NAD83 grid
shift files.  But I'm surprised you are getting cut at 40 degrees as
the conus (continental US) files should cover quite a bit south of that. 

Can you reducet this to the minimal data and mapfile to demonstrate the
problem?  You should also verify that you have the ntv1_can.dat and 
conus files in /usr/local/share/proj (or your local PROJ directory if you
are on windows). 
tbonfort commented 12 years ago

Author: rindahl@lrcwe.com Date: 2006/03/27 - 21:01

I am using MS4W.  In the PROJ (ms4w\proj\nad) directory I have ntv1_can.dat and
conus.lla files dated 3/3/2003.
I will work on getting a minimal test case.
Bruce
tbonfort commented 12 years ago

Author: rindahl@lrcwe.com Date: 2006/03/27 - 22:49

Minimal test case.  Attachment can be found at:
http://www.lrcwe-data.com/bug/hillshade.zip
Image is in epsg:2232 projection.  Also included is map file for a version of
the bug.  When asking for a reprojection to epsg:26913 display is fine.  When
asking for reporjection to epsg:26713 a portion is clipped off.  Map file will
need to be edited for path info.
Full display of image is:
http://www.lrcwe-data.com/cgi-bin/mapserv.exe?map=/Web/lrcwe-data/hillshade.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=hillshade&SRS=EPSG:26913&BBOX=420000,4320000,550000,4460000&width=650&height=700
(Full reprojection to 26913) and:
http://www.lrcwe-data.com/cgi-bin/mapserv.exe?map=/Web/lrcwe-data/hillshade.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=hillshade&SRS=EPSG:26713&BBOX=420000,4320000,550000,4460000&width=650&height=700
(Clipped version to 26713)
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2006/03/27 - 23:15

Bruce, 

OK, this is certainly an MS4W problem then.  You need the "conus" file.
It is built from "conus.lla" by the nad2bin utility.  You can find a version
suitable for win32 systems at:

  http://www.gdal.org/tmp/proj_lib.zip

Make sure you are down in the ms4w/proj/nad directory when you unpack
the .zip file.  If that solves you problem, please report it to the MS4W 
maintainers. 
tbonfort commented 12 years ago

Author: rindahl@lrcwe.com Date: 2006/03/28 - 00:13

Called it fixed.  The lack of the conus file in the proj/nad directory was the
cause.  Numerous other files were also missing that are included in the above
mentioned .zip file were also added to the directory.  I will post a message to
the ms4w people.  Thanks for the help!
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2006/08/16 - 21:38

apparently a configuration issue.