<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>There are a few historically exported VSIInstaller symbols, but <span
style="mso-fareast-language:EN-US" lang="EN-US">VSIInstallCurlFileHandler
is never exported. None of those symbols need to be explicitly
called as GDAL will automatically register the builtin-handlers.
Perhaps your gdal.dll lacks curl support ? I assumed you pass
the needed config options / env variables for that service.
Perhaps you could try with something simpler that doesn't
require authentication.<br>
</span></p>
<div class="moz-cite-prefix">Le 05/10/2021 à 21:05, Joaquim Manuel
Freire Luís a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:AM6PR04MB39597513A2D4D4EE6228881EA6AF9@AM6PR04MB3959.eurprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@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;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">Even, sorry to continue this.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">Now is from Julia<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">julia>
gdalinfo("/vsicurl/<a class="moz-txt-link-freetext" href="https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif">https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif</a>")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">ERROR 4:
`/vsicurl/<a class="moz-txt-link-freetext" href="https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif">https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif</a>'
not recognized as a supported file format.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">I saw a reference to
VSIInstallCurlFileHandler() so I thought “right I need this
guy too” but when I try to install it<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">julia> GMT.Gdal.VSIInstallCurlFileHandler()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">ERROR: could not load symbol
"VSIInstallCurlFileHandler":<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">The specified procedure could not be found.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">And indeed my gdal.dll has a couple of
VSIInstaller symbols but not this one (nor zip, gzip and
others).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US">Is the “not supported file format” related to
this? Shouldn’t that symbol be exported to the dll?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span
lang="EN-US"> gdal-dev
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.org"><gdal-dev-bounces@lists.osgeo.org></a>
<b>On Behalf Of </b>Joaquim Manuel Freire Luís<br>
<b>Sent:</b> Tuesday, October 5, 2021 5:59 PM<br>
<b>To:</b> Even Rouault
<a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [gdal-dev] How to access remote data
that requires authentication?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span lang="EN-US">>The mention to _netrc is weird...<o:p></o:p></span></p>
<p><span lang="EN-US">On Windows is _netrc, not .netrc<o:p></o:p></span></p>
<p><span lang="EN-US">And I finally made it (twisted). The
problem was that I detest where MS decides is my home dir
(and all the hidden dirs stuff that it puts there) and
always have had a home at “HOME=c:\j” and it’s there that
libcurl (I presume) seeks for the netrc file.<o:p></o:p></span></p>
<p><span lang="EN-US">Thanks for all the tips. But I still
wonder how GMT manages to read the file without anything of
this.<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">For the record if any other Windows user
needs it<o:p></o:p></span></p>
<p><span lang="EN-US">gdalinfo
/vsicurl/<a class="moz-txt-link-freetext" href="https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif">https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif</a>
--config GDAL_DISABLE_READDIR_ON_OPEN EMPTY_DIR --config
CPL_VSIL_CURL_USE_HEAD FALSE --config GDAL_HTTP_COOKIEFILE
c:/TEMP/cookies.txt --config GDAL_HTTP_COOKIEJAR
c:/TEMP/cookies.txt<o:p></o:p></span></p>
<p><span lang="EN-US">Driver: GTiff/GeoTIFF<o:p></o:p></span></p>
<p><span lang="EN-US">Files:
/vsicurl/<a class="moz-txt-link-freetext" href="https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif">https://lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif</a><o:p></o:p></span></p>
<p><span lang="EN-US">Size is 3660, 3660<o:p></o:p></span></p>
<p><span lang="EN-US">Coordinate System is:<o:p></o:p></span></p>
<p><span lang="EN-US">PROJCRS["UTM Zone 10, Northern
Hemisphere",<o:p></o:p></span></p>
<p><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US">Regarding authentication issues, this
service is quite annoying and requires enabling cookies.
</span>See <a
href="https://lists.osgeo.org/pipermail/gdal-dev/2021-October/054728.html"
moz-do-not-send="true">
https://lists.osgeo.org/pipermail/gdal-dev/2021-October/054728.html</a><o:p></o:p></p>
<p>You need to add things like <i>--config GDAL_HTTP_COOKIEFILE
/tmp/cookies.txt --config GDAL_HTTP_COOKIEJAR
/tmp/cookies.txt</i><o:p></o:p></p>
<div>
<p class="MsoNormal">Le 05/10/2021 à 18:20, Joaquim Manuel
Freire Luís a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>OK, tried more things from that thread.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>gdalinfo /vsicurl/<a href="https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T10TEK.2021192T184511.v2.0/HLS.L30.T10TEK.2021192T184511.v2.0.B04.tif" moz-do-not-send="true">https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T10TEK.2021192T184511.v2.0/HLS.L30.T10TEK.2021192T184511.v2.0.B04.tif</a> --config GDAL_DISABLE_READDIR_ON_OPEN EMPTY_DIR --config CPL_CURL_VERBOSE ON --config CPL_VSIL_CURL_USE_HEAD FALSE <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>* Couldn't find host data.lpdaac.earthdatacloud.nasa.gov in the _netrc file; using defaults ...<o:p></o:p></pre>
<pre>OK, right it's not there.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>But latter down it says<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>* Couldn't find host urs.earthdata.nasa.gov in the _netrc file; using defaults<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Now this is not right.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>< HTTP/1.1 401 Unauthorized<o:p></o:p></pre>
<pre>...<o:p></o:p></pre>
<pre>< WWW-Authenticate: Basic realm="Please enter your Earthdata Login credentials. If you do not have a Earthdata Login, create one at <a href="https://urs.earthdata.nasa.gov/users/new" moz-do-not-send="true">https://urs.earthdata.nasa.gov//users/new</a>"<o:p></o:p></pre>
<pre>...<o:p></o:p></pre>
<pre>ERROR 11: HTTP response code: 401<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>So I'm back to the Authentication problem. I do have an _netrc file (and .netrc btw) in my home dir as well as current dir but it does seem to find it. Is there something else that I must to in order to that file be found/used?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>-----Original Message-----<o:p></o:p></pre>
<pre>From: thomas bonfort <a href="mailto:thomas.bonfort@gmail.com" moz-do-not-send="true"><thomas.bonfort@gmail.com></a> <o:p></o:p></pre>
<pre>Sent: Tuesday, October 5, 2021 4:31 PM<o:p></o:p></pre>
<pre>To: Joaquim Manuel Freire Luís <a href="mailto:jluis@ualg.pt" moz-do-not-send="true"><jluis@ualg.pt></a><o:p></o:p></pre>
<pre>Subject: Re: [gdal-dev] How to access remote data that requires authentication?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>for the 206 there seems to be a similar issue posted here a few days ago, search for "Problem accessing NASA Cloud Optimized GeoTIFF data"<o:p></o:p></pre>
<pre>in the archives<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>On Tue, Oct 5, 2021 at 5:26 PM Joaquim Manuel Freire Luís <a href="mailto:jluis@ualg.pt" moz-do-not-send="true"><jluis@ualg.pt></a> wrote:<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>you should also change your password, now you have posted it on a <o:p></o:p></pre>
<pre>public mailing list :/<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Shit, thanks for spotting it.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>But it doesn't work with /vsicur/ neither (had tried it before). Now <o:p></o:p></pre>
<pre>the error is 206<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>gdalinfo <o:p></o:p></pre>
<pre>/vsicurl/<a href="https://user:pass@lpdaac.earthdata.nasa.gov/lp-prod-protected" moz-do-not-send="true">https://user:pass@lpdaac.earthdata.nasa.gov/lp-prod-protected</a><o:p></o:p></pre>
<pre>/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif<o:p></o:p></pre>
<pre>ERROR 11: HTTP response code: 206<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>On Tue, Oct 5, 2021 at 5:12 PM Joaquim Manuel Freire Luís <a href="mailto:jluis@ualg.pt" moz-do-not-send="true"><jluis@ualg.pt></a> wrote:<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre>Hi,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I’ve read a lot of the docs, tried many -co options but can’t get through this mystery.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I can access the data through GMT, which uses GDAL to do this job, <o:p></o:p></pre>
<pre>but can’t do it with GDAL directly<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>gdalinfo<o:p></o:p></pre>
<pre><a href="https://user:pass@lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30" moz-do-not-send="true">https://user:pass@lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30</a><o:p></o:p></pre>
<pre>.0 15/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>ERROR 1: HTTP error code : 401<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>gdalinfo failed - unable to open '<a href="https://jluis:abaixo0Earthdata@lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif" moz-do-not-send="true">https://jluis:abaixo0Earthdata@lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30.015/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif</a>'.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>So passing longin:password via url does not work either. But it does <o:p></o:p></pre>
<pre>if indirectly used<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>grdinfo<o:p></o:p></pre>
<pre><a href="https://user:pass@lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30" moz-do-not-send="true">https://user:pass@lpdaac.earthdata.nasa.gov/lp-prod-protected/HLSS30</a><o:p></o:p></pre>
<pre>.0 15/HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: Title: Grid imported via <o:p></o:p></pre>
<pre>GDAL<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: Command:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: Remark:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: Pixel node registration <o:p></o:p></pre>
<pre>used [Cartesian grid]<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: Grid file format: gd = <o:p></o:p></pre>
<pre>Import/export through GDAL<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: x_min: 499980 x_max:<o:p></o:p></pre>
<pre>609780 x_inc: 30 name: x n_columns: 3660<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: y_min: 4390200 y_max:<o:p></o:p></pre>
<pre>4500000 y_inc: 30 name: y n_rows: 3660<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: v_min: -0.0149 v_max:<o:p></o:p></pre>
<pre>0.8833 name: z<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>HLS.S30.T10TEK.2020273T190109.v1.5.B8A.tif: scale_factor: 0.0001<o:p></o:p></pre>
<pre>add_offset: 0 packed z-range: [-149,8833]<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>+proj=utm +zone=10 +ellps=WGS84 +units=m +no_defs<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Joaquim<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
</blockquote>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com" moz-do-not-send="true">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>