Project

General

Profile

« Previous | Next » 

Revision 4824

inputs/SALVIAS/*/map.csv: Remapped all versions of stem and tree tags to tag, with the second tag superceding the first, to avoid the complex VegCore-VegBIEN mapping logic that attempts to place both tags in VegBIEN in the correct order but does not work for column-based import. inputs/SALVIAS-CSV/Organism/map.csv: stem and tree tags: Made the stem tag supercede the tree tag instead of vice versa, to have as specific of a tag as possible.

View differences:

inputs/SALVIAS-CSV/Organism/map.csv
3 3
PLOT_ID,locationID,,
4 4
plot_code,plotName,,
5 5
census_no,censusNumber,,"Brad: Assigned by SALVIAS. 1 for first plot, then 2, 3, etc. I can't recall if we even have repeat censuses in SALVIAS. Probably not."
6
census_date,eventDate,,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:

7
-----

8
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count

9
FROM ""SALVIAS-CSV"".organisms

10
WHERE subplot IS NOT NULL AND census_date IS NOT NULL

11
GROUP BY ""PLOT_ID"", subplot

12
HAVING count(DISTINCT census_date) > 1

6
census_date,eventDate,,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
7
-----
8
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
9
FROM ""SALVIAS-CSV"".organisms
10
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
11
GROUP BY ""PLOT_ID"", subplot
12
HAVING count(DISTINCT census_date) > 1
13 13
-----"
14 14
subplot,subplot,,
15 15
individual_code,recordNumber,,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
16 16
ind_id,ind_id,,Brad: OMIT
17
tag1,tag,/_alt/1,"Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
18
tag2,previousTag,/_alt/1,"Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
17
tag1,tag,/_alt/2/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
18
tag2,tag,/_alt/2/_alt/1,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
19 19
x_position,organismX,,"Brad: These are important, fundamental values of many tree plots"
20 20
y_position,organismY,,Brad: See comment above for x_position
21 21
voucher_string,catalogNumber,/_alt/2,"Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
......
41 41
intercept_cm,intercept_cm,,"Brad: This is an aggregate observation. Used in line-intercept methodology only, describes the point along centerline at which an individual intercepts the center line of the plot. Used to determin relative abundance."
42 42
height_m,height,/_alt/2,
43 43
ht_first_branch_m,heightFirstBranch,,
44
stem_tag1,tag,/_alt/2,"Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
45
stem_tag2,previousTag,/_alt/2,Brad: see above
44
stem_tag1,tag,/_alt/1/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
45
stem_tag2,tag,/_alt/1/_alt/1,The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
46 46
stem_dbh,diameterBreastHeight,,
47 47
basal_diam,basalDiameter,,
48 48
stem_height_m,height,/_alt/1,"Brad: Same as for height, but applies to individuals stems, not trees. Rare."
inputs/SALVIAS-CSV/Organism/VegBIEN.csv
12 12
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
13 13
plot_code,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if event""]/then/parent_id/locationevent/*_id/location/authorlocationcode",
14 14
PLOT_ID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode",
15
census_date,/location/locationevent/obsenddate/_*/date/_alt/2/_dateRangeEnd/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:

16
-----

17
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count

18
FROM ""SALVIAS-CSV"".organisms

19
WHERE subplot IS NOT NULL AND census_date IS NOT NULL

20
GROUP BY ""PLOT_ID"", subplot

21
HAVING count(DISTINCT census_date) > 1

15
census_date,/location/locationevent/obsenddate/_*/date/_alt/2/_dateRangeEnd/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
16
-----
17
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
18
FROM ""SALVIAS-CSV"".organisms
19
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
20
GROUP BY ""PLOT_ID"", subplot
21
HAVING count(DISTINCT census_date) > 1
22 22
-----"
23
census_date,/location/locationevent/obsstartdate/_*/date/_alt/2/_dateRangeStart/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:

24
-----

25
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count

26
FROM ""SALVIAS-CSV"".organisms

27
WHERE subplot IS NOT NULL AND census_date IS NOT NULL

28
GROUP BY ""PLOT_ID"", subplot

