Skip to content

Commit

Permalink
Fix data quality property parsing for ArcGIS parser
Browse files Browse the repository at this point in the history
  • Loading branch information
dharvey-consbio committed Sep 17, 2020
1 parent 826e01d commit 37bff9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gis_metadata/arcgis_metadata_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _parse_report_item(self, prop):
parsed = (element_to_dict(e) for e in get_elements(self._xml_tree, xroot))
parsed = flatten_items(e['children'] for e in parsed if e['attributes'].get('type') == item_type)

return reduce_value([p['text'] for p in parsed if p['name'] == 'measDesc'])
return reduce_value([p['text'] for p in parsed if p and p['name'] == 'measDesc'])

def _parse_raster_info(self, prop=RASTER_INFO):
""" Collapses multiple dimensions into a single raster_info complex struct """
Expand Down
8 changes: 5 additions & 3 deletions gis_metadata/tests/data/arcgis_metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<attalias>Attributes Alias 1</attalias>
<attrdef>Attributes Definition 1</attrdef>
<attrdefs>Attributes Definition Source 1</attrdefs>
<attrdomv />
<attrdomv/>
</attr>
<attr>
<attrlabl>Attributes Label 2</attrlabl>
<attalias>Attributes Alias 2</attalias>
<attrdef>Attributes Definition 2</attrdef>
<attrdefs>Attributes Definition Source 2</attrdefs>
<attrdomv />
<attrdomv/>
</attr>
<attr>
<attrlabl>Attributes Label 3</attrlabl>
<attalias>Attributes Alias 3</attalias>
<attrdef>Attributes Definition 3</attrdef>
<attrdefs>Attributes Definition Source 3</attrdefs>
<attrdomv />
<attrdomv/>
</attr>
</detailed>
</eainfo>
Expand Down Expand Up @@ -324,6 +324,8 @@ Process Step Date 3
<report type="DQCompOm">
<measDesc>Test Dataset Completeness</measDesc>
</report>
<report type="DQCompComm" dimension=""/>
<report type="DQNonQuanAttAcc" dimension=""/>
</dqInfo>
<mdHrLvName>dataset</mdHrLvName>
<refSysInfo>
Expand Down

0 comments on commit 37bff9e

Please sign in to comment.