-
|
I am trying to get a metadata sheet from the Geoplateforme and then to save it locally. However, I get "Error: attempt to apply non-function" when executing the last line of the code below : ` CSW <- CSWClient$new("https://data.geopf.fr/csw", "2.0.2", logger = "INFO") md$save("xml_metadata/geopf/IGNF_OCS-GE.xml") ` I tried it on several R plateforms. Am I missing something ? Thanks for the help ! |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 1 reply
-
|
Note that when trying with another catalogue, it works... eg, the following code does work : CSW2 <- CSWClient$new("https://sdi.eea.europa.eu/catalogue/srv/eng/csw", "2.0.2", logger = "INFO") md <- CSW2$getRecordById("4635cd57-65d9-47b4-b18e-98a781ef27bb", outputSchema = "http://www.isotc211.org/2005/gmd") ` |
Beta Was this translation helpful? Give feedback.
-
|
It is a Geonetwork: https://data.geopf.fr/geonetwork/srv/fre/csw?service=CSW&request=GetCapabilities&version=2.0.2 Try using the following url to instantiate your CSW client: https://data.geopf.fr/geonetwork/srv/fre/csw It should work |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your answer. |
Beta Was this translation helpful? Give feedback.
-
CSW <- CSWClient$new("https://data.geopf.fr/csw", "2.0.2", logger = "DEBUG")
md <- CSW$getRecordById("IGNF_OCS-GE", outputSchema = "http://www.isotc211.org/2005/gmd")works for me |
Beta Was this translation helpful? Give feedback.
-
|
Yes, works for me too up to that point. Do you get the same error ? Strange thing is that it works well with other catalogues (eg #145 (comment)) |
Beta Was this translation helpful? Give feedback.
-
|
Which version of ows4R and geometa are you using?
Le lun. 30 juin 2025, 08:06, Paul Taconet ***@***.***> a
écrit :
… *ptaconet* left a comment (eblondel/ows4R#145)
<#145 (comment)>
Yes, works for me too up to that point.
But then md$encode() or md$save("IGNF_OCS-GE.xml") does not work (getting
"Error: attempt to apply non-function").
Do you get the same error ?
Strange thing is that it works well with other catalogues (eg #145
(comment)
<#145 (comment)>)
—
Reply to this email directly, view it on GitHub
<#145 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKDK3FJ7IUNJKEYOENAPET3GDHURAVCNFSM6AAAAACAINML7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJXHEYTENZYGQ>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
ows4R : v0.5 Also note that I get the same errors on the imarine d4science RStudio server with ows4R v0.3-5 and geometa v0.7-1 |
Beta Was this translation helpful? Give feedback.
-
|
Forget about this remote server, it's quite outdated from what I see in term of package version. Use your setting, If you set the logger = "DEBUG", can you copy paste what you get in your R Console (including red messages including the payload sent to CSW server, and any information you see there). |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
So weird.... What if you you look at |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
so you have all the methods here... |
Beta Was this translation helpful? Give feedback.
-
|
@ptaconet can you try after updating both ows4R/geometa packages (from CRAN). |
Beta Was this translation helpful? Give feedback.
-
|
Hi Still not working after updating ows4r and geometa from CRAN.. :S |
Beta Was this translation helpful? Give feedback.
-
|
Ok thanks, i've isolated the issue (that relates to geometa). I will let you know asap, when I have a fix ready. |
Beta Was this translation helpful? Give feedback.
-
|
Dear @ptaconet I've investigated the issue. For some unknown reasons the record you fetch with ows4R (wiht a POST request operated on the CSW) doesn't match the what we get through a GET request. https://data.geopf.fr/csw?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&Id=IGNF_OCS-GE&outputSchema=http://www.isotc211.org/2005/gmd However, it could also be due to some internal conversion as I suspect the original metadata is provided in ISO 19115-3 and not ISO 19139. See equivalent GET request in ISO 19115-3: https://data.geopf.fr/csw?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&Id=IGNF_OCS-GE&outputSchema=http://standards.iso.org/iso/19115/-3/mdb/2.0 In the get record request, try to change the outputschema and set it to CSW <- CSWClient$new("https://data.geopf.fr/csw", "2.0.2", logger = "DEBUG")
md <- CSW$getRecordById("IGNF_OCS-GE", outputSchema = "http://standards.iso.org/iso/19115/-3/mdb/2.0")
md$save("test.xml") |
Beta Was this translation helpful? Give feedback.
Dear @ptaconet I've investigated the issue. For some unknown reasons the record you fetch with ows4R (wiht a POST request operated on the CSW) doesn't match the what we get through a GET request. https://data.geopf.fr/csw?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&Id=IGNF_OCS-GE&outputSchema=http://www.isotc211.org/2005/gmd
I suspect there is an issue with this catalogue
However, it could also be due to some internal conversion as I suspect the original metadata is provided in ISO 19115-3 and not ISO 19139. See equivalent GET request in ISO 19115-3: https://data.geopf.fr/csw?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&Id=IGNF_OCS-GE&outputSchema=http://standards.iso.org/iso/19115…