29
HAVING count(DISTINCT census_date) > 1

23
census_date,/location/locationevent/obsstartdate/_*/date/_alt/2/_dateRangeStart/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
24
-----
25
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
26
FROM ""SALVIAS-CSV"".organisms
27
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
28
GROUP BY ""PLOT_ID"", subplot
29
HAVING count(DISTINCT census_date) > 1
30 30
-----"
31 31
no_of_individuals,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,"Brad: This is a count of number of indiiduals for an *aggregate* observation. For VegBank, I'm not sure. Not exactly the same as stemCount. An individual tree could have 3 stems but would still only count as 1. We need to check with Bob on this."
32 32
cover_percent,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover_fraction/_percent_to_fraction/value,
......
47 47
height_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m/_alt/2,
48 48
ht_first_branch_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,
49 49
stem_height_first_branch_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
50
tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/1","Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once.; Quotes sort it before tag2"
51
stem_tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/2","Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems.; Quotes sort it before tag2"
52
tag2,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag/_alt/1,"Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
53
stem_tag2,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag/_alt/2,Brad: see above
50
stem_tag2,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/1/_alt/1",The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above; Quotes sort it before tag2
51
stem_tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/1/_alt/2","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems.; Quotes sort it before tag2"
52
tag2,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/2/_alt/1","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other.; Quotes sort it before tag2"
53
tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/2/_alt/2","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once.; Quotes sort it before tag2"
54 54
x_position,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition_m,"Brad: These are important, fundamental values of many tree plots"
55 55
y_position,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition_m,Brad: See comment above for x_position
56 56
individual_code,/location/locationevent/taxonoccurrence/authortaxoncode/_alt/1,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
inputs/SALVIAS-CSV/Organism/test.xml.ref
101 101
                                        </_alt>
102 102
                                    </heightfirstbranch_m>
103 103
                                    <stemtag>
104
                                        <iscurrent>
105
                                            <_alt>
106
                                                <2>true</2>
107
                                                <1>false</1>
108
                                            </_alt>
109
                                        </iscurrent>
110
                                        <tag>
111
                                            <_alt>
112
                                                <1>$tag1</1>
113
                                                <2>$stem_tag1</2>
114
                                            </_alt>
115
                                        </tag>
116
                                    </stemtag>
117
                                    <stemtag>
118 104
                                        <iscurrent>true</iscurrent>
119 105
                                        <tag>
120 106
                                            <_alt>
121
                                                <1>$tag2</1>
122
                                                <2>$stem_tag2</2>
107
                                                <1>
108
                                                    <_alt>
109
                                                        <1>$stem_tag2</1>
110
                                                        <2>$stem_tag1</2>
111
                                                    </_alt>
112
                                                </1>
113
                                                <2>
114
                                                    <_alt>
115
                                                        <1>$tag2</1>
116
                                                        <2>$tag1</2>
117
                                                    </_alt>
118
                                                </2>
123 119
                                            </_alt>
124 120
                                        </tag>
125 121
                                    </stemtag>
......
211 207
        </path>
212 208
    </_simplifyPath>
213 209
</VegBIEN>
214
Inserted 43 new rows into database
210
Inserted 41 new rows into database
inputs/SALVIAS/stems/map.csv
7 7
stem_dbh,diameterBreastHeight,,
8 8
gentry_dbh,diameterBreastHeightGentry,,
9 9
stem_notes,stemNotes,,
10
stem_tag1,tag,,"Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
11
stem_tag2,previousTag,,"Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
10
stem_tag1,tag,/_alt/2,"The second tag supercedes the first. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
11
stem_tag2,tag,/_alt/1,"The second tag supercedes the first. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
12 12
stem_height_m,height,,"Brad: Same as for height, but applies to individuals stems, not trees. Rare."
13 13
stem_height_first_branch_m,heightFirstBranch,,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
14 14
stem_canopy_form,canopyForm,,
inputs/SALVIAS/stems/VegBIEN.csv
11 11
stem_height_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m,"Brad: Same as for height, but applies to individuals stems, not trees. Rare."
12 12
stem_height_first_branch_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
13 13
stem_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/sourceaccessioncode,
14
stem_tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag","Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once.; Quotes sort it before tag2"
15
stem_tag2,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag,"Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
14
stem_tag2,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/1","The second tag supercedes the first. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other.; Quotes sort it before tag2"
15
stem_tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/2","The second tag supercedes the first. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once.; Quotes sort it before tag2"
16 16
PlotObsID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2,
17 17
origrecord_id_stems,,** No join mapping for origrecord_id_stems ** 
18 18
plotobs_id_index,,** No join mapping for plotobs_id_index ** 
inputs/SALVIAS/stems/test.xml.ref
62 62
                                    <heightfirstbranch_m>$stem_height_first_branch_m</heightfirstbranch_m>
