Re: [Qgis-user] Refresh layer at interval

2020-11-02 Thread nagyrob...@yahoo.com
Hei! Thank you for the answer! 
I presume everybody would like the same functionality as i wish to have. 

Sent from Yahoo Mail on Android 
 
  On Mon, Nov 2, 2020 at 12:27 PM, Raymond Nijssen 
wrote:   Hi Robert,

This has been asked before. I think currently this option only redraws 
the layer and does not (always) refresh the data. At least not for a 
remote layer.

It has been discussed before here:
https://lists.osgeo.org/pipermail/qgis-user/2020-April/045348.html

and here:
https://lists.osgeo.org/pipermail/qgis-developer/2020-April/060938.html

Kind regards,
Raymond


On 02-11-2020 11:20, nagyrob...@yahoo.com wrote:
> Thank you Áron.
> 
> Sent from Yahoo Mail on Android 
> <https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers⁡_wl=ym⁡_sub1=Internal⁡_sub2=Global_YGrowth⁡_sub3=EmailSignature>
> 
>    On Mon, Nov 2, 2020 at 11:09 AM, Aron Gergely
>     wrote:
>    ___
>    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
> 
> 
> ___
> 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
> 
___
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  
___
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

Re: [Qgis-user] [QGIS-Developer] Refresh layer at interval

2020-11-02 Thread nagyrob...@yahoo.com
Thank you a lot! 

Sent from Yahoo Mail on Android 
 
  On Mon, Nov 2, 2020 at 12:25 PM, Richard Duivenvoorde 
wrote:   
Ah, and to reproduce, I created a temporary(!) service:

https://duif.net/geotest/points.geojson

which gives you one random point on the world every time you refresh

Regards,

Richard


On 11/2/20 12:23 PM, Richard Duivenvoorde wrote:
> I think you hit an old issue:
> 
> https://github.com/qgis/QGIS/issues/28282
> and
> https://github.com/qgis/QGIS/issues/28744
> 
> Not sure if I can tackle it, but I can give it a try.
> If a core-dev has a clue, please let me know...
> 
> I think this should work, as this makes it supereasy to have a 'moving map'..
> 
> Regards,
> 
> Richard Duivenvoorde
> 
> 
> On 11/1/20 9:24 PM, nagyrob...@yahoo.com wrote:
>>
>>    Hi All!
>>
>>    I am trying to understand the behavior of Layer->Render-> Refresh layer 
>>at interval in QGIS
>>
>>      1. I sat up a flask rest api which serves a geojson.
>>      2. I added the geojson to QGIS via Add Layer-> 
>>          1. a. Protocol HTTP/cloud/etc 
>>          2. b. Type: HTTP 
>>          3. c.URI: localhost/points.geojson The points are represented on 
>>the map correctly
>>      3. I changed the layer->Properties->Rendering-> Refresh layer at 
>>interval (5 sec)
>>
>>    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?
>>
>>    |from flask import Flask from flask_restful import Api, Resource import 
>>json app = Flask(__name__) api = Api(app) class point(Resource): def 
>>get(self): with open('C:/points/venv/src/points.geojson') as json_file: data 
>>= json.load(json_file) return data api.add_resource(point,"/points.geojson") 
>>if __name__=="__main__": app.run(debug=True)|
>>
>>    |Robert Nagy|
>>
>>
>> ___
>> 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
>>
> 
> ___
> QGIS-Developer mailing list
> qgis-develo...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

  
___
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

Re: [Qgis-user] Refresh layer at interval

2020-11-02 Thread nagyrob...@yahoo.com
Thank you Áron. 

Sent from Yahoo Mail on Android 
 
  On Mon, Nov 2, 2020 at 11:09 AM, Aron Gergely 
wrote:   ___
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  
___
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

[Qgis-user] Refresh layer at interval

2020-11-01 Thread nagyrob...@yahoo.com


 Hi All!
I am trying to understand the behavior of Layer->Render-> Refresh layer at 
interval in QGIS   
   - I sat up a flask rest api which serves a geojson.
   - I added the geojson to QGIS via Add Layer-> 
   
   - a. Protocol HTTP/cloud/etc 
   - b. Type: HTTP 
   - c.URI: localhost/points.geojson The points are represented on the map 
correctly
   
   - I changed the layer->Properties->Rendering-> Refresh layer at interval (5 
sec)

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?
from flask import Flask
from flask_restful import Api, Resource
import json

app = Flask(__name__)
api = Api(app)

class point(Resource):

def get(self):
with open('C:/points/venv/src/points.geojson') as json_file:
data = json.load(json_file)
return data

api.add_resource(point,"/points.geojson")

if __name__=="__main__":
app.run(debug=True)Robert Nagy  
___
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

[Qgis-user] Refresh layer at interval

2020-10-28 Thread nagyrob...@yahoo.com
Hi All!
I am trying to understand the behavior of Layer->Render-> Refresh layer at 
interval in QGIS   
   - I sat up a flask rest api which serves a geojson.
   - I added the geojson to QGIS via Add Layer-> 
   
   - a. Protocol HTTP/cloud/etc 
   - b. Type: HTTP 
   - c.URI: localhost/points.geojson The points are represented on the map 
correctly
   
   - I changed the layer->Properties->Rendering-> Refresh layer at interval (5 
sec)

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?
from flask import Flask
from flask_restful import Api, Resource
import json

app = Flask(__name__)
api = Api(app)

class point(Resource):

def get(self):
with open('C:/points/venv/src/points.geojson') as json_file:
data = json.load(json_file)
return data

api.add_resource(point,"/points.geojson")

if __name__=="__main__":
app.run(debug=True)Robert Nagy

___
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