stac-processor-gdmsar 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stac_processor_gdmsar-0.0.2/LICENCE.txt +145 -0
- stac_processor_gdmsar-0.0.2/PKG-INFO +215 -0
- stac_processor_gdmsar-0.0.2/README.md +44 -0
- stac_processor_gdmsar-0.0.2/pyproject.toml +66 -0
- stac_processor_gdmsar-0.0.2/setup.cfg +4 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/__about__.py +3 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/__init__.py +11 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/app.py +96 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/discover.py +52 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/id.py +7 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/process.py +46 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/__init__.py +21 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/asset_file.py +71 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/base_component_processor.py +611 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/base_component_prototype.py +250 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/common_component_prototype.py +191 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/compat.py +25 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/component_factory.py +245 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/components.py +811 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/explorer/__init__.py +29 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/explorer/base_explorer.py +52 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/explorer/local_explorer.py +53 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/explorer/source_explorer.py +129 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/fetch.py +77 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/metadata_model.py +204 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/metadata_models.py +594 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/stac_io.py +30 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/processor/template.py +136 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/__init__.py +0 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/atmospheric_phase_screen.md +17 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/auxiliary_data_collection.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/digital_elevation_model.md +6 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/filtered_wrapped_interferogram.md +14 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/filtered_wrapped_interferogram_collection.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/interferogram.md +8 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/interferogram_collection.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/lookup_table_sat_to_ground_coordinates.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/los_displacement_time_series.md +13 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/map_of_los_vector_enu.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/map_of_los_vector_neu.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/mean_velocity_map.md +14 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/network_misclosures.md +19 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/root_catalog.md +7 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/run_collection.md +10 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/run_geocoded_collection.md +11 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/spatial_coherence.md +14 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/spatial_coherence_collection.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/temporal_coherence.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/time_series.md +13 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/unwrapped_interferogram.md +14 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/unwrapped_interferogram_collection.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/wrapped_interferogram.md +14 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/templates/wrapped_interferogram_collection.md +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar/version.py +7 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar.egg-info/PKG-INFO +215 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar.egg-info/SOURCES.txt +58 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar.egg-info/dependency_links.txt +1 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar.egg-info/requires.txt +14 -0
- stac_processor_gdmsar-0.0.2/stac_processor_gdmsar.egg-info/top_level.txt +1 -0
- stac_processor_gdmsar-0.0.2/tests/test.py +102 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
OPEN LICENCE 2.0/LICENCE OUVERTE 2.0
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
"Reuse" of the "Information" covered by this licence
|
|
5
|
+
|
|
6
|
+
The "Grantor" grants the "Reuser" the free, non-exclusive right to "Reuse" the
|
|
7
|
+
"Information" subject of this licence, for commercial or non-commercial
|
|
8
|
+
purposes, worldwide and for an unlimited period, in accordance with the
|
|
9
|
+
conditions stated below.
|
|
10
|
+
|
|
11
|
+
The "Reuser" is free to reuse the "Information":
|
|
12
|
+
|
|
13
|
+
- To reproduce it, copy it.
|
|
14
|
+
- To adapt, modify, retrieve and transform it in order to create "derived
|
|
15
|
+
information", products and services.
|
|
16
|
+
- To share, disseminate, redistribute, publish and transmit it.
|
|
17
|
+
- To exploit it for commercial purposes, e.g., by combining it with other
|
|
18
|
+
information, or by including it in his/her own product or application.
|
|
19
|
+
|
|
20
|
+
Subject to:
|
|
21
|
+
|
|
22
|
+
- An acknowledgement of the authorship of the "Information": its source (at
|
|
23
|
+
least, the name of the "Grantor") and the date of the most recent update of
|
|
24
|
+
the reused "Information".
|
|
25
|
+
|
|
26
|
+
Specifically, the "Reuser" may satisfy this condition by pointing, via a
|
|
27
|
+
hypertext link, to the source of the "Information" and so supplying an actual
|
|
28
|
+
acknowledgement of its authorship.
|
|
29
|
+
|
|
30
|
+
For example:
|
|
31
|
+
|
|
32
|
+
"Ministry of xxx—Original data downloaded from
|
|
33
|
+
'http://www.data.gouv.fr/fr/datasets/xxx/', updated on 14 February 2017".
|
|
34
|
+
|
|
35
|
+
This acknowledgement of authorship does not confer any official status on the
|
|
36
|
+
"Reuse" of the "Information", and must not suggest any sort of recognition or
|
|
37
|
+
endorsement on the part of the "Grantor", or any other public entity, of the
|
|
38
|
+
"Reuser" or of their "Reuse".
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
Personal data
|
|
42
|
+
|
|
43
|
+
The "Information" made available may contain "Personal data" that may be
|
|
44
|
+
subject to "Reuse". If this is the case, the "Grantor" informs the "Reuser"
|
|
45
|
+
about its existence. The "Information" may be freely reused, within the rights
|
|
46
|
+
granted by this licence, subject to compliance with the legal framework
|
|
47
|
+
relating to personal data protection.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Intellectual property rights
|
|
51
|
+
|
|
52
|
+
It is guaranteed to The "Reuser" that potential "Intellectual property rights"
|
|
53
|
+
held by third parties or by the "Grantor" on "Information" do not interfere
|
|
54
|
+
with the rights granted by this licence.
|
|
55
|
+
|
|
56
|
+
When the "Grantor" holds transferable "Intellectual property rights" on the
|
|
57
|
+
"Information", he/she assigns these to the "Reuser" on a non-exclusive basis,
|
|
58
|
+
free of charge, worldwide, for the entire duration of the "Intellectual
|
|
59
|
+
property rights", and the "Reuser" is free to use the "Information" for any
|
|
60
|
+
purpose that complies with the rights and conditions defined in this licence.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
Liability
|
|
64
|
+
|
|
65
|
+
The "Information" is made available as it is produced or received by the
|
|
66
|
+
"Grantor", without any other express or tacit guarantee than those set out in
|
|
67
|
+
this licence. The "Grantor" does not guarantee the absence of errors or
|
|
68
|
+
inaccuracies in the "Information", nor a continuous supply of the
|
|
69
|
+
"Information". He/she cannot be held responsible for any loss, prejudice or
|
|
70
|
+
damage of any kind caused to third parties as a result of the "Reuse".
|
|
71
|
+
|
|
72
|
+
The "Reuser" is solely responsible for the "Reuse" of the "Information". This
|
|
73
|
+
"Reuse" must not mislead third parties as to the contents of the "Information",
|
|
74
|
+
its source or its date of update.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Applicable legislation
|
|
78
|
+
|
|
79
|
+
This licence is governed by French law.
|
|
80
|
+
|
|
81
|
+
Compatibility of this licence
|
|
82
|
+
|
|
83
|
+
This licence has been designed to be compatible with any free licence that at
|
|
84
|
+
least requires an acknowledgement of authorship, and specifically with the
|
|
85
|
+
previous version of this licence as well as with the following licences: United
|
|
86
|
+
Kingdom's "Open Government Licence" (OGL), Creative Commons' "Creative Commons
|
|
87
|
+
Attribution" (CC-BY) and Open Knowledge Foundation's "Open Data Commons
|
|
88
|
+
Attribution" (ODC-BY).
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
Definitions
|
|
92
|
+
|
|
93
|
+
Within the meaning of this licence, are to be considered as:
|
|
94
|
+
|
|
95
|
+
- The "Grantor": any person granting the right to "Reuse" "Information" under
|
|
96
|
+
the rights and conditions set out in this licence.
|
|
97
|
+
- The "Information":
|
|
98
|
+
- any public information contained in documents disclosed or published by any
|
|
99
|
+
administration referred to in the first paragraph of Article L. 300-2 of
|
|
100
|
+
the "Code des relations entre le public et l'administration (CRPA)",
|
|
101
|
+
- any information made available by any person under the terms and conditions
|
|
102
|
+
of this licence.
|
|
103
|
+
- The "Reuse": the use of the "Information" for other purposes than those for
|
|
104
|
+
which it was produced or received.
|
|
105
|
+
- The "Reuser": any person reusing the "Information" in accordance with the
|
|
106
|
+
conditions of this licence.
|
|
107
|
+
- "Personal data": any information relating to an identified or identifiable
|
|
108
|
+
natural person who may be identified directly or indirectly. Its "Reuse" is
|
|
109
|
+
conditional on the respect of the existing legal framework.
|
|
110
|
+
- "Derived information": any new data or information created directly from the
|
|
111
|
+
"Information" or from a combination of the "Information" and other data or
|
|
112
|
+
information not subject to this licence.
|
|
113
|
+
- "Intellectual property rights": all rights identified as such under the "Code
|
|
114
|
+
de la propriété intellectuelle" (including copyright, rights related to
|
|
115
|
+
copyright, sui generis rights of database producers, etc.).
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
About this licence
|
|
119
|
+
|
|
120
|
+
This licence is intended to be used by administrations for the reuse of their
|
|
121
|
+
public information. It can also be used by any individual wishing to supply
|
|
122
|
+
"Information" under the conditions defined in this licence.
|
|
123
|
+
|
|
124
|
+
France has a comprehensive legal framework aiming at the spontaneous
|
|
125
|
+
dissemination by the administrations of their public information in order to
|
|
126
|
+
ensure the widest possible reuse of this information.
|
|
127
|
+
|
|
128
|
+
The right to "Reuse" the administrations' "Information" is governed by the
|
|
129
|
+
"Code des relations entre le public et l'administration (CRPA)".
|
|
130
|
+
|
|
131
|
+
This licence facilitates the unrestricted and free of charge reuse of public
|
|
132
|
+
information and is one of the licences which can be used by the administration
|
|
133
|
+
pursuant to the decree issued under article L. 323-2 of the CRPA.
|
|
134
|
+
|
|
135
|
+
Under the Prime Minister's authority, the Etalab mission is mandated to open up
|
|
136
|
+
the maximum amount of data held by State administrations and public
|
|
137
|
+
institutions. Etalab has drawn up the Open Licence to facilitate the
|
|
138
|
+
unrestricted and free of charge reuse of public information, as defined by
|
|
139
|
+
article L. 321-1 of the CRPA.
|
|
140
|
+
|
|
141
|
+
This licence is version 2.0 of the Open Licence.
|
|
142
|
+
|
|
143
|
+
Etalab reserves the right to propose new versions of the Open Licence.
|
|
144
|
+
Nevertheless, "Reusers" may continue to reuse information obtained under this
|
|
145
|
+
licence should they so wish.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stac-processor-gdmsar
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: A stac-repository complient processor for GDM-SAR products
|
|
5
|
+
Author-email: Pierre Fontbonne <pierre.fontbonne@uca.fr>, Alexandre Burel <alexandre.burel@cnrs.fr>
|
|
6
|
+
Maintainer-email: Alexandre Burel <alexandre.burel@cnrs.fr>
|
|
7
|
+
License: OPEN LICENCE 2.0/LICENCE OUVERTE 2.0
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
"Reuse" of the "Information" covered by this licence
|
|
11
|
+
|
|
12
|
+
The "Grantor" grants the "Reuser" the free, non-exclusive right to "Reuse" the
|
|
13
|
+
"Information" subject of this licence, for commercial or non-commercial
|
|
14
|
+
purposes, worldwide and for an unlimited period, in accordance with the
|
|
15
|
+
conditions stated below.
|
|
16
|
+
|
|
17
|
+
The "Reuser" is free to reuse the "Information":
|
|
18
|
+
|
|
19
|
+
- To reproduce it, copy it.
|
|
20
|
+
- To adapt, modify, retrieve and transform it in order to create "derived
|
|
21
|
+
information", products and services.
|
|
22
|
+
- To share, disseminate, redistribute, publish and transmit it.
|
|
23
|
+
- To exploit it for commercial purposes, e.g., by combining it with other
|
|
24
|
+
information, or by including it in his/her own product or application.
|
|
25
|
+
|
|
26
|
+
Subject to:
|
|
27
|
+
|
|
28
|
+
- An acknowledgement of the authorship of the "Information": its source (at
|
|
29
|
+
least, the name of the "Grantor") and the date of the most recent update of
|
|
30
|
+
the reused "Information".
|
|
31
|
+
|
|
32
|
+
Specifically, the "Reuser" may satisfy this condition by pointing, via a
|
|
33
|
+
hypertext link, to the source of the "Information" and so supplying an actual
|
|
34
|
+
acknowledgement of its authorship.
|
|
35
|
+
|
|
36
|
+
For example:
|
|
37
|
+
|
|
38
|
+
"Ministry of xxx—Original data downloaded from
|
|
39
|
+
'http://www.data.gouv.fr/fr/datasets/xxx/', updated on 14 February 2017".
|
|
40
|
+
|
|
41
|
+
This acknowledgement of authorship does not confer any official status on the
|
|
42
|
+
"Reuse" of the "Information", and must not suggest any sort of recognition or
|
|
43
|
+
endorsement on the part of the "Grantor", or any other public entity, of the
|
|
44
|
+
"Reuser" or of their "Reuse".
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Personal data
|
|
48
|
+
|
|
49
|
+
The "Information" made available may contain "Personal data" that may be
|
|
50
|
+
subject to "Reuse". If this is the case, the "Grantor" informs the "Reuser"
|
|
51
|
+
about its existence. The "Information" may be freely reused, within the rights
|
|
52
|
+
granted by this licence, subject to compliance with the legal framework
|
|
53
|
+
relating to personal data protection.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Intellectual property rights
|
|
57
|
+
|
|
58
|
+
It is guaranteed to The "Reuser" that potential "Intellectual property rights"
|
|
59
|
+
held by third parties or by the "Grantor" on "Information" do not interfere
|
|
60
|
+
with the rights granted by this licence.
|
|
61
|
+
|
|
62
|
+
When the "Grantor" holds transferable "Intellectual property rights" on the
|
|
63
|
+
"Information", he/she assigns these to the "Reuser" on a non-exclusive basis,
|
|
64
|
+
free of charge, worldwide, for the entire duration of the "Intellectual
|
|
65
|
+
property rights", and the "Reuser" is free to use the "Information" for any
|
|
66
|
+
purpose that complies with the rights and conditions defined in this licence.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Liability
|
|
70
|
+
|
|
71
|
+
The "Information" is made available as it is produced or received by the
|
|
72
|
+
"Grantor", without any other express or tacit guarantee than those set out in
|
|
73
|
+
this licence. The "Grantor" does not guarantee the absence of errors or
|
|
74
|
+
inaccuracies in the "Information", nor a continuous supply of the
|
|
75
|
+
"Information". He/she cannot be held responsible for any loss, prejudice or
|
|
76
|
+
damage of any kind caused to third parties as a result of the "Reuse".
|
|
77
|
+
|
|
78
|
+
The "Reuser" is solely responsible for the "Reuse" of the "Information". This
|
|
79
|
+
"Reuse" must not mislead third parties as to the contents of the "Information",
|
|
80
|
+
its source or its date of update.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
Applicable legislation
|
|
84
|
+
|
|
85
|
+
This licence is governed by French law.
|
|
86
|
+
|
|
87
|
+
Compatibility of this licence
|
|
88
|
+
|
|
89
|
+
This licence has been designed to be compatible with any free licence that at
|
|
90
|
+
least requires an acknowledgement of authorship, and specifically with the
|
|
91
|
+
previous version of this licence as well as with the following licences: United
|
|
92
|
+
Kingdom's "Open Government Licence" (OGL), Creative Commons' "Creative Commons
|
|
93
|
+
Attribution" (CC-BY) and Open Knowledge Foundation's "Open Data Commons
|
|
94
|
+
Attribution" (ODC-BY).
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Definitions
|
|
98
|
+
|
|
99
|
+
Within the meaning of this licence, are to be considered as:
|
|
100
|
+
|
|
101
|
+
- The "Grantor": any person granting the right to "Reuse" "Information" under
|
|
102
|
+
the rights and conditions set out in this licence.
|
|
103
|
+
- The "Information":
|
|
104
|
+
- any public information contained in documents disclosed or published by any
|
|
105
|
+
administration referred to in the first paragraph of Article L. 300-2 of
|
|
106
|
+
the "Code des relations entre le public et l'administration (CRPA)",
|
|
107
|
+
- any information made available by any person under the terms and conditions
|
|
108
|
+
of this licence.
|
|
109
|
+
- The "Reuse": the use of the "Information" for other purposes than those for
|
|
110
|
+
which it was produced or received.
|
|
111
|
+
- The "Reuser": any person reusing the "Information" in accordance with the
|
|
112
|
+
conditions of this licence.
|
|
113
|
+
- "Personal data": any information relating to an identified or identifiable
|
|
114
|
+
natural person who may be identified directly or indirectly. Its "Reuse" is
|
|
115
|
+
conditional on the respect of the existing legal framework.
|
|
116
|
+
- "Derived information": any new data or information created directly from the
|
|
117
|
+
"Information" or from a combination of the "Information" and other data or
|
|
118
|
+
information not subject to this licence.
|
|
119
|
+
- "Intellectual property rights": all rights identified as such under the "Code
|
|
120
|
+
de la propriété intellectuelle" (including copyright, rights related to
|
|
121
|
+
copyright, sui generis rights of database producers, etc.).
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
About this licence
|
|
125
|
+
|
|
126
|
+
This licence is intended to be used by administrations for the reuse of their
|
|
127
|
+
public information. It can also be used by any individual wishing to supply
|
|
128
|
+
"Information" under the conditions defined in this licence.
|
|
129
|
+
|
|
130
|
+
France has a comprehensive legal framework aiming at the spontaneous
|
|
131
|
+
dissemination by the administrations of their public information in order to
|
|
132
|
+
ensure the widest possible reuse of this information.
|
|
133
|
+
|
|
134
|
+
The right to "Reuse" the administrations' "Information" is governed by the
|
|
135
|
+
"Code des relations entre le public et l'administration (CRPA)".
|
|
136
|
+
|
|
137
|
+
This licence facilitates the unrestricted and free of charge reuse of public
|
|
138
|
+
information and is one of the licences which can be used by the administration
|
|
139
|
+
pursuant to the decree issued under article L. 323-2 of the CRPA.
|
|
140
|
+
|
|
141
|
+
Under the Prime Minister's authority, the Etalab mission is mandated to open up
|
|
142
|
+
the maximum amount of data held by State administrations and public
|
|
143
|
+
institutions. Etalab has drawn up the Open Licence to facilitate the
|
|
144
|
+
unrestricted and free of charge reuse of public information, as defined by
|
|
145
|
+
article L. 321-1 of the CRPA.
|
|
146
|
+
|
|
147
|
+
This licence is version 2.0 of the Open Licence.
|
|
148
|
+
|
|
149
|
+
Etalab reserves the right to propose new versions of the Open Licence.
|
|
150
|
+
Nevertheless, "Reusers" may continue to reuse information obtained under this
|
|
151
|
+
licence should they so wish.
|
|
152
|
+
Project-URL: Homepage, https://gitlab.in2p3.fr/isdeform/stac-processor-gdmsar
|
|
153
|
+
Requires-Python: >=3.8
|
|
154
|
+
Description-Content-Type: text/markdown
|
|
155
|
+
License-File: LICENCE.txt
|
|
156
|
+
Requires-Dist: pystac-client
|
|
157
|
+
Requires-Dist: pystac
|
|
158
|
+
Requires-Dist: requests~=2.32.3
|
|
159
|
+
Requires-Dist: typer~=0.15.1
|
|
160
|
+
Requires-Dist: jinja2~=3.1.5
|
|
161
|
+
Requires-Dist: pydantic
|
|
162
|
+
Requires-Dist: geojson_pydantic
|
|
163
|
+
Requires-Dist: shapely
|
|
164
|
+
Requires-Dist: markdown-it-py
|
|
165
|
+
Requires-Dist: mdit-py-plugins
|
|
166
|
+
Requires-Dist: mdit-plain
|
|
167
|
+
Requires-Dist: mdformat
|
|
168
|
+
Requires-Dist: python-dateutil>=2.9.0.post0
|
|
169
|
+
Requires-Dist: deepdiff>=8.4.2
|
|
170
|
+
Dynamic: license-file
|
|
171
|
+
|
|
172
|
+
# stac-processor-gdmsar
|
|
173
|
+
|
|
174
|
+
<p align="center">
|
|
175
|
+
<img src="https://gdm.poleterresolide.fr/upload/services/service2_1.png" alt="GDM-SAR" style="vertical-align: middle; width: 100px; height: 100px;"/>
|
|
176
|
+
<img src="https://stacspec.org/public/images-original/STAC-01.png" style="vertical-align: middle; max-width: 400px; max-height: 100px;" />
|
|
177
|
+
</p>
|
|
178
|
+
|
|
179
|
+
A STAC [processor](https://github.com/fntb/stac-repository/) for [GDM-SAR](https://www.isdeform.fr/services-2/) products.
|
|
180
|
+
|
|
181
|
+
## Overview
|
|
182
|
+
|
|
183
|
+
We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to manage the venv, dependencies, PYTHONPATH, etc. You (shouldn't but) can do without it, just create a `.venv`, activate it, install the dependencies, and add the repo to your $PYTHONPATH when running any of the scripts.
|
|
184
|
+
|
|
185
|
+
Installing the dependencies from the `uv.lock` file
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
uv sync
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Usage
|
|
192
|
+
|
|
193
|
+
As a standalone CLI :
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
uv run stac_processor_gdmsar/app.py --help
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Writing Component Templates
|
|
200
|
+
|
|
201
|
+
See [here](./docs/writing-component-templates.md).
|
|
202
|
+
|
|
203
|
+
Try them out with :
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
uv run scripts/render-template <template-id>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Using `pystac-client` to Query the API
|
|
210
|
+
|
|
211
|
+
See [the ISDeform data center public documentation](https://gitlab.in2p3.fr/fntb/isdeform-doc-public).
|
|
212
|
+
|
|
213
|
+
### License
|
|
214
|
+
|
|
215
|
+
[OPEN LICENCE 2.0](./LICENCE.txt)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# stac-processor-gdmsar
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://gdm.poleterresolide.fr/upload/services/service2_1.png" alt="GDM-SAR" style="vertical-align: middle; width: 100px; height: 100px;"/>
|
|
5
|
+
<img src="https://stacspec.org/public/images-original/STAC-01.png" style="vertical-align: middle; max-width: 400px; max-height: 100px;" />
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
A STAC [processor](https://github.com/fntb/stac-repository/) for [GDM-SAR](https://www.isdeform.fr/services-2/) products.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to manage the venv, dependencies, PYTHONPATH, etc. You (shouldn't but) can do without it, just create a `.venv`, activate it, install the dependencies, and add the repo to your $PYTHONPATH when running any of the scripts.
|
|
13
|
+
|
|
14
|
+
Installing the dependencies from the `uv.lock` file
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv sync
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
As a standalone CLI :
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
uv run stac_processor_gdmsar/app.py --help
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Writing Component Templates
|
|
29
|
+
|
|
30
|
+
See [here](./docs/writing-component-templates.md).
|
|
31
|
+
|
|
32
|
+
Try them out with :
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
uv run scripts/render-template <template-id>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Using `pystac-client` to Query the API
|
|
39
|
+
|
|
40
|
+
See [the ISDeform data center public documentation](https://gitlab.in2p3.fr/fntb/isdeform-doc-public).
|
|
41
|
+
|
|
42
|
+
### License
|
|
43
|
+
|
|
44
|
+
[OPEN LICENCE 2.0](./LICENCE.txt)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
dynamic = ["version"]
|
|
3
|
+
|
|
4
|
+
name = "stac-processor-gdmsar"
|
|
5
|
+
description = "A stac-repository complient processor for GDM-SAR products"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Pierre Fontbonne", email = "pierre.fontbonne@uca.fr" },
|
|
10
|
+
{ name = "Alexandre Burel", email = "alexandre.burel@cnrs.fr" }
|
|
11
|
+
]
|
|
12
|
+
maintainers = [{ name = "Alexandre Burel", email = "alexandre.burel@cnrs.fr" }]
|
|
13
|
+
|
|
14
|
+
license.file = "LICENCE.txt"
|
|
15
|
+
|
|
16
|
+
requires-python = ">=3.8"
|
|
17
|
+
|
|
18
|
+
dependencies = [
|
|
19
|
+
"pystac-client",
|
|
20
|
+
"pystac",
|
|
21
|
+
"requests ~= 2.32.3",
|
|
22
|
+
"typer ~= 0.15.1",
|
|
23
|
+
"jinja2 ~= 3.1.5",
|
|
24
|
+
"pydantic",
|
|
25
|
+
"geojson_pydantic",
|
|
26
|
+
"shapely",
|
|
27
|
+
"markdown-it-py",
|
|
28
|
+
"mdit-py-plugins",
|
|
29
|
+
"mdit-plain",
|
|
30
|
+
"mdformat",
|
|
31
|
+
"python-dateutil>=2.9.0.post0",
|
|
32
|
+
"deepdiff>=8.4.2",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://gitlab.in2p3.fr/isdeform/stac-processor-gdmsar"
|
|
37
|
+
|
|
38
|
+
[dependency-groups]
|
|
39
|
+
|
|
40
|
+
dev = [
|
|
41
|
+
"pytest>=8.3.5",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["setuptools"]
|
|
46
|
+
build-backend = "setuptools.build_meta"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools]
|
|
49
|
+
packages = [
|
|
50
|
+
"stac_processor_gdmsar",
|
|
51
|
+
"stac_processor_gdmsar.processor",
|
|
52
|
+
"stac_processor_gdmsar.processor.explorer",
|
|
53
|
+
"stac_processor_gdmsar.templates",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[tool.setuptools.package-data]
|
|
57
|
+
"*" = ["*.md"]
|
|
58
|
+
|
|
59
|
+
[tool.setuptools.dynamic]
|
|
60
|
+
version = { attr = "stac_processor_gdmsar.__about__.__version__" }
|
|
61
|
+
|
|
62
|
+
[tool.pytest.ini_options]
|
|
63
|
+
log_cli = true
|
|
64
|
+
log_cli_level = "DEBUG"
|
|
65
|
+
log_cli_format = "(%(filename)s:%(lineno)s) %(asctime)s [%(levelname)s] %(message)s"
|
|
66
|
+
log_cli_date_format = "%H:%M:%S"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
from stac_processor_gdmsar.__about__ import (
|
|
4
|
+
__version__,
|
|
5
|
+
__catalog_name__,
|
|
6
|
+
__catalog_desc__,
|
|
7
|
+
)
|
|
8
|
+
from stac_processor_gdmsar.discover import discover
|
|
9
|
+
from stac_processor_gdmsar.id import id
|
|
10
|
+
from stac_processor_gdmsar.version import version
|
|
11
|
+
from stac_processor_gdmsar.process import process
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This file is a CLI to test the processor independently from a STAC Repository.
|
|
3
|
+
To use it, just call "uv run stac_processor_gdmsar/app.py" from the main directory.
|
|
4
|
+
|
|
5
|
+
The CLI has the following commands:
|
|
6
|
+
- discover: to test the discover function, it will print the product sources discovered in the given source
|
|
7
|
+
- process: to test the process function, it will convert the given product source into a STAC catalog, and save it in the given destination directory
|
|
8
|
+
- version: to test the version function, it will print the version of the given product source
|
|
9
|
+
- id: to test the id function, it will print the id of the given product source
|
|
10
|
+
|
|
11
|
+
This CLI is only for testing purposes, it is not intended to be used by users of the processor, and it is not intended to be used in production.
|
|
12
|
+
It is only a way to test the processor independently from a STAC Repository, and to check that the output of the processor is correct.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from typing import (
|
|
16
|
+
Optional
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
import typer
|
|
20
|
+
import shutil
|
|
21
|
+
import os
|
|
22
|
+
from os import path
|
|
23
|
+
|
|
24
|
+
from stac_processor_gdmsar.__about__ import __version__
|
|
25
|
+
from stac_processor_gdmsar.discover import discover as api_discover
|
|
26
|
+
from stac_processor_gdmsar.id import id as api_id
|
|
27
|
+
from stac_processor_gdmsar.version import version as api_version
|
|
28
|
+
from stac_processor_gdmsar.process import process as api_process
|
|
29
|
+
from stac_processor_gdmsar.processor.fetch import fetch as api_fetch
|
|
30
|
+
|
|
31
|
+
app = typer.Typer()
|
|
32
|
+
|
|
33
|
+
@app.callback(invoke_without_command=True)
|
|
34
|
+
def main(version: bool = False):
|
|
35
|
+
if version:
|
|
36
|
+
print(__version__)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# commented because not tested
|
|
40
|
+
# @app.command()
|
|
41
|
+
# def fetch(product_source: str, dst: Optional[str] = None, only_metadata: bool = False):
|
|
42
|
+
# dst = api_fetch(product_source, dst, only_metadata=only_metadata)
|
|
43
|
+
# print(dst)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@app.command()
|
|
47
|
+
def discover(source: str):
|
|
48
|
+
# uv run stac_processor_gdmsar/app.py discover <source>
|
|
49
|
+
for product_source in api_discover(source):
|
|
50
|
+
print(product_source)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@app.command()
|
|
54
|
+
def version(product_source: str):
|
|
55
|
+
# uv run stac_processor_gdmsar/app.py version <product_source>
|
|
56
|
+
version = api_version(product_source)
|
|
57
|
+
print(version)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@app.command()
|
|
61
|
+
def id(product_source: str):
|
|
62
|
+
# uv run stac_processor_gdmsar/app.py id <product_source>
|
|
63
|
+
id = api_id(product_source)
|
|
64
|
+
print(id)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
@app.command()
|
|
68
|
+
def process(product_source: str, destination: str):
|
|
69
|
+
# uv run stac_processor_gdmsar/app.py process <product_source> <destination>
|
|
70
|
+
|
|
71
|
+
# call the process function that returns the path of the corresponding collection in a temporary directory
|
|
72
|
+
result = api_process(product_source)
|
|
73
|
+
# the temporary directory
|
|
74
|
+
result_dir = path.dirname(result)
|
|
75
|
+
|
|
76
|
+
if destination is not None:
|
|
77
|
+
try:
|
|
78
|
+
# clean the previous content of destination, if any
|
|
79
|
+
shutil.rmtree(destination, ignore_errors=True)
|
|
80
|
+
os.makedirs(destination, exist_ok=True)
|
|
81
|
+
|
|
82
|
+
# move the content of the temporary directory to destination
|
|
83
|
+
for file_name in os.listdir(result_dir):
|
|
84
|
+
shutil.move(
|
|
85
|
+
path.join(result_dir, file_name),
|
|
86
|
+
path.join(destination, file_name)
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
result = path.join(destination, path.basename(result))
|
|
90
|
+
result_dir = path.dirname(result)
|
|
91
|
+
|
|
92
|
+
except BaseException as error:
|
|
93
|
+
raise error
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__":
|
|
96
|
+
app()
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from typing import Any, Iterator
|
|
2
|
+
import re
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
from requests import HTTPError
|
|
6
|
+
|
|
7
|
+
from stac_processor_gdmsar.processor import make_explorer, BaseExplorer
|
|
8
|
+
|
|
9
|
+
logger = logging.getLogger(__file__)
|
|
10
|
+
# Set the logging level for urllib3 to WARNING to reduce noise in the logs
|
|
11
|
+
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
|
12
|
+
|
|
13
|
+
def _contains(dir, end_tag, explorer: BaseExplorer):
|
|
14
|
+
content = explorer.list_dir(dir)
|
|
15
|
+
for file in content:
|
|
16
|
+
if file.endswith(end_tag): return True
|
|
17
|
+
return False
|
|
18
|
+
|
|
19
|
+
def _discover_product_sources(dir: str, explorer: BaseExplorer) -> Iterator[str]:
|
|
20
|
+
try:
|
|
21
|
+
if not explorer.is_directory(dir):
|
|
22
|
+
# dir is not a directory, skip it
|
|
23
|
+
return
|
|
24
|
+
except Exception as error:
|
|
25
|
+
logger.warning(f"Skipped directory {dir} : {str(error)}")
|
|
26
|
+
return
|
|
27
|
+
|
|
28
|
+
dir_name = explorer.basename(dir)
|
|
29
|
+
|
|
30
|
+
if re.search(r"^iw\d(?:_iw\d){0,2}/?$", dir_name):
|
|
31
|
+
# dir_name looks like iw1, iw1_iw2, iw1_iw2_iw3
|
|
32
|
+
if _contains(dir, ".json", explorer):
|
|
33
|
+
# returns the directory if there is at least one json file in it
|
|
34
|
+
yield dir
|
|
35
|
+
return
|
|
36
|
+
|
|
37
|
+
for file_name in explorer.list_dir(dir):
|
|
38
|
+
file = explorer.join(dir, file_name)
|
|
39
|
+
if re.search(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\/?$", file_name):
|
|
40
|
+
# recursively search for subdirectories that look like 123e4567-e89b-12d3-a456-426614174000
|
|
41
|
+
# search for json files within such subdirectories
|
|
42
|
+
yield from _discover_product_sources(file, explorer)
|
|
43
|
+
elif re.search(r"^iw\d(?:_iw\d){0,2}/?$", file_name):
|
|
44
|
+
# if a subdirectory looks like iw1, iw1_iw2, iw1_iw2_iw3
|
|
45
|
+
if _contains(file, ".json", explorer):
|
|
46
|
+
# returns the subdirectory if there is at least one json file in it
|
|
47
|
+
yield file
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def discover(source: str) -> Iterator[str]:
|
|
51
|
+
explorer = make_explorer(source)
|
|
52
|
+
yield from _discover_product_sources(source, explorer)
|