<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Robert,<br>
<br>
I do not know the answer to your question, but I think you are
asking in the wrong list.<br>
You may have better success on `qgis-developer` (I added it in, so
this is getting cross-posted)<br>
<br>
<div class="moz-cite-prefix">On 01/11/2020 21:24,
<a class="moz-txt-link-abbreviated" href="mailto:nagyrobi_r@yahoo.com">nagyrobi_r@yahoo.com</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:866595688.1113094.1604262286806@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div id="ymail_android_signature"><br>
</div>
<blockquote style="margin: 0 0 20px 0;">
<div style="padding: 10px 0 0 20px; margin: 10px 0 0 0;
border-left: 1px solid #6D00F6;">
<div id="yiv6673649131">
<div class="yiv6673649131yahoo-style-wrap"
style="font-family:times new roman, new york, times,
serif;font-size:13px;">
<div dir="ltr"
id="yMail_cursorElementTracker_1604262225336">
<div
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Arial,
Helvetica,
sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,
39, 41);background-color:rgb(249, 248, 246);"
dir="ltr">Hi All!</div>
<div
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Arial,
Helvetica,
sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,
39, 41);background-color:rgb(249, 248, 246);"
dir="ltr"><br>
</div>
<div
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Arial,
Helvetica,
sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,
39, 41);background-color:rgb(249, 248, 246);">I am
trying to understand the behavior of
Layer->Render-> Refresh layer at interval in
QGIS</div>
<ol
style="margin-top:0px;margin-right:0px;margin-left:30px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Arial,
Helvetica,
sans-serif;font-size:15px;vertical-align:baseline;list-style-position:initial;list-style-image:initial;color:rgb(36,
39, 41);background-color:rgb(249, 248, 246);">
<li
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">I
sat up a flask rest api which serves a geojson.</li>
<li
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">I
added the geojson to QGIS via Add Layer-> </li>
<ol>
<li
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">a.
Protocol HTTP/cloud/etc </li>
<li
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">b.
Type: HTTP </li>
<li
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">c.URI:
localhost/points.geojson The points are
represented on the map correctly</li>
</ol>
<li
style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">I
changed the layer->Properties->Rendering->
Refresh layer at interval (5 sec)</li>
</ol>
<p
style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-family:Arial,
Helvetica,
sans-serif;font-size:15px;vertical-align:baseline;clear:both;color:rgb(36,
39, 41);background-color:rgb(249, 248, 246);"
id="yMail_cursorElementTracker_1604262269236">I would
have expected that there would be a call every 5
seconds towards the server and the map data would be
updated accordingly. But the layer does not get
refreshed. I don't see any changes neither when I
remove a point from the json file on my local drive,
nor if I change an attribute. If I press F5 then the
canvas refreshes and it automatically loads the new
data and I can see the changes. Is this the behavior
that is wanted or am I misunderstanding the function
of this tool? It seems like the data is cached
somewhere?</p>
<pre class="yiv6673649131ydpadbbb2c4default yiv6673649131ydpadbbb2c4s-code-block yiv6673649131ydpadbbb2c4hljs yiv6673649131ydpadbbb2c4python" style="margin-top:0px;margin-bottom:0px;padding:12px;border:0px;font-stretch:inherit;line-height:1.30769;font-family:Consolas, Menlo, Monaco, Sans Vera Sans monospace, sans-serif;vertical-align:baseline;width:auto;border-radius:5px;min-height:600px;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;background-color:transparent;white-space:inherit;" id="yMail_cursorElementTracker_1604262232265"><span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">from</span> flask <span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">import</span> Flask
<span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">from</span> flask_restful <span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">import</span> Api, Resource
<span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">import</span> json
app = Flask(__name__)
api = Api(app)
<span class="yiv6673649131ydpadbbb2c4hljs-class" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;"><span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">class</span> <span class="yiv6673649131ydpadbbb2c4hljs-title" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">point</span>(<span class="yiv6673649131ydpadbbb2c4hljs-params" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">Resource</span>):</span>
<span class="yiv6673649131ydpadbbb2c4hljs-function" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;"><span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">def</span> <span class="yiv6673649131ydpadbbb2c4hljs-title" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">get</span>(<span class="yiv6673649131ydpadbbb2c4hljs-params" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">self</span>):</span>
<span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">with</span> open(<span class="yiv6673649131ydpadbbb2c4hljs-string" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">'C:/points/venv/src/points.geojson'</span>) <span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">as</span> json_file:
data = json.load(json_file)
<span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">return</span> data
api.add_resource(point,<span class="yiv6673649131ydpadbbb2c4hljs-string" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">"/points.geojson"</span>)
<span class="yiv6673649131ydpadbbb2c4hljs-keyword" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">if</span> __name__==<span class="yiv6673649131ydpadbbb2c4hljs-string" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;">"__main__"</span>:
app.run(debug=<span class="yiv6673649131ydpadbbb2c4hljs-literal" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;" id="yMail_cursorElementTracker_1604262235533">True)</span></code></pre>
<pre class="yiv6673649131ydpadbbb2c4default yiv6673649131ydpadbbb2c4s-code-block yiv6673649131ydpadbbb2c4hljs yiv6673649131ydpadbbb2c4python" style="margin-top:0px;margin-bottom:0px;padding:12px;border:0px;font-stretch:inherit;line-height:1.30769;font-family:Consolas, Menlo, Monaco, Sans Vera Sans monospace, sans-serif;vertical-align:baseline;width:auto;border-radius:5px;min-height:600px;"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;background-color:transparent;white-space:inherit;"><span class="yiv6673649131ydpadbbb2c4hljs-literal" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;" id="yMail_cursorElementTracker_1604262239430">Robert Nagy</span></code></pre>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<title>Email Signature</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
Kind Regards,<br>
<br>
Aron Gergely<br>
+31 (0) 6 38 70 97 66<br>
<br>
<b>Rasterra</b> | <a href="https://www.rasterra.nl">www.rasterra.nl</a><a><br>
</a></div>
</body>
</html>