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:

VegX-VegBIEN.plots.csv
10 10
/*UniqueIdentifierID->/*s/plot/locationNarrative,/*_id/location/locationnarrative,
11 11
/*UniqueIdentifierID->/*s/plot/slopeAspect,/*_id/location/slopeaspect,
12 12
/*UniqueIdentifierID->/*s/plot/slopeGradient,/*_id/location/slopegradient,
13
/*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters,"/*_id/location/{elevation/_alt/2/_avg/max,elevationrange/_range/to}/_units:[default=""m""]/value",
14
/*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters,"/*_id/location/{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=""m""]/value",
13
/*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters,"/*_id/location/{elevation/_alt/2/_avg/max,elevationrange/_range/to}/_units:[default=m,to=m,to=]/value",
14
/*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters,"/*_id/location/{elevation/_alt/2/_avg/min,elevationrange/_range/from}/_units:[default=m,to=m,to=]/value",
15 15
/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude,"/*_id/location/{locationdetermination/latitude,centerlatitude}",
16 16
/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude,"/*_id/location/{locationdetermination/longitude,centerlongitude}",
17 17
/simpleUserdefined[name=plotMethodology]/value,/*_id/method/name,
......
43 43
->/*s/abioticObservation[*ID]/simpleUserdefined[name=sodium]/value,/soilobs/sodium,
44 44
->/*s/abioticObservation[*ID]/simpleUserdefined[name=texture]/value,/soilobs/texture,
45 45
/temperature,/temperature,
46
/*UniqueIdentifierID->/*s/plot/geospatial/maximumDepthInMeters,"/waterdepth/max/_units:[default=""m""]/value",
47
/*UniqueIdentifierID->/*s/plot/geospatial/minimumDepthInMeters,"/waterdepth/min/_units:[default=""m""]/value",
46
/*UniqueIdentifierID->/*s/plot/geospatial/maximumDepthInMeters,"/waterdepth/max/_units:[default=m,to=m,to=]/value",
47
/*UniqueIdentifierID->/*s/plot/geospatial/minimumDepthInMeters,"/waterdepth/min/_units:[default=m,to=m,to=]/value",
48 48
:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/authorlocationcode,
49 49
/partyWithRole/*ID->/parties/party/organizationName,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1,
50 50
:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=sourceaccessioncode]/value,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,

Also available in: Unified diff