<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.Shkpostityyli21
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.pl-c
{mso-style-name:pl-c;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Got it by having a look at <a href="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/minidriver_arcgis_server.cpp">
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/minidriver_arcgis_server.cpp</a><o:p></o:p></span></p>
<p class="MsoNormal"><span class="pl-c"><span lang="EN-US">// Assume map service if exportImage is not explicitly requested.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pl-c"><span lang="EN-US"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="pl-c"><span lang="EN-US">I just had to edit the server url in my XML file into this<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US"><ServerUrl>https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/exportImage?</ServerUrl><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:FI">Lähettäjä:</span></b><span style="mso-fareast-language:FI"> Rahkonen Jukka (MML)
<br>
<b>Lähetetty:</b> perjantai 5. helmikuuta 2021 17.04<br>
<b>Vastaanottaja:</b> 'gdal-dev@lists.osgeo.org' <gdal-dev@lists.osgeo.org><br>
<b>Aihe:</b> Problems with ArcGIS image server and WMS minidriver<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I almost managed to read data from this URL but not quite<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/exportImage?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=">https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/exportImage?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The service capabilities are coming from the server<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true">https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">However, GDAL requests do not work for me<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="SV">gdalinfo ”<a href="https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true">https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true</a>”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV">or<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">gdal_translate ”<a href="https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true">https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true</a>”
out.xml -of WMS<br>
<br>
The error is <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR 4: `C:\TEMP\file.dat' not recognized as a supported file format.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For me it seems that file.dat was never written.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">BTW, how on earth I can select the temporary folder? c:\temp is not good at all for my work computer.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Then I wrote the XML file by hand by using
<a href="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/frmt_ags_arcgisonline.xml">
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/frmt_ags_arcgisonline.xml</a> as an example. What fails now it that GDAL is generating request as<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/export?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=">https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/export?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">However, that server delivers data from /exportImage? , not from /export?.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can anybody suggest a simple workaround for changing those urls to point into exportImage?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
</div>
</body>
</html>