eblondel / ows4R

R Interface for OGC Web-Services (OWS)
https://eblondel.github.io/ows4R/
Other
36 stars 8 forks source link

Implement progress bar in OWS data requests #73

Closed eblondel closed 2 years ago

eblondel commented 2 years ago

@salvafern I just made some tests, it's easy to add httr::progress() but the issue is that we don't know a priori the size of the file requested, like WFS features or WCS coverage, which means the progress bar in % can't be added, the httr::progress() reports on the amount of data downloaded (file size). Not sure if it's what you need

salvafern commented 2 years ago

Ah ok I see. No, indeed this is not what I was thinking of, but if it is not much work could you add it anyways? That way we could know that the process is still alive when doing large requests.

eblondel commented 2 years ago

I've added it to GET requests for you to test. The issue with OGC services is that we are handling dynamic data services, where server doesn't communicate the size of the data requested. In this situation, httr::progress is not capable to configure a 0 to 100% progress bar, and can only update on the amount of data downloaded, which is not bad indeed, but not ideal... We can keep this open, and I'll dig a bit, at least in Geoserver, to see how far we can go.

salvafern commented 2 years ago

I have been testing and I think it is good to have the option, even if it is not an actual progress bar but just the bytes downloaded. Maybe keep it as an option? (e.g. when logger = INFO)

eblondel commented 2 years ago

sure no problem

eblondel commented 2 years ago

@salvafern it's implemented

salvafern commented 2 years ago

Great, thanks!!