63 63
                                    <sourceaccessioncode>$stem_id</sourceaccessioncode>
64 64
                                    <stemtag>
65
                                        <iscurrent>
65
                                        <iscurrent>true</iscurrent>
66
                                        <tag>
66 67
                                            <_alt>
67
                                                <2>true</2>
68
                                                <1>false</1>
68
                                                <1>$stem_tag2</1>
69
                                                <2>$stem_tag1</2>
69 70
                                            </_alt>
70
                                        </iscurrent>
71
                                        <tag>$stem_tag1</tag>
71
                                        </tag>
72 72
                                    </stemtag>
73
                                    <stemtag>
74
                                        <iscurrent>true</iscurrent>
75
                                        <tag>$stem_tag2</tag>
76
                                    </stemtag>
77 73
                                </stemobservation>
78 74
                            </plantobservation>
79 75
                        </aggregateoccurrence>
inputs/SALVIAS/plotObservations/map.csv
15 15
Line,subplot,,
16 16
Ind,recordNumber,,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
17 17
ind_id,ind_id,,Brad: OMIT
18
tag1,tag,,"Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
19
tag2,previousTag,,"Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
18
tag1,tag,/_alt/2,"The second tag supercedes the first. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
19
tag2,tag,/_alt/1,"The second tag supercedes the first. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
20 20
x_position,organismX,,"Brad: These are important, fundamental values of many tree plots"
21 21
y_position,organismY,,Brad: See comment above for x_position
22 22
dist,dist,,
inputs/SALVIAS/plotObservations/VegBIEN.csv
44 44
temp_dbh,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m,
45 45
height_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m,
46 46
ht_first_branch_m,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,
47
tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag","Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once.; Quotes sort it before tag2"
48
tag2,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag,"Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
47
tag2,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/1","The second tag supercedes the first. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other.; Quotes sort it before tag2"
48
tag1,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag/_alt/2","The second tag supercedes the first. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once.; Quotes sort it before tag2"
49 49
x_position,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition_m,"Brad: These are important, fundamental values of many tree plots"
50 50
y_position,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition_m,Brad: See comment above for x_position
51 51
Ind,/location/locationevent/taxonoccurrence/authortaxoncode/_alt/1,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
inputs/SALVIAS/plotObservations/test.xml.ref
82 82
                                    <height_m>$height_m</height_m>
83 83
                                    <heightfirstbranch_m>$ht_first_branch_m</heightfirstbranch_m>
84 84
                                    <stemtag>
85
                                        <iscurrent>
85
                                        <iscurrent>true</iscurrent>
86
                                        <tag>
86 87
                                            <_alt>
87
                                                <2>true</2>
88
                                                <1>false</1>
88
                                                <1>$tag2</1>
89
                                                <2>$tag1</2>
89 90
                                            </_alt>
90
                                        </iscurrent>
91
                                        <tag>$tag1</tag>
91
                                        </tag>
92 92
                                    </stemtag>
93
                                    <stemtag>
94
                                        <iscurrent>true</iscurrent>
95
                                        <tag>$tag2</tag>
96
                                    </stemtag>
97 93
                                    <xposition_m>$x_position</xposition_m>
98 94
                                    <yposition_m>$y_position</yposition_m>
99 95
                                </stemobservation>

Also available in: Unified diff