<div dir="ltr">Hi Dmitry<div><br></div><div>When testing your example I get "No mini-driver registered for 'AGS'.":</div><div><br></div><div><div>>gdal_translate -of PNG ags.xml ags_test.png --config CPL_DEBUG ON</div><div>ERROR 1: GDALWMS: No mini-driver registered for 'AGS'.</div><div>GDALOpen failed - 1</div><div>GDALWMS: No mini-driver registered for 'AGS'.</div></div><div><br></div><div>Do you know if this AGS mini-driver code is made publicly available i.e. being pushed to the GDAL source/trunk?</div><div><br></div><div>Yours, Stefan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-08 13:51 GMT+02:00 Dmitry Baryshnikov <span dir="ltr"><<a href="mailto:bishop.dev@gmail.com" target="_blank">bishop.dev@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi James,<br>
    <br>
    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.<br>
    I create such xml file based on information from here:
<a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" target="_blank">https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true</a><br>
    <br>
     <GDAL_WMS><br>
        <Service name="AGS"><br>
           
<ServerUrl><a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer" target="_blank">https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer</a></ServerUrl><br>
            <ImageFormat>png</ImageFormat><br>
            <Layers>show:1,2,3</Layers><br>
            <BBoxOrder>xyXY</BBoxOrder><br>
            <SRS>3857</SRS><br>
        </Service><br>
        <DataWindow><br>
            <UpperLeftX>-1821098.1612395868</UpperLeftX><br>
            <UpperLeftY>9441422.428028269</UpperLeftY><br>
            <LowerRightX>1157719.0542395862</LowerRightX><br>
            <LowerRightY>6462605.212549096</LowerRightY><br>
            <SizeX>1024</SizeX><br>
            <SizeY>1024</SizeY><br>
        </DataWindow><br>
    </GDAL_WMS><br>
    <br>
    $ gdal_translate -of PNG ~/tmp/ags.xml ~/tmp/ags_test.png --config
    CPL_DEBUG ON<br>
    GDAL: GDALOpen(/home/bishop/tmp/ags.xml, this=0x15138c0) succeeds as
    WMS.<br>
    Input file size is 512, 512<br>
    AGS: URL =
<a href="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=" target="_blank">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=</a><br>
    <br>
    HTTP: Requesting [1/1]
<a href="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=" target="_blank">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=</a><br>
    HTTP: Request [0]
    <a href="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=" target="_blank">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=</a>
    : status = 200, content type = image/png, error = (null)<br>
    GDAL: GDALOpen(/vsimem/wms/0x15dc720/wmsresult.dat, this=0x15c3d00)
    succeeds as PNG.<br>
    GDAL: GDALClose(/vsimem/wms/0x15dc720/wmsresult.dat, this=0x15c3d00)<br>
    0...10...20...30...40...50...60...70...80...90...100 - done.<br>
    GDAL: GDALClose(/home/bishop/tmp/ags_test.png, this=0x1599830)<br>
    GDAL: GDALClose(/home/bishop/tmp/ags.xml, this=0x15138c0)<br>
    <br>
    <br>
    <img src="cid:part1.03050104.08070309@gmail.com" alt=""><br>
    <br>
    Also I test this xml in QGIS - works fine.<br>
    <pre cols="72">Best regards,
    Dmitry</pre>
    <div>07.07.2015 18:42, Passmore, James H.
      пишет:<br>
    </div><div><div class="h5">
    <blockquote type="cite">
      <pre>>From <a href="http://www.gdal.org/frmt_wms.html" target="_blank">http://www.gdal.org/frmt_wms.html</a>  I see you can access an ArcGIS REST API like:

gdalinfo <a href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true" target="_blank">"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true"</a>

and

gdal_translate <a href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json" target="_blank">"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json"</a> wms.xml -of WMS

These above examples work for me.

When I try on a BGS service it fails as below:

...:\>gdalinfo <a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" target="_blank">"https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true"</a>
gdalinfo failed - unable to open '<a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=" target="_blank">https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=</a>
true'.

And:

..:\>gdal_translate <a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" target="_blank">"https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true"</a> 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(<a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" target="_blank">https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true</a>)
WMS: Did not get levels
HTTP: Fetch(<a href="https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true" target="_blank">https://map.bgs.ac.uk/arcgis/rest/services/UKSO/UKSO_BGS/MapServer?f=json&pretty=true</a>)
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 list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>


</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>