Project

General

Profile

« Previous | Next » 

Revision 1471

units.py: Restructured to use a Quantity object for the units-tagged value and conversion functions quantity2str() and str2quantity() to convert between that and a raw string. Added convert() with basic support for removing units and passing through matching units. xml_func.py: _units: Added "to" attr. VegBIEN mappings: Remove units using new _units "to" attr instead of temporary workaround in _units.

View differences:

DwC2-VegBIEN.specimens.csv
8 8
locality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationnarrative/_merge/1,,68
9 9
verbatimLocality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationnarrative/_merge/2,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
10 10
habitat,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationnarrative/_merge/3/_label[label=""habitat""]/value","Brad: Free-text description of vegetation community where collected, frequently redundane wrt 'Vegetation'. Bob, Nick: keep as user defined or create special element?",52
11
minimumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=""m""]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/2/_rangeEnd/value}",,71
12
maximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=""m""]/value,elevationrange/_range/to/_units:[default=""m""]/value/_alt/1}",,72
11
minimumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{./{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=m,to=m,to=]/value/_rangeStart/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/2/_rangeEnd/value}",,71
12
maximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max/_units:[default=m,to=m,to=]/value,elevationrange/_range/to/_units:[default=m,to=m,to=]/value/_alt/1}",,72
13 13
decimalLatitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/latitude,centerlatitude}/_alt/1/_nullIf:[null=0,type=float]/value",,85
14 14
verbatimLatitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/latitude,centerlatitude}/_alt/2/_nullIf:[null=0,type=float]/value",,81
15 15
decimalLongitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/longitude,centerlongitude}/_alt/1/_nullIf:[null=0,type=float]/value",,86
16 16
verbatimLongitude,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{locationdetermination/longitude,centerlongitude}/_alt/2/_nullIf:[null=0,type=float]/value",,82
17
maximumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=""m""]/value",,75
18
minimumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=""m""]/value",,74
17
maximumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/max/_units:[default=m,to=m,to=]/value",,75
18
minimumDepthInMeters,"/*_id/taxonoccurrence/*_id/locationevent/waterdepth/_avg/min/_units:[default=m,to=m,to=]/value",,74
19 19
eventDate,"/*_id/taxonoccurrence/*_id/locationevent/{obsstartdate/_*/date/_dateRangeStart,obsenddate/_*/date/_dateRangeEnd}/value",,44
20 20
dateIdentified,/*_id/taxonoccurrence/taxondetermination[role=identifier]/determinationdate/_*/date/_dateRangeStart/value,,120
21 21
identifiedBy,"/*_id/taxonoccurrence/taxondetermination[role=identifier]:[iscurrent=true]/*_id/party/{givenname/_namePart/first,middlename/_namePart/middle,surname/_namePart/last}",Brad: Bob: does this look correct for VegBank?,119

Also available in: Unified diff