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

OWSHttpRequest GET doesn't detect existing params and make GetCapabilities fail

pobsteta opened this issue · comments

@pobsteta it should be fixed now. Do you confirm it on your side?

Now i have this error

wfs_z1 <- "http://ogc.geo-ide.developpement-durable.gouv.fr/wxs?map=/opt/data/carto/geoide-catalogue/1.4/org_5443264/e098f26f-4cf4-437e-99d9-6b2f500eb4f7.internet.map"
z1 <- WFSClient$new(wfs_z1, serviceVersion = "2.0.0")
Error in if (nrow(namespace) == 0) { : argument is of length zero

hum weird, make sure to restart well your R session (eventually Rstudio session)
Also please retry adding logger DEBUG when creating the WFSClient:

z1 <- WFSClient$new(wfs_z1, serviceVersion = "2.0.0", logger = "DEBUG")

restart R and RStudio, reinstall ows4R and the same error on windows ?

z1 <- WFSClient$new(wfs_z1, serviceVersion = "2.0.0", logger = "DEBUG")
[ows4R][INFO] OWSGetCapabilities - Fetching http://ogc.geo-ide.developpement-durable.gouv.fr/wxs?map=/opt/data/carto/geoide-catalogue/1.4/org_5443264/e098f26f-4cf4-437e-99d9-6b2f500eb4f7.internet.map?service=WFS&version=2.0.0&request=GetCapabilities
-> GET /wxs?map=/opt/data/carto/geoide-catalogue/1.4/org_5443264/e098f26f-4cf4-437e-99d9-6b2f500eb4f7.internet.map?service=WFS&version=2.0.0&request=GetCapabilities HTTP/1.1
-> Host: ogc.geo-ide.developpement-durable.gouv.fr
-> User-Agent: libcurl/7.84.0 r-curl/5.0.2 httr/1.4.7
-> Accept-Encoding: deflate, gzip
-> Cookie: SRV=bfa7847a-5406-4e50-b277-8eb799e6e3b1
-> Accept: application/json, text/xml, application/xml, /
->
<- HTTP/1.1 301 Moved Permanently
<- Date: Tue, 10 Oct 2023 13:24:44 GMT
<- Server: Apache
<- Location: https://ogc.geo-ide.developpement-durable.gouv.fr/wxs?map=/opt/data/carto/geoide-catalogue/1.4/org_5443264/e098f26f-4cf4-437e-99d9-6b2f500eb4f7.internet.map?service=WFS&version=2.0.0&request=GetCapabilities
<- Content-Length: 422
<- Content-Type: text/html; charset=iso-8859-1
<-
-> GET /wxs?map=/opt/data/carto/geoide-catalogue/1.4/org_5443264/e098f26f-4cf4-437e-99d9-6b2f500eb4f7.internet.map?service=WFS&version=2.0.0&request=GetCapabilities HTTP/1.1
-> Host: ogc.geo-ide.developpement-durable.gouv.fr
-> User-Agent: libcurl/7.84.0 r-curl/5.0.2 httr/1.4.7
-> Accept-Encoding: deflate, gzip
-> Cookie: SRV=bfa7847a-5406-4e50-b277-8eb799e6e3b1
-> Accept: application/json, text/xml, application/xml, /
->
<- HTTP/1.1 200 OK
<- Date: Tue, 10 Oct 2023 13:24:43 GMT
<- Server: Apache-Coyote/1.1
<- content-type: text/html
<- Content-Encoding: gzip
<- Vary: Accept-Encoding
<- Content-Length: 312
<-
Error in if (nrow(namespace) == 0) { : argument is of length zero

How did you reinstall ows4R?
try using remotes::install_github('eblondel/ows4R')

Sounds it is installing the past dev version

It'ok now, install fansi install failed first, now it's ok !

Great!, i wait you do some more testing if you want, and i'll push right away a revision to CRAN for this fix. I've tested the getFeatures and it worked well. Cheers