eblondel / ows4R

R Interface for OGC Web-Services (OWS)

Home Page:https://eblondel.github.io/ows4R/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to indicate a download is under way?

maelle opened this issue · comments

I was considering adding a message indicating downloads are in progress (not a progress bar, just a message). Is it something that could be an option via ows4R, e.g. at the stage of the client creation?

When creating the WFSClient, you can set logger = "INFO", which gives this kind of message, whatever the request is performed. The download message is handled through a generic 'Fetching...' message. Isn't it enough?

library(ows4R)
WFS = WFSClient$new(url = "https://www.fao.org/fishery/geoserver/fifao/wfs", serviceVersion = "2.0.0", logger = "INFO")
##[ows4R][INFO] OWSGetCapabilities - Fetching https://www.fao.org/fishery/geoserver/fifao/wfs?service=WFS&version=1.0.0&request=GetCapabilities 
sf = WFS$getFeatures("fifao:FAO_MAJOR")
##[ows4R][INFO] WFSClient - Fetching features for 'fifao:FAO_MAJOR' ... 
##[ows4R][INFO] WFSDescribeFeatureType - Fetching https://www.fao.org/fishery/geoserver/fifao/wfs?service=WFS&version=1.0.0&typeName=fifao:FAO_MAJOR&request=DescribeFeatureType 
##[ows4R][INFO] WFSGetFeature - Fetching https://www.fao.org/fishery/geoserver/fifao/wfs?service=WFS&version=1.0.0&typeName=fifao:FAO_MAJOR&request=GetFeature

Thank you! I'll ask the team :-)

A bit off-topic but I'm curious: is it possible to pass to print a progress bar @eblondel ? I think ows4R uses httr: could progress() be passed to getFeatures somehow? https://httr.r-lib.org/reference/progress.html?q=progress#null

yes, progress bar would be useful as enhancement

Awesome! Thanks :)