-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage_to_iso.xml
392 lines (392 loc) · 19.6 KB
/
package_to_iso.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<!-- Lifted from ckanext-ngds/ckanext/ngds/csw/templates/package_to_iso.xml -->
<gmd:MD_Metadata xmlns:gml='http://www.opengis.net/gml' xmlns:xlink='http://www.w3.org/1999/xlink'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:gmd='http://www.isotc211.org/2005/gmd'
xmlns:gco='http://www.isotc211.org/2005/gco'
xsi:schemaLocation='http://www.isotc211.org/2005/gmd http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd'>
<gmd:fileIdentifier>
<gco:CharacterString>{{ id }}</gco:CharacterString>
</gmd:fileIdentifier>
<gmd:language>
<gco:CharacterString>eng</gco:CharacterString>
</gmd:language>
<gmd:characterSet>
<gmd:MD_CharacterSetCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='utf8'>UTF-8
</gmd:MD_CharacterSetCode>
</gmd:characterSet>
<gmd:hierarchyLevel>
<gmd:MD_ScopeCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='{{ additional.data_type }}'>{{ additional.data_type }}
</gmd:MD_ScopeCode>
</gmd:hierarchyLevel>
<gmd:hierarchyLevelName>
<gco:CharacterString>{{ additional.data_type }}</gco:CharacterString>
</gmd:hierarchyLevelName>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>{{ maintainer }}</gco:CharacterString>
</gmd:individualName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<gmd:electronicMailAddress>
<gco:CharacterString>{{ maintainer_email }}</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='pointOfContact'>pointOfContact
</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:contact>
<gmd:dateStamp>
<gco:DateTime>{{ metadata_modified }}</gco:DateTime>
</gmd:dateStamp>
<gmd:metadataStandardName>
<gco:CharacterString>ISO-USGIN</gco:CharacterString>
</gmd:metadataStandardName>
<gmd:metadataStandardVersion>
<gco:CharacterString>1.2</gco:CharacterString>
</gmd:metadataStandardVersion>
<gmd:dataSetURI>
<gco:CharacterString>{{ additional.datasetUri }}</gco:CharacterString>
</gmd:dataSetURI>
<gmd:identificationInfo>
<gmd:MD_DataIdentification>
<gmd:citation>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>{{ title }}</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:DateTime>{{ additional.publication_date }}</gco:DateTime>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='publication'>publication
</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
{% for other in additional.other_id %}
<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
<gco:CharacterString>{{ other }}</gco:CharacterString>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
{% endfor %}
{% for creator in additional.authors %}
<gmd:citedResponsibleParty>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>{{ creator.name }}</gco:CharacterString>
</gmd:individualName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<gmd:electronicMailAddress>
<gco:CharacterString>{{ creator.email }}</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='originator'>originator
</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:citedResponsibleParty>
{% endfor %}
</gmd:CI_Citation>
</gmd:citation>
<gmd:abstract>
<gco:CharacterString>{{ notes }}</gco:CharacterString>
</gmd:abstract>
<gmd:status>
<gmd:MD_ProgressCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='{{ additional.status }}'>{{ additional.status }}
</gmd:MD_ProgressCode>
</gmd:status>
{% if tags != [] %}
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
{% for tag in tags %}
<gmd:keyword>
<gco:CharacterString>{{ tag.display_name }}</gco:CharacterString>
</gmd:keyword>
{% endfor %}
<gmd:type>
<gmd:MD_KeywordTypeCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='theme'>theme
</gmd:MD_KeywordTypeCode>
</gmd:type>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
{% endif %}
{% if additional.get("location", []) != [] %}
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
{% for tag in additional.location %}
<gmd:keyword>
<gco:CharacterString>{{ tag }}</gco:CharacterString>
</gmd:keyword>
{% endfor %}
<gmd:type>
<gmd:MD_KeywordTypeCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='theme'>place
</gmd:MD_KeywordTypeCode>
</gmd:type>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
{% endif %}
{% for facet in additional.facets %}
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
{% for term in additional.facets[facet] %}
<gmd:keyword>
<gco:CharacterString>{{ term }}</gco:CharacterString>
</gmd:keyword>
{% endfor %}
<gmd:thesaurusName xlink:href='/metadata/collection/'>
<gmd:CI_Citation>
<gmd:title>
<gco:CharacterString>{{ facet }}</gco:CharacterString>
</gmd:title>
<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2013-01-01</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='publication'></gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
</gmd:CI_Citation>
</gmd:thesaurusName>
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
{% endfor %}
<gmd:language>
<gco:CharacterString>{{ additional.language }}</gco:CharacterString>
</gmd:language>
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>geoscientificInformation</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
{% if extent != {} %}
<gmd:extent>
<gmd:EX_Extent>
<gmd:geographicElement>
<gmd:EX_GeographicBoundingBox>
<gmd:westBoundLongitude>
<gco:Decimal>{{ extent.west }}</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:eastBoundLongitude>
<gco:Decimal>{{ extent.east }}</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>{{ extent.south }}</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:northBoundLatitude>
<gco:Decimal>{{ extent.north }}</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
</gmd:EX_Extent>
</gmd:extent>
{% endif %}
</gmd:MD_DataIdentification>
</gmd:identificationInfo>
<gmd:distributionInfo>
<gmd:MD_Distribution>
{% for distro in additional.online %}
<gmd:distributor>
<gmd:MD_Distributor>
<gmd:distributorContact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>{{ distro.distributor.name }}</gco:CharacterString>
</gmd:individualName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<gmd:electronicMailAddress>
<gco:CharacterString>{{ distro.distributor.email }}</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='distributor'>distributor
</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:distributorContact>
{% for res in distro.resources %}
<gmd:distributorTransferOptions xlink:href="#distribution-{{ res.id }}"></gmd:distributorTransferOptions>
{% endfor %}
</gmd:MD_Distributor>
</gmd:distributor>
{% endfor %}
{% for distro in additional.offline %}
{% for resource in distro.resources %}
<gmd:distributor>
<gmd:MD_Distributor>
<gmd:distributorContact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>{{ distro.distributor.name }}</gco:CharacterString>
</gmd:individualName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<gmd:electronicMailAddress>
<gco:CharacterString>{{ distro.distributor.email }}</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode
codeList='http://standards.iso.org/iso/19139/resources/codelist/gmxCodelists.xml'
codeListValue='distributor'>distributor
</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:distributorContact>
<gmd:distributionOrderProcess>
<gmd:MD_StandardOrderProcess>
<gmd:orderingInstructions>
<gco:CharacterString>{{ resource.ordering }}</gco:CharacterString>
</gmd:orderingInstructions>
</gmd:MD_StandardOrderProcess>
</gmd:distributionOrderProcess>
<gmd:distributorFormat>
<gmd:MD_Format>
<gmd:name>
<gco:CharacterString>{{ resource.resource_type }}</gco:CharacterString>
</gmd:name>
<gmd:version>
<gco:CharacterString>None</gco:CharacterString>
</gmd:version>
</gmd:MD_Format>
</gmd:distributorFormat>
<gmd:distributorTransferOptions xlink:href="#distribution-{{ resource.id }}"></gmd:distributorTransferOptions>
</gmd:MD_Distributor>
</gmd:distributor>
{% endfor %}
{% endfor %}
{% for distro in additional.online %}
{% for resource in distro.resources %}
<gmd:transferOptions>
<gmd:MD_DigitalTransferOptions id="distribution-{{ resource.id }}">
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>{{ resource.url }}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>{{ resource.protocol }}</gco:CharacterString>
</gmd:protocol>
<gmd:name>
<gco:CharacterString>{{ resource.name }}</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>
{{ resource.description }}
{% if resource.layer_name and resource.protocol == "OGC:WMS" %}
parameters: { "layers": "{{ resource.layer_name }}" }.
{% endif %}
{% if resource.layer_name and resource.protocol == "OGC:WFS" %}
parameters: { "featureTypes": "{{ resource.layer_name }}" }.
{% endif %}
</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeListValue='375'
codeList='http://www.fgdc.gov/nap/metadata/register/registerItemClasses.html#IC_88'>
download
</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onLine>
</gmd:MD_DigitalTransferOptions>
</gmd:transferOptions>
{% endfor %}
{% endfor %}
{% for resource in additional.offline %}
{% for res in resource.resources %}
<gmd:transferOptions>
<gmd:MD_DigitalTransferOptions id="distribution-{{ res.id }}">
<gmd:offLine>
<gmd:MD_Medium>
<gmd:mediumNote>
<gco:CharacterString>{{ res.name }} -- {{ res.description }}</gco:CharacterString>
</gmd:mediumNote>
</gmd:MD_Medium>
</gmd:offLine>
</gmd:MD_DigitalTransferOptions>
</gmd:transferOptions>
{% endfor %}
{% endfor %}
</gmd:MD_Distribution>
</gmd:distributionInfo>
<gmd:metadataMaintenance>
<gmd:MD_MaintenanceInformation>
<gmd:maintenanceAndUpdateFrequency gco:nilReason="unknown"/>
<gmd:maintenanceNote>
<gco:CharacterString>This metadata record was from github template using Jinja 2. Run on 2018-08-07T09:49:55-07:00</gco:CharacterString>
</gmd:maintenanceNote>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>NGDS metadata curator</gco:CharacterString>
</gmd:individualName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<gmd:electronicMailAddress>
<gco:CharacterString>metadata@usgin.org</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="processor">processor</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:contact>
</gmd:MD_MaintenanceInformation>
</gmd:metadataMaintenance>
</gmd:MD_Metadata>