Revision 10393
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/CTFS/AggregateObservation/postprocess.sql | ||
---|---|---|
1 |
SELECT util.search_path_append('util'); |
|
2 |
|
|
3 |
-- runtime: 0.3 s ("Time: 256.926 ms") @starscream |
|
4 |
SELECT set_col_types(:table_str, ARRAY[ |
|
5 |
('minDBHcm', 'double precision') |
|
6 |
, ('maxDBHcm', 'double precision') |
|
7 |
]::col_cast[]); |
|
8 |
|
|
9 |
|
|
10 |
SELECT mk_derived_col((:table_str, 'diameterBreastHeight_cm'), $$_avg("minDBHcm", "maxDBHcm")$$); -- runtime: 0.4 s ("Time: 431.405 ms") @starscream |
inputs/CTFS/AggregateObservation/map.csv | ||
---|---|---|
16 | 16 |
MeanDate,*MeanDate,, |
17 | 17 |
Abund,individualCount,, |
18 | 18 |
VegCategory,growthForm,, |
19 |
maxDBHcm,diameterBreastHeight_cm,/_avg/1,
|
|
20 |
minDBHcm,diameterBreastHeight_cm,/_avg/2,
|
|
19 |
maxDBHcm,diameterBreastHeight_max_cm,,
|
|
20 |
minDBHcm,diameterBreastHeight_min_cm,,
|
|
21 | 21 |
PlotSize,plotArea_ha,,Assuming units based on the range and precision of values compared to the PlotShape values |
22 | 22 |
PlotShape,footprintWKT,, |
23 |
diameterBreastHeight_cm,diameterBreastHeight_cm,, |
inputs/CTFS/AggregateObservation/VegBIEN.csv | ||
---|---|---|
21 | 21 |
Abund,/location/locationevent/taxonoccurrence/aggregateoccurrence/count, |
22 | 22 |
DWstagingID,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists", |
23 | 23 |
DWstagingID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode, |
24 |
maxDBHcm,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value/_avg/1, |
|
25 |
minDBHcm,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value/_avg/2, |
|
24 |
diameterBreastHeight_cm,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value, |
|
26 | 25 |
CensusName,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists", |
27 | 26 |
Plot,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists", |
28 | 27 |
VegCategory,/location/locationevent/taxonoccurrence/growthform, |
... | ... | |
46 | 45 |
Province,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2, |
47 | 46 |
Province,/location/locationplace/*_id/place/stateprovince, |
48 | 47 |
MeanDate,,** No join mapping for *MeanDate ** |
48 |
maxDBHcm,,** No join mapping for diameterBreastHeight_max_cm ** |
|
49 |
minDBHcm,,** No join mapping for diameterBreastHeight_min_cm ** |
|
49 | 50 |
row_num,,** No join mapping for *row_num ** |
inputs/CTFS/AggregateObservation/test.xml.ref | ||
---|---|---|
19 | 19 |
<count>$Abund</count> |
20 | 20 |
<plantobservation> |
21 | 21 |
<specimenreplicate><sourceaccessioncode>$DWstagingID</sourceaccessioncode></specimenreplicate> |
22 |
<stemobservation> |
|
23 |
<diameterbreastheight_m> |
|
24 |
<_cm_to_m> |
|
25 |
<value> |
|
26 |
<_avg> |
|
27 |
<1>$maxDBHcm</1> |
|
28 |
<2>$minDBHcm</2> |
|
29 |
</_avg> |
|
30 |
</value> |
|
31 |
</_cm_to_m> |
|
32 |
</diameterbreastheight_m> |
|
33 |
</stemobservation> |
|
22 |
<stemobservation><diameterbreastheight_m><_cm_to_m><value>$diameterBreastHeight_cm</value></_cm_to_m></diameterbreastheight_m></stemobservation> |
|
34 | 23 |
</plantobservation> |
35 | 24 |
</aggregateoccurrence> |
36 | 25 |
<growthform>$VegCategory</growthform> |
inputs/CTFS/AggregateObservation/new_terms.csv | ||
---|---|---|
4 | 4 |
CensusName,authorEventCode,, |
5 | 5 |
Abund,individualCount,, |
6 | 6 |
VegCategory,growthForm,, |
7 |
maxDBHcm,diameterBreastHeight_cm,/_avg/1,
|
|
8 |
minDBHcm,diameterBreastHeight_cm,/_avg/2,
|
|
7 |
maxDBHcm,diameterBreastHeight_max_cm,,
|
|
8 |
minDBHcm,diameterBreastHeight_min_cm,,
|
|
9 | 9 |
PlotSize,plotArea_ha,,Assuming units based on the range and precision of values compared to the PlotShape values |
10 | 10 |
PlotShape,footprintWKT,, |
inputs/CTFS/AggregateObservation/unmapped_terms.csv | ||
---|---|---|
1 | 1 |
*row_num |
2 | 2 |
*MeanDate |
3 |
diameterBreastHeight_max_cm |
|
4 |
diameterBreastHeight_min_cm |
Also available in: Unified diff
inputs/CTFS/AggregateObservation/: translated multi-column filters to postprocessing derived columns, using the steps at wiki.vegpath.org/Adding_new-style_import_to_a_datasource#Translating-filters-to-postprocessing-derived-columns