Skip to content

Commit 58ff1ba

Browse files
authored
Stac harvester doi (#9089)
* add test * use doi as cit:identifier * use doi as onlineResource * move doi in identification section two levels up so to allow its indexation * rebase's consequence
1 parent f1c1a81 commit 58ff1ba

File tree

4 files changed

+397
-0
lines changed

4 files changed

+397
-0
lines changed

schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/convert/stac-to-iso19115-3.xsl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
1010
xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
1111
xmlns:gex="http://standards.iso.org/iso/19115/-3/gex/1.0"
12+
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
13+
xmlns:xlink="http://www.w3.org/1999/xlink"
1214
xmlns:gml="http://www.opengis.net/gml/3.2"
1315
xmlns:java-xsl-util="java:org.fao.geonet.util.XslUtil"
1416
exclude-result-prefixes="#all">
@@ -142,6 +144,21 @@
142144
else 'STAC Collection'" />
143145
</gco:CharacterString>
144146
</cit:title>
147+
<xsl:if test="sci_doi">
148+
<cit:identifier>
149+
<mcc:MD_Identifier>
150+
<mcc:code>
151+
<gcx:Anchor xlink:href="{concat('https://doi.org/', sci_doi)}"><xsl:value-of select="sci_doi"/></gcx:Anchor>
152+
</mcc:code>
153+
<mcc:codeSpace>
154+
<gco:CharacterString>doi.org</gco:CharacterString>
155+
</mcc:codeSpace>
156+
<mcc:description>
157+
<gco:CharacterString>Digital Object Identifier (DOI)</gco:CharacterString>
158+
</mcc:description>
159+
</mcc:MD_Identifier>
160+
</cit:identifier>
161+
</xsl:if>
145162
</cit:CI_Citation>
146163
</mri:citation>
147164
<mri:abstract>
@@ -355,6 +372,21 @@
355372
</cit:CI_OnlineResource>
356373
</mrd:onLine>
357374
</xsl:for-each>
375+
<xsl:if test="sci_doi">
376+
<mrd:onLine>
377+
<cit:CI_OnlineResource>
378+
<cit:linkage>
379+
<gco:CharacterString><xsl:value-of select="concat('https://doi.org/', sci_doi)"/></gco:CharacterString>
380+
</cit:linkage>
381+
<cit:protocol>
382+
<gco:CharacterString>DOI</gco:CharacterString>
383+
</cit:protocol>
384+
<cit:name>
385+
<gco:CharacterString>Digital Object Identifier (DOI)</gco:CharacterString>
386+
</cit:name>
387+
</cit:CI_OnlineResource>
388+
</mrd:onLine>
389+
</xsl:if>
358390
</mrd:MD_DigitalTransferOptions>
359391
</mrd:transferOptions>
360392
</mrd:MD_Distribution>

schemas/iso19115-3.2018/src/test/java/org/fao/geonet/schema/StacConversionTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ public void sentinel2RadiometricIndices() throws Exception {
5252
transformAndCompare("convert/stac-to-iso19115-3.xsl", "sentinel-2-radiometric-indices-input.xml", "sentinel-2-radiometric-indices-output.xml");
5353
}
5454

55+
@Test
56+
public void biomassAnWood() throws Exception {
57+
transformAndCompare("convert/stac-to-iso19115-3.xsl", "biomass-and-wood-input.xml", "biomass-and-wood-output.xml");
58+
}
59+
5560
private void transformAndCompare(String scriptName, String inputFileName, String expectedFileName) throws Exception {
5661
Path xslFile = getResourceInsideSchema(scriptName);
5762
Path xmlFile = getResource("stacHarvester/" + inputFileName);
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<record>
3+
<extent>
4+
<spatial>
5+
<bbox>
6+
<array>-5.859595786155143</array>
7+
<array>40.08242510778443</array>
8+
<array>11.175837021340103</array>
9+
<array>51.130598314425725</array>
10+
</bbox>
11+
</spatial>
12+
<temporal>
13+
<interval>
14+
<array>2018-01-01T00:00:00Z</array>
15+
<array>2024-12-30T00:00:00Z</array>
16+
</interval>
17+
</temporal>
18+
</extent>
19+
<stac_version>1.1.0</stac_version>
20+
<sci_doi>10.5281/zenodo.15489231</sci_doi>
21+
<keywords>forest</keywords>
22+
<keywords>biomass</keywords>
23+
<keywords>height</keywords>
24+
<keywords>volume</keywords>
25+
<keywords>France</keywords>
26+
<keywords>remote sensing</keywords>
27+
<keywords>LIDAR</keywords>
28+
<keywords>Sentinel</keywords>
29+
<keywords>GEDI</keywords>
30+
<description>FORMS-T : Height, aboveground biomass and wood volume density time-series at 10 to 30 m resolution over france (2018-2024)</description>
31+
<sci_citation>Schwartz, M. (2025). FORMS-T: Forest Multiple Source height, wood volume, and biomass time-series (2018-2024) in France at 10 to 30 m resolution [Data set]. Zenodo. https://doi.org/10.5281/zenodo.15489231</sci_citation>
32+
<type>Collection</type>
33+
<title>FORMS-T</title>
34+
<license>other</license>
35+
<assets>
36+
<QL>
37+
<roles>thumbnail</roles>
38+
<description>collection thumbnail</description>
39+
<href>https://i.ibb.co/PvjGX01V/France-visu.png</href>
40+
</QL>
41+
</assets>
42+
<contact>
43+
<organization>Laboratoire des Sciences du Climat et de l'Environnement, LSCE/IPSL,CEA-CNRS-UVSQ, Université Paris-Saclay,Gif-sur-Yvette,91191, France</organization>
44+
<name>Martin Schwartz</name>
45+
<email>martin.schwartz@lsce.ipsl.fr</email>
46+
</contact>
47+
<links>
48+
<rel>items</rel>
49+
<href>https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/collections/forms-t/items</href>
50+
<type>application/geo+json</type>
51+
</links>
52+
<links>
53+
<rel>parent</rel>
54+
<href>https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/</href>
55+
<type>application/json</type>
56+
</links>
57+
<links>
58+
<rel>root</rel>
59+
<href>https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/</href>
60+
<type>application/json</type>
61+
</links>
62+
<links>
63+
<rel>self</rel>
64+
<href>https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/collections/forms-t</href>
65+
<type>application/json</type>
66+
</links>
67+
<links>
68+
<rel>items</rel>
69+
<href>https://api.stac.teledetection.fr/collections/forms-t/items</href>
70+
<type>application/geo+json</type>
71+
</links>
72+
<links>
73+
<rel>http://www.opengis.net/def/rel/ogc/1.0/queryables</rel>
74+
<href>https://api.stac.teledetection.fr/collections/forms-t/queryables</href>
75+
<type>application/schema+json</type>
76+
<title>Queryables</title>
77+
</links>
78+
<links>
79+
<rel>http://www.opengis.net/def/rel/ogc/1.0/queryables</rel>
80+
<href>https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr/collections/forms-t/queryables</href>
81+
<type>application/schema+json</type>
82+
<title>Queryables</title>
83+
</links>
84+
<id>forms-t</id>
85+
<stac_extensions>https://stac-extensions.github.io/scientific/v1.0.0/schema.json</stac_extensions>
86+
<providers>
87+
<roles>producer</roles>
88+
<name>Laboratoire des Sciences du Climat et de l'Environnement</name>
89+
<url>https://www.lsce.ipsl.fr/</url>
90+
</providers>
91+
</record>

0 commit comments

Comments
 (0)