-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polar reprojection bug revisited #2765
Comments
|
Author: gaffigan |
|
Author: gosselinandre
Andre Gosselin |
|
Author: gaffigan The patch file in this ticket, mapserver_polehole.patch, contains patches to two files, mapproject.c and mapresample.c, concatenated together. I notice when I [attachment:ticket:2765:mapserver_polehole.patch view this patch through trac] it only displays the first patch, to mapproject.c, which affects vector layers. The second patch, to mapresample.c, affects rasters. Check that the patch you downloaded has the following lines To get the whole patch, you need to scroll to the bottom of the above page, to the section "Download in other formats", and click [http://trac.osgeo.org/mapserver/attachment/ticket/2765/mapserver_polehole.patch?format=raw Original Format]. When I run your example, bug55.map, on a system which has been patched, I get an image without the missing data region from the raster layer, "global". I hope you don't mind that I updated your attached image, [attachment:ticket:2765:bug55-patched.png bug55-patched.png], with my result. Please let me know here and/or via email (gaffigan AT sfos.uaf.edu) if this image is still incorrect or if you cannot reproduce it after making sure you've patched both mapproject.c and mapresample.c. Thanks. Steve Gaffigan |
|
Author: gosselinandre
I had indeed been confused by the way Trac reported the patch, and as you guessed, got only the first part dealing with file "mapproject.c". I did as you suggested and downloaded the whole patch. Now everything is OK. This is really great. Thanks so much for you help. Not being an expert in MapServer, I do not know if this patch could create problems elsewhere in other contexts. Do you think it will need more testing before it finds its way in a new release ? Regards, Andre |
|
Author: gosselinandre The array is used later in the function : I think the call to 'msInitProjTransformer()' assumes the contents of array 'adfDstGeoTransform' to be as set at function entry, which is not the case anymore. The symptom is seen as missing lines/columns of pixels at right/bottom of resulting raster. I was able to cure the problem by simply reinitializing array 'adfDstGeoTransform' as follows : Except for that, your patch works perfectly for me. Regards, Andre Gosselin |
|
Author: gaffigan Thank you for your contribution. I've updated the attached mapserver_polehole.patch to include the reinitialization of adfDstGeoTransform. Another possible issue with the patch is the underlying assumption: ''"If the source bounding box corresponding to the interior rectangle has a more extreme northing extent than that from the original requested rectangle, then extend source bounding box to the southernmost/northernmost extreme and the entire easting extent"''. It seems valid for the cases I work with: Combinations of map and layers in geographic, Albers, polar stereographic, and equidistant cylindrical. But there are a lot of other projections, and also rotated grids, for which the assumption needs to be evaluated. If and when Mapserver developers get the interest/funding/time to cover this bug, a different solution may likely be preferred. Until then, I will update this ticket with any fixes or limitations I discover, and I appreciate that you're doing the same. Steve |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/2765/ms_poletest.tar.bz2 : |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/2765/bug55-patched.png : |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/2765/bug55-patched.2.png : |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/2765/mapserver_polehole.patch : |
|
I seem to be having a similar problem trying to show a tiff in native epsg:3413 projection in MapServer 6.4.1. A request like below fails to draw any image: I tested the same tiff using GeoServer and it works (see image comparison in QGIS 2.2.0). With MapServer I get: With GeoServer I get: Hoping that this isn't an issue with my tiff, which I created with: gdalwarp -t_srs "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" arctic_decimaldegree-top60.tif arctic_decimaldegree-top60-3413.tif on this tiff: ftp://ftp.bgs.ac.uk/pubload/OneGeology/arctic_decimaldegree-top60.tif Incidentally, I tried first to use the arctic_decimaldegree-top60.tif (which is cut to the bounds extent of epsg:3413) and reproject to epsg:3413 (from epsg:4326), but this gives a keyhole like artefact in the map for most GetMap requests like: |
This is an automated commentThis issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid. Typically, issues fall in this state for one of the following reasons:
|
|
As far as I know this is still an issue |
|
Is there any champion for this? Or funding to help find one? |
|
Maybe there will be added interest from activities coming from http://www.opengeospatial.org/pressroom/pressreleases/2347 |
|
Interesting, thanks for keeping us posted. |



Reporter: gaffigan
Date: 2008/09/15 - 01:40
Trac URL: http://trac.osgeo.org/mapserver/ticket/2765
The Mapserver C library has an unresolved bug when maps requested in polar projections contain data in latlong projection. Other map/data projection combinations can also be a problem. From #723 (2004), "if the projection is valid along the borders, but contains the north pole, the source bounding box will not be correct." The result is a region of missing source data north of the incorrect northernmost northing from the source bounding box (see [attachment:ticket:2764:orig.png attached]).
Related source code:
Previous work on this bug:
New patch (see [attachment:ticket:2764:mapserver_polehole.patch attached]):
The text was updated successfully, but these errors were encountered: