Skip to content

Commit

Permalink
add datatype section
Browse files Browse the repository at this point in the history
resolves geopython#189
  • Loading branch information
pvgenuchten committed Dec 20, 2022
1 parent e81d7e8 commit df28548
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pygeometa/schemas/iso19139/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def import_(self, metadata: str) -> dict:
mcf['spatial']['resolution'].append({'distance': v,
'uom': uom})

if (m.identification.spatialrepresentationtype and
len(m.identification.spatialrepresentationtype) > 0):
mcf['spatial']['datatype'] = m.identification.spatialrepresentationtype[0] # noqa

if m.identification.accessconstraints:
mcf['identification']['accessconstraints'] = m.identification.accessconstraints[0] # noqa

Expand Down
3 changes: 3 additions & 0 deletions tests/md-SMJP01RJTD-gmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@
</gmd:otherConstraints>
</gmd:MD_LegalConstraints>
</gmd:resourceConstraints>
<gmd:spatialRepresentationType>
<gmd:MD_SpatialRepresentationTypeCode codeListValue="vector" codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_SpatialRepresentationTypeCode"/>
</gmd:spatialRepresentationType>
<gmd:spatialResolution>
<gmd:MD_Resolution>
<gmd:equivalentScale>
Expand Down

0 comments on commit df28548

Please sign in to comment.