Hi Everyone,<br><br>I'm having some issues when reprojecting data via a WMS request to MapServer. While I realize this only touches on the gdal side of things slightly (I'm using the gdal driver and FWTools version 2.0.6 in Linux), I'm hoping the problem is one that someone on this list may have encountered. Very briefly, here's what's happening. I have an image file that is completely unprojected, and which spans a global extent in pixels that are .025 x .025 degrees in size. I have assigned this file an SRS of EPSG:4326, and am trying to display it with an SRS of 900913 in Google Maps. The reprojection seems to work, at least in that the edges of the data set line up correctly with all of the features in Google Maps, but there are horizontal lines across my data in various places. When I replicate the WMS call for one of these bad tiles,<br>
<br><a href="http://localhost/cgi-bin/mapserv">http://localhost/cgi-bin/mapserv</a>?<br>map=/var/www/mapfiles/test_20m/test.map<br>&layers=imagery<br>&srs=EPSG%3A900913<br>&version=1.1.1<br>&bbox=-20037508.34%2C-20037508.34%2C-10018754.1704%2C-10018754.1704<br>
&service=WMS<br>&width=256<br>&styles=<br>&format=image%2Fpng<br>&request=GetMap<br>&height=256<br><br>I get back an image that is 256 x 256 pixels, but where the bottom 4 rows of pixels are essentially empty (they're filled with the MapServer background color). The pixels that are correctly represented are also stretched a bit in the Y-axis as well. If I screw around with my projection definition for EPSG:900913 and add an ellipsoid definition, +ellps=WGS84, the missing 4 pixels will be correctly rendered in this particular example, but if I look closely at other parts of the data, in other zoom levels, the same problem reappears.<br>
<br>I've also tried reprojecting the data to EPSG:900913 first, and then displaying the data in Google Maps without making any sort of reprojection request. What I get then from the image request above is a tile that is filled 2/3 with correctly sized pixels (no y-axis stretch), and 1/3 is empty. So I'm guessing that my definition of Google's projection is not correct, but I have no clue how to fix it. I've used the definition found at <a href="http://spatialreference.org/ref/user/google-projection/">http://spatialreference.org/ref/user/google-projection/</a>, and also at <a href="http://trac.openlayers.org/wiki/SphericalMercator">http://trac.openlayers.org/wiki/SphericalMercator</a>.<br>
<br><900913> +proj=merc +ellps=WGS84 +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <><br><br>It seems pretty well researched at both of these sites, but I have never seen the "+nadgrids=@null" parameter before. I've read the info about it at <a href="http://proj.maptools.org/faq.html">http://proj.maptools.org/faq.html</a>, but don't fully understand it. <br>
<br>Thanks in advance for any help or advice you can give me.<br><br>Roger<br>--<br>