[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-user
Subject:    Re: [Qgis-user] How make reading from protocol to use /vsicurl_streaming/ instead of /vsicurl/?
From:       "Rahkonen Jukka (MML)" <jukka.rahkonen () maanmittauslaitos ! fi>
Date:       2021-09-22 7:14:20
Message-ID: 480cfbc165054aab8b87d4c08817e93f () maanmittauslaitos ! fi
[Download RAW message or body]

Hi,

I tried also with QGIS 3.21 nightly and it did not work any better for me. I do not \
see the Options panel as in the screenshot by Jorge. Somehow it feels like my QGIS \
does not manage to make the http connection. I am behind a proxy server but I can \
reach WMS and WMTS services through the proxy.

-Jukka Rahkonen-

Lähettäjä: Rahkonen Jukka (MML)
Lähetetty: tiistai 21. syyskuuta 2021 14.45
Vastaanottaja: qgis-user@lists.osgeo.org
Aihe: Re: [Qgis-user] How make reading from protocol to use /vsicurl_streaming/ \
instead of /vsicurl/?

Hi,

I have tried, but that does not work for me with QGIS 3.18. Opening the URL (with or \
without double quotes) as a file gives me just this:

Invalid Data Source: \
https://api.digitransit.fi/routing/v1/routers/hsl/isochrone?fromPlace=60.168,24.938&mo \
de=WALK,TRANSIT&date=2019-11-01&time=08:00:00&maxWalkDistance=500&cutoffSec=1800&cutoffSec=3600 \
is not a valid or recognized data source.

-Jukka-

Lähettäjä: Even Rouault \
<even.rouault@spatialys.com<mailto:even.rouault@spatialys.com>> Lähetetty: tiistai \
                21. syyskuuta 2021 13.56
Vastaanottaja: Rahkonen Jukka (MML) \
<jukka.rahkonen@maanmittauslaitos.fi<mailto:jukka.rahkonen@maanmittauslaitos.fi>>; \
                qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>
Aihe: Re: [Qgis-user] How make reading from protocol to use /vsicurl_streaming/ \
instead of /vsicurl/?


Jukka,

Somewhat counter-intuitively, you can use \
"https://api.digitransit.fi/routing/v1/routers/hsl/isochrone?fromPlace=60.168,24.938&m \
ode=WALK,TRANSIT&date=2019-11-01&time=08:00:00&maxWalkDistance=500&cutoffSec=1800&cutoffSec=3600" \
as a filename when using the File source type. This is due to GeoJSON driver having a \
particular logic when passed a http[s]:// filename to ingest it fully in memory.

Even
Le 21/09/2021 à 12:46, Rahkonen Jukka (MML) a écrit :
Hi,

This command gives a result with ogrinfo:

ogrinfo /vsicurl_streaming/"https://api.digitransit.fi/routing/v1/routers/hsl/isochron \
e?fromPlace=60.168,24.938&mode=WALK,TRANSIT&date=2019-11-01&time=08:00:00&maxWalkDista \
nce=500&cutoffSec=1800&cutoffSec=3600"<https://api.digitransit.fi/routing/v1/routers/h \
sl/isochrone?fromPlace=60.168,24.938&mode=WALK,TRANSIT&date=2019-11-01&time=08:00:00&maxWalkDistance=500&cutoffSec=1800&cutoffSec=3600> \
-al

If I try to use the URI part with QGIS with Add layer - Vector - Protocol - \
HTTP/HTTPS/FTP then QGIS seems to add automatically /vsicurl/ into the service \
request. With this service /vsicurl/ does not work but /vsicurl_streaming/ works. It \
there any way to force QGIS to use the streaming mode?

The debugging tools do not seem to log the network traffic from the "read from \
protocol" requests. Is that a right observation?

-Jukka Rahkonen-


_______________________________________________

Qgis-user mailing list

Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

--

http://www.spatialys.com

My software is free, but my time generally not.


[Attachment #3 (text/html)]

<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;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 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:blue;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML-esimuotoiltu Char";
	margin:0cm;
	font-size:10.0pt;
	font-family:"Courier New";}
span.HTML-esimuotoiltuChar
	{mso-style-name:"HTML-esimuotoiltu Char";
	mso-style-priority:99;
	mso-style-link:HTML-esimuotoiltu;
	font-family:Consolas;
	mso-fareast-language:EN-US;}
span.Shkpostityyli24
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.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="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I tried also with QGIS 3.21 nightly and it \
did not work any better for me. I do not see the Options panel as in the screenshot \
by Jorge. Somehow it feels like my QGIS does not manage to make the http connection. \
I am  behind a proxy server but I can reach WMS and WMTS services through the \
proxy.<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</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> tiistai 21. syyskuuta 2021 14.45<br>
<b>Vastaanottaja:</b> qgis-user@lists.osgeo.org<br>
<b>Aihe:</b> Re: [Qgis-user] How make reading from protocol to use \
/vsicurl_streaming/ instead of /vsicurl/?<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have tried, but that does not work for me \
with QGIS 3.18. Opening the URL (with or without double quotes) as a file gives me \
just this:<o:p></o:p></span></p> <p class="MsoNormal"><b><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></b></p> <p class="MsoNormal"><b><span \
lang="EN-US">Invalid Data Source: </span></b><a \
href="https://api.digitransit.fi/routing/v1/routers/hsl/isochrone?fromPlace=60.168,24. \
938&amp;mode=WALK,TRANSIT&amp;date=2019-11-01&amp;time=08:00:00&amp;maxWalkDistance=500&amp;cutoffSec=1800&amp;cutoffSec=3600"><span \
lang="EN-US">https://api.digitransit.fi/routing/v1/routers/hsl/isochrone?fromPlace=60. \
168,24.938&amp;mode=WALK,TRANSIT&amp;date=2019-11-01&amp;time=08:00:00&amp;maxWalkDistance=500&amp;cutoffSec=1800&amp;cutoffSec=3600</span></a><span \
lang="EN-US">  is not a valid or recognized data source.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</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>&nbsp;</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"> Even Rouault &lt;<a \
href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>&gt; <br>
<b>Lähetetty:</b> tiistai 21. syyskuuta 2021 13.56<br>
<b>Vastaanottaja:</b> Rahkonen Jukka (MML) &lt;<a \
href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>&gt;;
 <a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>
<b>Aihe:</b> Re: [Qgis-user] How make reading from protocol to use \
/vsicurl_streaming/ instead of /vsicurl/?<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p>Jukka,<o:p></o:p></p>
<p>Somewhat counter-intuitively, you can use &quot;<span lang="EN-US"><a \
href="https://api.digitransit.fi/routing/v1/routers/hsl/isochrone?fromPlace=60.168,24. \
938&amp;mode=WALK,TRANSIT&amp;date=2019-11-01&amp;time=08:00:00&amp;maxWalkDistance=50 \
0&amp;cutoffSec=1800&amp;cutoffSec=3600">https://api.digitransit.fi/routing/v1/routers \
/hsl/isochrone?fromPlace=60.168,24.938&amp;mode=WALK,TRANSIT&amp;date=2019-11-01&amp;t \
ime=08:00:00&amp;maxWalkDistance=500&amp;cutoffSec=1800&amp;cutoffSec=3600</a>&quot;  \
as a filename when using the File source type. This is due to GeoJSON driver having a \
particular logic when passed a http[s]:// filename to ingest it fully in \
memory.</span><o:p></o:p></p> <p><span lang="EN-US">Even</span><o:p></o:p></p>
<div>
<p class="MsoNormal">Le 21/09/2021 à 12:46, Rahkonen Jukka (MML) a \
écrit&nbsp;:<o:p></o:p></p> </div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">This command gives a result with \
ogrinfo:</span><o:p></o:p></p> <p class="MsoNormal"><span \
lang="EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal"><span \
lang="EN-US">ogrinfo /vsicurl_streaming/<a \
href="https://api.digitransit.fi/routing/v1/routers/hsl/isochrone?fromPlace=60.168,24. \
938&amp;mode=WALK,TRANSIT&amp;date=2019-11-01&amp;time=08:00:00&amp;maxWalkDistance=50 \
0&amp;cutoffSec=1800&amp;cutoffSec=3600">&quot;https://api.digitransit.fi/routing/v1/r \
outers/hsl/isochrone?fromPlace=60.168,24.938&amp;mode=WALK,TRANSIT&amp;date=2019-11-01 \
&amp;time=08:00:00&amp;maxWalkDistance=500&amp;cutoffSec=1800&amp;cutoffSec=3600&quot;</a>
                
 -al</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">If I try to use the URI part with QGIS with \
Add layer &#8211; Vector &#8211; Protocol &#8211; HTTP/HTTPS/FTP then QGIS seems to \
add automatically /vsicurl/ into the service request. With this service /vsicurl/ \
does not work but /vsicurl_streaming/  works. It there any way to force QGIS to use \
the streaming mode?</span><o:p></o:p></p> <p class="MsoNormal"><span \
lang="EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal"><span lang="EN-US">The \
debugging tools do not seem to log the network traffic from the &#8220;read from \
protocol&#8221; requests. Is that a right observation?</span><o:p></o:p></p> <p \
class="MsoNormal"><span lang="EN-US">&nbsp;</span><o:p></o:p></p> <p \
class="MsoNormal"><span lang="SV">-Jukka Rahkonen-</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-bottom:12.0pt"><span \
style="mso-fareast-language:FI"><o:p>&nbsp;</o:p></span></p> \
<pre>_______________________________________________<o:p></o:p></pre> <pre>Qgis-user \
mailing list<o:p></o:p></pre> <pre><a \
href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre>
 <pre>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
 <pre>Unsubscribe: <a \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
 </blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com">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>
</body>
</html>



_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

--===============6595906136812662205==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic