[mapserver-users] Mapserver - cascading a remote ESRI REST service
Rahkonen Jukka (MML)
jukka.rahkonen at maanmittauslaitos.fi
Wed Apr 27 00:32:36 PDT 2016
Hi,
I copied your XML definition file and made a test with GDAL. My command was:
gdal_translate -outsize 400 400 rest.xml out.tif --debug o
Result is an error:
0ERROR 1: GDALWMS: Unable to download block 0, 0.
URL: http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/
MapServer
/export?f=image&bbox=15300000.00000000,-5070000.00000000,17810000.00000000,-
2950000.00000000&size=256,256&dpi=&imageSR=3857&bboxSR=3857&format=image/jpeg&la
yerdefs=&layers=&transparent=false&time=&layerTimeOptions=&dynamicLayers=
HTTP status code: 400, error: (null).
Add the HTTP status code to <ZeroBlockHttpCodes> to ignore that error (see http:
//www.gdal.org/frmt_wms.html).
ERROR 1: rest.xml, band 1: IReadBlock failed at X offset 0, Y offset 0
With another proxy I get similar error but different code
HTTP status code: 0, error: (null).
The request is OK and shows a map when sent through a browser.
Fiddler proxy gives a short explanation about what goes wrong and it says that the request headers can’t be parsed. I do not understand what it means but it looks obvious that the issue is in GDAL, not in Mapserver.
Even R. may be reading but you can also send mail to gdal-dev list. Include your XML file and ask why gdal_translate -outsize 400 400 rest.xml out.tif --debug o
gives an error.
-Jukka Rahkonen-
Robert Sanson wrote:
Hi
I am trying to cascade a remote ESRI REST image service via my Mapserver mapfile.
Here is my XML file:
<GDAL_WMS>
<Service name="AGS">
<ServerUrl>
http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPI_Imagery_Best/MapServer
</ServerUrl>
<BBoxOrder>xyXY</BBoxOrder>
<SRS>3857</SRS>
<ImageFormat>image/jpeg</ImageFormat>
</Service>
<DataWindow>
<UpperLeftX>1.53E7</UpperLeftX>
<UpperLeftY>-2950000.0</UpperLeftY>
<LowerRightX>1.781E7</LowerRightX>
<LowerRightY>-5070000.0</LowerRightY>
<SizeX>256</SizeX><SizeY>256</SizeY>
</DataWindow>
</GDAL_WMS>
Here is my mapfile layer:
LAYER
NAME sixmaps
GROUP 'highres'
TYPE RASTER
STATUS ON
DATA "/mnt/gisdata/data/aus/sixmaps.xml"
PROCESSING "OVERSAMPLE_RATIO=1.0"
PROJECTION
"init=epsg:3857"
END
METADATA
"wms_title" "sixmaps"
"wms_name" "sixmaps"
"wms_srs" "EPSG:3857"
END
END
When I try and request a map using a WMS GetMap request, this is the error message I get:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
msDrawMap(): Image handling error. Failed to draw layer named 'sixmaps'.
drawGDAL(): Unable to access file. GDALDatasetRasterIO() failed: GetBlockRef failed at X block offset 0, Y block offset 0
</ServiceException>
</ServiceExceptionReport>
Can anyone point out where the problem is?
Many thanks,
Robert L. Sanson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160427/688e350e/attachment.htm>
More information about the MapServer-users
mailing list