You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using mapserver to reproject raster data from various projections to the HEALPix projection from proj.4. This works well when the layer source is a raster, however I get severe reprojection problems when using an external WMS as source for my layer.
Some examples
Here is the layer description for the raster source (I omitted all metadata for clarity, if this is important, I can provide it):
LAYER
NAME "bluemarble"
STATUS ON
TYPE RASTER
DATA "bluemarble.vrt"
PROJECTION
AUTO
END
END
And here we have the WMS sourced layer:
LAYER
NAME "dlrbasemap"
TYPE RASTER
STATUS ON
CONNECTION "https://geoservice.dlr.de/eoc/basemap/wms?"
CONNECTIONTYPE WMS
METADATA
WMS_NAME "basemap"
WMS_SERVER_VERSION "1.1.1"
WMS_FORMAT "image/png"
WMS_SRS "EPSG:4326"
WMS_TITLE "dlrbasemap"
END
END
In the epsg file I added this line:
<900916> +proj=healpix +a=1 <>
When I request the raster layer with ...&LAYERS=bluemarble&SRS=EPSG:900916&BBOX=-3.5,-1.6,3.5,1.6 I get the expected result:
When I perform the very same request but with ...&LAYERS=dlrbasemap&...I get an empty image.
For smaller bounding boxes (...&LAYERS=bluemarble&SRS=EPSG:900916&BBOX=-0.5,0.6,0.5,1) I get again correct results for the raster layer but somehow distorted results for the WMS layer.
Raster layer:
WMS layer:
(for example observe how parts of Africa are missing)
Some thoughts
Maybe it's just a configuration problem? But that seems unlikely since the reprojection is working more or less, it looks more like a precision problem...
I guess that we see here actually two problems:
The source bounding box is calculated incorrectly, resulting in a empty map in the first example
Something goes wrong during the reprojection itself (example 2)
What to do now?
Is there any information I should provide additionally?
I am willing to have look at the source code myself (actually already skimmed through several parts, especially mapwmslayer.c) but I will need some guidance where I should start investigating...
Thank you!
Edit: It seems as if this issue could be reproduced with this tiny example GeoTiff: test.zip
Reprojection with gdal works: gdalwarp -t_srs '+proj=healpix +a=1 +b=1 +wktext' -te -0.5 0.6 0.5 1 test.tiff healpix.tiff, using it in a layer as above results in the distortion:
LAYER
NAME "test"
STATUS ON
TYPE RASTER
DATA "test.tiff"
PROJECTION
AUTO
END
END
The text was updated successfully, but these errors were encountered:
please start by sending this to the mapserver-users mailing list, where many eyes will be able to help you decide if it is a config issue or not (subscribe at https://lists.osgeo.org/listinfo/mapserver-users). Also, in your message to that mailing list, be sure to not include images, please use an external service (such as http://pasteboard.co/) and include that link in your email message. thanks.
I am using mapserver to reproject raster data from various projections to the HEALPix projection from proj.4. This works well when the layer source is a raster, however I get severe reprojection problems when using an external WMS as source for my layer.
Some examples
Here is the layer description for the raster source (I omitted all metadata for clarity, if this is important, I can provide it):
And here we have the WMS sourced layer:
In the epsg file I added this line:
When I request the raster layer with
...&LAYERS=bluemarble&SRS=EPSG:900916&BBOX=-3.5,-1.6,3.5,1.6I get the expected result:When I perform the very same request but with
...&LAYERS=dlrbasemap&...I get an empty image.For smaller bounding boxes (
...&LAYERS=bluemarble&SRS=EPSG:900916&BBOX=-0.5,0.6,0.5,1) I get again correct results for the raster layer but somehow distorted results for the WMS layer.Raster layer:

WMS layer:

(for example observe how parts of Africa are missing)
Some thoughts
What to do now?
Thank you!
Edit: It seems as if this issue could be reproduced with this tiny example GeoTiff: test.zip
Reprojection with gdal works:
gdalwarp -t_srs '+proj=healpix +a=1 +b=1 +wktext' -te -0.5 0.6 0.5 1 test.tiff healpix.tiff, using it in a layer as above results in the distortion:The text was updated successfully, but these errors were encountered: