[gdal-dev] Attempting to access an ArcGIS REST API through a WMS format minidriver

Stefan Keller sfkeller at gmail.com
Mon Aug 10 09:02:52 PDT 2015


Hi Dmitry

When testing your example I get "No mini-driver registered for 'AGS'.":

>gdal_translate -of PNG ags.xml ags_test.png --config CPL_DEBUG ON
ERROR 1: GDALWMS: No mini-driver registered for 'AGS'.
GDALOpen failed - 1
GDALWMS: No mini-driver registered for 'AGS'.

Do you know if this AGS mini-driver code is made publicly available i.e.
being pushed to the GDAL source/trunk?

Yours, Stefan



2015-07-08 13:51 GMT+02:00 Dmitry Baryshnikov <bishop.dev at gmail.com>:

> Hi James,
>
> As the server didn't provide information about levels, some help needed to
> calculate this values. Also the all layers switched off, so we need to tell
> which layers should be shown.
> I create such xml file based on information from here:
> https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true
>
>  <GDAL_WMS>
>     <Service name="AGS">
>         <ServerUrl>
> https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer
> </ServerUrl>
>         <ImageFormat>png</ImageFormat>
>         <Layers>show:1,2,3</Layers>
>         <BBoxOrder>xyXY</BBoxOrder>
>         <SRS>3857</SRS>
>     </Service>
>     <DataWindow>
>         <UpperLeftX>-1821098.1612395868</UpperLeftX>
>         <UpperLeftY>9441422.428028269</UpperLeftY>
>         <LowerRightX>1157719.0542395862</LowerRightX>
>         <LowerRightY>6462605.212549096</LowerRightY>
>         <SizeX>1024</SizeX>
>         <SizeY>1024</SizeY>
>     </DataWindow>
> </GDAL_WMS>
>
> $ gdal_translate -of PNG ~/tmp/ags.xml ~/tmp/ags_test.png --config
> CPL_DEBUG ON
> GDAL: GDALOpen(/home/bishop/tmp/ags.xml, this=0x15138c0) succeeds as WMS.
> Input file size is 512, 512
> AGS: URL =
> https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer/export?f=image&bbox=-1821098.16123959,6462605.21254910,1157719.05423959,9441422.42802827&size=512,512&dpi=&imageSR=3857&bboxSR=3857&format=png&layerdefs=&layers=show:1,2,3&transparent=false&time=&layerTimeOptions=&dynamicLayers=
>
> HTTP: Requesting [1/1]
> https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer/export?f=image&bbox=-1821098.16123959,6462605.21254910,1157719.05423959,9441422.42802827&size=512,512&dpi=&imageSR=3857&bboxSR=3857&format=png&layerdefs=&layers=show:1,2,3&transparent=false&time=&layerTimeOptions=&dynamicLayers=
> HTTP: Request [0]
> https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer/export?f=image&bbox=-1821098.16123959,6462605.21254910,1157719.05423959,9441422.42802827&size=512,512&dpi=&imageSR=3857&bboxSR=3857&format=png&layerdefs=&layers=show:1,2,3&transparent=false&time=&layerTimeOptions=&dynamicLayers=
> : status = 200, content type = image/png, error = (null)
> GDAL: GDALOpen(/vsimem/wms/0x15dc720/wmsresult.dat, this=0x15c3d00)
> succeeds as PNG.
> GDAL: GDALClose(/vsimem/wms/0x15dc720/wmsresult.dat, this=0x15c3d00)
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> GDAL: GDALClose(/home/bishop/tmp/ags_test.png, this=0x1599830)
> GDAL: GDALClose(/home/bishop/tmp/ags.xml, this=0x15138c0)
>
>
>
>
> Also I test this xml in QGIS - works fine.
>
> Best regards,
>     Dmitry
>
> 07.07.2015 18:42, Passmore, James H. пишет:
>
> >From http://www.gdal.org/frmt_wms.html  I see you can access an ArcGIS REST API like:
>
> gdalinfo "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true" <http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true>
>
> and
>
> gdal_translate "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json" <http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json> wms.xml -of WMS
>
> These above examples work for me.
>
> When I try on a BGS service it fails as below:
>
> ...:\>gdalinfo "https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" <https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true>
> gdalinfo failed - unable to open 'https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=
> true'.
>
> And:
>
> ..:\>gdal_translate "https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" <https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true> bgs.xml -of WMS --debug ON
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_BAG.dll using GDALRegister_BAG.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_ECW_JP2ECW.dll using GDALRegister_ECW_JP2ECW.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_FITS.dll using GDALRegister_FITS.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_GMT.dll using GDALRegister_GMT.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF4.dll using GDALRegister_HDF4.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF4Image.dll using GDALRegister_HDF4Image.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF5.dll using GDALRegister_HDF5.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_HDF5Image.dll using GDALRegister_HDF5Image.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_KEA.dll using GDALRegister_KEA.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_MG4Lidar.dll using GDALRegister_MG4Lidar.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_MrSID.dll using GDALRegister_MrSID.
> GDAL: Auto register C:\apps\gisinternals\bin\gdaL\plugins\gdal_netCDF.dll using GDALRegister_netCDF.
> HTTP: Fetch(https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true)
> WMS: Did not get levels
> HTTP: Fetch(https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true)
> GDALOpen failed - 0
>
> Is the reason that HTTPS is not supported here at all, or if not what might be wrong with the service/request/ configuration?
>
> Thanks
>
> James
>
>
>
> ________________________________
>  This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
> ________________________________
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150810/2f5d8863/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dejjcaed.
Type: image/png
Size: 24212 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150810/2f5d8863/attachment-0001.png>


More information about the gdal-dev mailing list