three reprojection bugs
|Reported by:||warmerdam||Owned by:||warmerdam|
There are three bugs that show up when using an orthographic projection (other projections are affected too) in WMS-client mode with a source in geographic projection: 1. If the projection is valid along the borders, but contains the north pole, the source bounding box will not be correct. In these cases the whole grid needs to be sampled in order to determine the source bounds. Perhaps this should be a processing parameter option? 2. If there are invalid points on a particular scanline, the whole scanline fails. The problem is that pj_transform returns a failure and the whole scanline is discarded by mapserver. It seems like pj_transform should transform valid points and set invalid ones to HUGE_VAL, but this is not the case. Maybe this is a bug in proj4... the manpage doesn't really say what the behavior should be in this case. 3. If the destination image contains the -180/180 border, there will be a stripe of invalid data there. The pixels that are near 180 degrees longitude will correspond to points in the source image that are up to 0.5 pixels past the right-hand edge of the image. It seems to me that somewhere in GDALGetGeoTransform there is a 0.5 that is inappropriately added. A quick fix is to allow a one-pixel margin of error in msSimpleRasterResampler. Attached to this message is an example map file and perl script that will demonstrate the problems. The zoomed-in image will have a blank area near the north pole and the zoomed-out image will only draw the center third: the top and bottom will be blank. There is also a quick-hack patch that shows a workaround for these problems. As a side note, it would be nice to have an option that causes a higher-res source image to be downloaded in order to avoid the oversampling effect that sometimes happens (the demo script included with this message produces a noticably pixelated image). - Dan Stahlke
Change History (6)
Note: See TracTickets for help on using tickets.