Project

General

Profile

« Previous | Next » 

Revision 904

VegBIEN: Renamed locationplace to locationdetermination

View differences:

inputs/NYBG/test/VegBIEN.specimens.xml.ref
7 7
                    <locationevent>
8 8
                        <location_id>
9 9
                            <location>
10
                                <locationplace>
10
                                <locationdetermination>
11 11
                                    <namedplace_id>
12 12
                                        <namedplace>
13 13
                                            <placesystem>area|country|territory</placesystem>
14 14
                                            <placename>Peru</placename>
15 15
                                        </namedplace>
16 16
                                    </namedplace_id>
17
                                </locationplace>
18
                                <locationplace>
17
                                </locationdetermination>
18
                                <locationdetermination>
19 19
                                    <namedplace_id>
20 20
                                        <namedplace>
21 21
                                            <placesystem>region|state|province</placesystem>
22 22
                                            <placename>Madre de Dios</placename>
23 23
                                        </namedplace>
24 24
                                    </namedplace_id>
25
                                </locationplace>
26
                                <locationplace>
25
                                </locationdetermination>
26
                                <locationdetermination>
27 27
                                    <namedplace_id>
28 28
                                        <namedplace>
29 29
                                            <placesystem>county</placesystem>
......
31 31
                                            <placedescription>Parque Nacional del Manu. R&#237;o Manu: Cocha Casha Station</placedescription>
32 32
                                        </namedplace>
33 33
                                    </namedplace_id>
34
                                </locationplace>
34
                                </locationdetermination>
35 35
                                <reallatitude>-11.80000000</reallatitude>
36 36
                                <reallongitude>-71.40000000</reallongitude>
37 37
                                <elevation>350.0</elevation>
......
163 163
                    <locationevent>
164 164
                        <location_id>
165 165
                            <location>
166
                                <locationplace>
166
                                <locationdetermination>
167 167
                                    <namedplace_id>
168 168
                                        <namedplace>
169 169
                                            <placesystem>area|country|territory</placesystem>
170 170
                                            <placename>Belize</placename>
171 171
                                        </namedplace>
172 172
                                    </namedplace_id>
173
                                </locationplace>
174
                                <locationplace>
173
                                </locationdetermination>
174
                                <locationdetermination>
175 175
                                    <namedplace_id>
176 176
                                        <namedplace>
177 177
                                            <placesystem>region|state|province</placesystem>
......
179 179
                                            <placedescription>Belize Zoo, in savanna plot immediately behind zoo. Mile 31 on Western Highway</placedescription>
180 180
                                        </namedplace>
181 181
                                    </namedplace_id>
182
                                </locationplace>
182
                                </locationdetermination>
183 183
                                <reallatitude>17.40000000</reallatitude>
184 184
                                <reallongitude>-88.50000000</reallongitude>
185 185
                                <elevation>15.0</elevation>
inputs/NYBG/maps/VegBIEN.specimens.csv
1 1
NYBG:nybg_raw,VegBIEN:/specimenreplicate,Comments,Order
2 2
CoordinatePrecision,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationaccuracy,,89
3
Country,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL,63
4
StateProvince,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename",,65
5
County,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename,,66
6
Locality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace/*_id/namedplace/placedescription,"or locality?; Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
3
Country,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL,63
4
StateProvince,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename",,65
5
County,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename,,66
6
Locality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/*_id/namedplace/placedescription,"or locality?; Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
7 7
Latitude,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/reallatitude,or decimalLatitude?,81
8 8
Longitude,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/reallongitude,or decimalLongitude?,82
9 9
MaximumElevation,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max,elevationrange/_range/to}",,72
inputs/SALVIAS/test/VegBIEN.plots.xml.ref
6 6
                <area>0.06</area>
7 7
                <authorlocationcode>ACHUPALL</authorlocationcode>
8 8
                <elevation>2100.0</elevation>
9
                <locationplace>
9
                <locationdetermination>
10 10
                    <namedplace_id>
11 11
                        <namedplace>
12 12
                            <placesystem>area|country|territory</placesystem>
13 13
                            <placename>Ecuador</placename>
14 14
                        </namedplace>
15 15
                    </namedplace_id>
16
                </locationplace>
17
                <locationplace>
16
                </locationdetermination>
17
                <locationdetermination>
18 18
                    <namedplace_id>
19 19
                        <namedplace>
20 20
                            <placesystem>continent</placesystem>
21 21
                            <placename>South America</placename>
22 22
                        </namedplace>
23 23
                    </namedplace_id>
24
                </locationplace>
24
                </locationdetermination>
25 25
                <reallatitude>-3.45</reallatitude>
26 26
                <reallongitude>-78.3667</reallongitude>
27 27
            </location>
......
55 55
                <area>0.1</area>
56 56
                <authorlocationcode>ALLACHER</authorlocationcode>
57 57
                <elevation>530.0</elevation>
58
                <locationplace>
58
                <locationdetermination>
59 59
                    <namedplace_id>
60 60
                        <namedplace>
61 61
                            <placesystem>area|country|territory</placesystem>
62 62
                            <placename>Germany</placename>
63 63
                        </namedplace>
64 64
                    </namedplace_id>
65
                </locationplace>
66
                <locationplace>
65
                </locationdetermination>
66
                <locationdetermination>
67 67
                    <namedplace_id>
68 68
                        <namedplace>
69 69
                            <placesystem>continent</placesystem>
70 70
                            <placename>Europe</placename>
71 71
                        </namedplace>
72 72
                    </namedplace_id>
73
                </locationplace>
73
                </locationdetermination>
74 74
                <reallatitude>48.0667</reallatitude>
75 75
                <reallongitude>11.5</reallongitude>
76 76
            </location>
inputs/SALVIAS/maps/VegBIEN.plots.csv
2 2
plot_area_ha,/*_id/location/area,"Brad: Area in hectares. Is there any way to store units?; Aaron: VegX plot area annotation says ""Total area of the plot in square meters."" so units are fixed"
3 3
SiteCode,/*_id/location/authorlocationcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
4 4
Elev,/*_id/location/elevation/_alt/1,Brad: Mean elevation in meters. This is a constrained decimal value; is there no place for this in VegX other than verbatimElevation? Check with Nick.
5
Country,"/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename",
6
PolDiv1,"/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename",Brad: No; pol1=stateProvince
7
MajorGeo,/*_id/location/locationplace(/*_id/namedplace[placesystem=continent])/placename,
8
pol2,/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename,Brad: No pol2=countyParish
9
Locality_Description,/*_id/location/locationplace/*_id/namedplace/placedescription,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
5
Country,"/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename",
6
PolDiv1,"/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename",Brad: No; pol1=stateProvince
7
MajorGeo,/*_id/location/locationdetermination(/*_id/namedplace[placesystem=continent])/placename,
8
pol2,/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename,Brad: No pol2=countyParish
9
Locality_Description,/*_id/location/locationdetermination/*_id/namedplace/placedescription,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
10 10
LatDec,/*_id/location/reallatitude,
11 11
LongDec,/*_id/location/reallongitude,
12 12
slope_aspect,/*_id/location/slopeaspect,
inputs/NYBG-CSV/test/VegBIEN.organisms.xml.ref
5 5
            <locationevent>
6 6
                <location_id>
7 7
                    <location>
8
                        <locationplace>
8
                        <locationdetermination>
9 9
                            <namedplace_id>
10 10
                                <namedplace>
11 11
                                    <placesystem>area|country|territory</placesystem>
12 12
                                    <placename>Peru</placename>
13 13
                                </namedplace>
14 14
                            </namedplace_id>
15
                        </locationplace>
16
                        <locationplace>
15
                        </locationdetermination>
16
                        <locationdetermination>
17 17
                            <namedplace_id>
18 18
                                <namedplace>
19 19
                                    <placesystem>region|state|province</placesystem>
20 20
                                    <placename>Madre de Dios</placename>
21 21
                                </namedplace>
22 22
                            </namedplace_id>
23
                        </locationplace>
24
                        <locationplace>
23
                        </locationdetermination>
24
                        <locationdetermination>
25 25
                            <namedplace_id>
26 26
                                <namedplace>
27 27
                                    <placesystem>county</placesystem>
......
29 29
                                    <placedescription>Parque Nacional del Manu. R&#237;o Manu: Cocha Casha Station</placedescription>
30 30
                                </namedplace>
31 31
                            </namedplace_id>
32
                        </locationplace>
32
                        </locationdetermination>
33 33
                        <reallatitude>-11.80</reallatitude>
34 34
                        <reallongitude>-71.40</reallongitude>
35 35
                        <elevation>350.0</elevation>
......
159 159
            <locationevent>
160 160
                <location_id>
161 161
                    <location>
162
                        <locationplace>
162
                        <locationdetermination>
163 163
                            <namedplace_id>
164 164
                                <namedplace>
165 165
                                    <placesystem>area|country|territory</placesystem>
166 166
                                    <placename>Belize</placename>
167 167
                                </namedplace>
168 168
                            </namedplace_id>
169
                        </locationplace>
170
                        <locationplace>
169
                        </locationdetermination>
170
                        <locationdetermination>
171 171
                            <namedplace_id>
172 172
                                <namedplace>
173 173
                                    <placesystem>region|state|province</placesystem>
......
175 175
                                    <placedescription>Belize Zoo, in savanna plot immediately behind zoo. Mile 31 on Western Highway</placedescription>
176 176
                                </namedplace>
177 177
                            </namedplace_id>
178
                        </locationplace>
178
                        </locationdetermination>
179 179
                        <reallatitude>17.40</reallatitude>
180 180
                        <reallongitude>-88.50</reallongitude>
181 181
                        <elevation>15.0</elevation>
inputs/NYBG-CSV/maps/VegBIEN.organisms.csv
1 1
NYBG,VegBIEN:/taxonoccurrence,Comments
2 2
BoundingBox,/*_id/locationevent/*_id/location/dsgpoly,
3 3
CoordinatePrecision,/*_id/locationevent/*_id/location/locationaccuracy,
4
Country,"/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL
5
StateProvince,"/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename",
6
County,/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename,
7
Locality,/*_id/locationevent/*_id/location/locationplace/*_id/namedplace/placedescription,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one."
4
Country,"/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL
5
StateProvince,"/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename",
6
County,/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename,
7
Locality,/*_id/locationevent/*_id/location/locationdetermination/*_id/namedplace/placedescription,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one."
8 8
Latitude,/*_id/locationevent/*_id/location/reallatitude,
9 9
Longitude,/*_id/locationevent/*_id/location/reallongitude,
10 10
MaximumElevation,"/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max,elevationrange/_range/to}",
inputs/SALVIAS-CSV/test/VegBIEN.plots.xml.ref
6 6
                <area>0.44</area>
7 7
                <authorlocationcode>ALP-11</authorlocationcode>
8 8
                <elevation>200</elevation>
9
                <locationplace>
9
                <locationdetermination>
10 10
                    <namedplace_id>
11 11
                        <namedplace>
12 12
                            <placesystem>area|country|territory</placesystem>
13 13
                            <placename>Peru</placename>
14 14
                        </namedplace>
15 15
                    </namedplace_id>
16
                </locationplace>
17
                <locationplace>
16
                </locationdetermination>
17
                <locationdetermination>
18 18
                    <namedplace_id>
19 19
                        <namedplace>
20 20
                            <placesystem>region|state|province</placesystem>
21 21
                            <placename>Loreto</placename>
22 22
                        </namedplace>
23 23
                    </namedplace_id>
24
                </locationplace>
25
                <locationplace>
24
                </locationdetermination>
25
                <locationdetermination>
26 26
                    <namedplace_id>
27 27
                        <namedplace>
28 28
                            <placesystem>continent</placesystem>
......
30 30
                            <placedescription>pre-Holocene; clay</placedescription>
31 31
                        </namedplace>
32 32
                    </namedplace_id>
33
                </locationplace>
33
                </locationdetermination>
34 34
                <reallatitude>-3.95</reallatitude>
35 35
                <reallongitude>-73.4333</reallongitude>
36 36
            </location>
......
45 45
                <area>0.4</area>
46 46
                <authorlocationcode>ALP-12</authorlocationcode>
47 47
                <elevation>200</elevation>
48
                <locationplace>
48
                <locationdetermination>
49 49
                    <namedplace_id>
50 50
                        <namedplace>
51 51
                            <placesystem>area|country|territory</placesystem>
52 52
                            <placename>Peru</placename>
53 53
                        </namedplace>
54 54
                    </namedplace_id>
55
                </locationplace>
56
                <locationplace>
55
                </locationdetermination>
56
                <locationdetermination>
57 57
                    <namedplace_id>
58 58
                        <namedplace>
59 59
                            <placesystem>region|state|province</placesystem>
60 60
                            <placename>Loreto</placename>
61 61
                        </namedplace>
62 62
                    </namedplace_id>
63
                </locationplace>
64
                <locationplace>
63
                </locationdetermination>
64
                <locationdetermination>
65 65
                    <namedplace_id>
66 66
                        <namedplace>
67 67
                            <placesystem>continent</placesystem>
......
69 69
                            <placedescription>pre-Holocene; white and brown sand</placedescription>
70 70
                        </namedplace>
71 71
                    </namedplace_id>
72
                </locationplace>
72
                </locationdetermination>
73 73
                <reallatitude>-3.95</reallatitude>
74 74
                <reallongitude>-73.4333</reallongitude>
75 75
            </location>
inputs/SALVIAS-CSV/maps/VegBIEN.plots.csv
2 2
plot_area_ha,/*_id/location/area,"Brad: Area in hectares. Is there any way to store units?; Aaron: VegX plot area annotation says ""Total area of the plot in square meters."" so units are fixed"
3 3
plot_code,/*_id/location/authorlocationcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
4 4
elev_m,/*_id/location/elevation/_alt/1,Brad: Mean elevation in meters. This is a constrained decimal value; is there no place for this in VegX other than verbatimElevation? Check with Nick.
5
country,"/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename",
6
pol1,"/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename",Brad: No; pol1=stateProvince
7
major_geo,/*_id/location/locationplace(/*_id/namedplace[placesystem=continent])/placename,
8
pol2,/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename,Brad: No pol2=countyParish
9
locality_description,/*_id/location/locationplace/*_id/namedplace/placedescription,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
5
country,"/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename",
6
pol1,"/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename",Brad: No; pol1=stateProvince
7
major_geo,/*_id/location/locationdetermination(/*_id/namedplace[placesystem=continent])/placename,
8
pol2,/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename,Brad: No pol2=countyParish
9
locality_description,/*_id/location/locationdetermination/*_id/namedplace/placedescription,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
10 10
lat_decimal,/*_id/location/reallatitude,
11 11
long_decimal,/*_id/location/reallongitude,
12 12
slope_aspect,/*_id/location/slopeaspect,
schemas/vegbien.my.sql
1184 1184

  
1185 1185

  
1186 1186
--
1187
-- Name: locationplace; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1187
-- Name: locationdetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1188 1188
--
1189 1189

  
1190
CREATE TABLE locationplace (
1191
    locationplace_id int(11) NOT NULL,
1190
CREATE TABLE locationdetermination (
1191
    locationdetermination_id int(11) NOT NULL,
1192 1192
    location_id int(11) NOT NULL,
1193 1193
    calculated int(1),
1194 1194
    namedplace_id int(11) NOT NULL
......
1196 1196

  
1197 1197

  
1198 1198
--
1199
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1199
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1200 1200
--
1201 1201

  
1202 1202

  
1203 1203

  
1204 1204

  
1205 1205
--
1206
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1206
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1207 1207
--
1208 1208

  
1209 1209

  
......
3157 3157

  
3158 3158

  
3159 3159
--
3160
-- Name: locationplace_id; Type: DEFAULT; Schema: public; Owner: -
3160
-- Name: locationdetermination_id; Type: DEFAULT; Schema: public; Owner: -
3161 3161
--
3162 3162

  
3163 3163

  
......
3886 3886

  
3887 3887

  
3888 3888
--
3889
-- Name: locationplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3889
-- Name: locationdetermination_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3890 3890
--
3891 3891

  
3892
ALTER TABLE locationplace
3893
    ADD CONSTRAINT locationplace_keys UNIQUE (location_id, namedplace_id);
3892
ALTER TABLE locationdetermination
3893
    ADD CONSTRAINT locationdetermination_keys UNIQUE (location_id, namedplace_id);
3894 3894

  
3895 3895

  
3896 3896
--
3897
-- Name: locationplace_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3897
-- Name: locationdetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3898 3898
--
3899 3899

  
3900
ALTER TABLE locationplace
3901
    ADD CONSTRAINT locationplace_pkey PRIMARY KEY (locationplace_id);
3900
ALTER TABLE locationdetermination
3901
    ADD CONSTRAINT locationdetermination_pkey PRIMARY KEY (locationdetermination_id);
3902 3902

  
3903 3903

  
3904 3904
--
......
5032 5032

  
5033 5033

  
5034 5034
--
5035
-- Name: locationplace_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5035
-- Name: locationdetermination_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5036 5036
--
5037 5037

  
5038
CREATE INDEX locationplace_location_id_x ON locationplace  (location_id);
5038
CREATE INDEX locationdetermination_location_id_x ON locationdetermination  (location_id);
5039 5039

  
5040 5040

  
5041 5041
--
5042
-- Name: locationplace_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5042
-- Name: locationdetermination_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5043 5043
--
5044 5044

  
5045
CREATE INDEX locationplace_namedplace_id_x ON locationplace  (namedplace_id);
5045
CREATE INDEX locationdetermination_namedplace_id_x ON locationdetermination  (namedplace_id);
5046 5046

  
5047 5047

  
5048 5048
--
......
6092 6092

  
6093 6093

  
6094 6094
--
6095
-- Name: locationplace_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6095
-- Name: locationdetermination_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6096 6096
--
6097 6097

  
6098
ALTER TABLE locationplace
6099
    ADD CONSTRAINT locationplace_location_id FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
6098
ALTER TABLE locationdetermination
6099
    ADD CONSTRAINT locationdetermination_location_id FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
6100 6100

  
6101 6101

  
6102 6102
--
6103
-- Name: locationplace_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6103
-- Name: locationdetermination_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6104 6104
--
6105 6105

  
6106
ALTER TABLE locationplace
6107
    ADD CONSTRAINT locationplace_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6106
ALTER TABLE locationdetermination
6107
    ADD CONSTRAINT locationdetermination_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6108 6108

  
6109 6109

  
6110 6110
--
schemas/vegbien_empty.sql
33 33
TRUNCATE locationevent CASCADE;
34 34
TRUNCATE locationeventcontributor CASCADE;
35 35
TRUNCATE locationeventsynonym CASCADE;
36
TRUNCATE locationplace CASCADE;
36
TRUNCATE locationdetermination CASCADE;
37 37
TRUNCATE namedplace CASCADE;
38 38
TRUNCATE namedplacecorrelation CASCADE;
39 39
TRUNCATE note CASCADE;
schemas/vegbien.sql
1365 1365

  
1366 1366

  
1367 1367
--
1368
-- Name: locationplace; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1368
-- Name: locationdetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1369 1369
--
1370 1370

  
1371
CREATE TABLE locationplace (
1372
    locationplace_id integer NOT NULL,
1371
CREATE TABLE locationdetermination (
1372
    locationdetermination_id integer NOT NULL,
1373 1373
    location_id integer NOT NULL,
1374 1374
    calculated boolean,
1375 1375
    namedplace_id integer NOT NULL
......
1377 1377

  
1378 1378

  
1379 1379
--
1380
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1380
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1381 1381
--
1382 1382

  
1383
CREATE SEQUENCE locationplace_locationplace_id_seq
1383
CREATE SEQUENCE locationdetermination_locationdetermination_id_seq
1384 1384
    START WITH 1
1385 1385
    INCREMENT BY 1
1386 1386
    NO MINVALUE
......
1389 1389

  
1390 1390

  
1391 1391
--
1392
-- Name: locationplace_locationplace_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1392
-- Name: locationdetermination_locationdetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1393 1393
--
1394 1394

  
1395
ALTER SEQUENCE locationplace_locationplace_id_seq OWNED BY locationplace.locationplace_id;
1395
ALTER SEQUENCE locationdetermination_locationdetermination_id_seq OWNED BY locationdetermination.locationdetermination_id;
1396 1396

  
1397 1397

  
1398 1398
--
......
3613 3613

  
3614 3614

  
3615 3615
--
3616
-- Name: locationplace_id; Type: DEFAULT; Schema: public; Owner: -
3616
-- Name: locationdetermination_id; Type: DEFAULT; Schema: public; Owner: -
3617 3617
--
3618 3618

  
3619
ALTER TABLE locationplace ALTER COLUMN locationplace_id SET DEFAULT nextval('locationplace_locationplace_id_seq'::regclass);
3619
ALTER TABLE locationdetermination ALTER COLUMN locationdetermination_id SET DEFAULT nextval('locationdetermination_locationdetermination_id_seq'::regclass);
3620 3620

  
3621 3621

  
3622 3622
--
......
4342 4342

  
4343 4343

  
4344 4344
--
4345
-- Name: locationplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4345
-- Name: locationdetermination_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4346 4346
--
4347 4347

  
4348
ALTER TABLE ONLY locationplace
4349
    ADD CONSTRAINT locationplace_keys UNIQUE (location_id, namedplace_id);
4348
ALTER TABLE ONLY locationdetermination
4349
    ADD CONSTRAINT locationdetermination_keys UNIQUE (location_id, namedplace_id);
4350 4350

  
4351 4351

  
4352 4352
--
4353
-- Name: locationplace_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4353
-- Name: locationdetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4354 4354
--
4355 4355

  
4356
ALTER TABLE ONLY locationplace
4357
    ADD CONSTRAINT locationplace_pkey PRIMARY KEY (locationplace_id);
4356
ALTER TABLE ONLY locationdetermination
4357
    ADD CONSTRAINT locationdetermination_pkey PRIMARY KEY (locationdetermination_id);
4358 4358

  
4359 4359

  
4360 4360
--
......
5488 5488

  
5489 5489

  
5490 5490
--
5491
-- Name: locationplace_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5491
-- Name: locationdetermination_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5492 5492
--
5493 5493

  
5494
CREATE INDEX locationplace_location_id_x ON locationplace USING btree (location_id);
5494
CREATE INDEX locationdetermination_location_id_x ON locationdetermination USING btree (location_id);
5495 5495

  
5496 5496

  
5497 5497
--
5498
-- Name: locationplace_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5498
-- Name: locationdetermination_namedplace_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5499 5499
--
5500 5500

  
5501
CREATE INDEX locationplace_namedplace_id_x ON locationplace USING btree (namedplace_id);
5501
CREATE INDEX locationdetermination_namedplace_id_x ON locationdetermination USING btree (namedplace_id);
5502 5502

  
5503 5503

  
5504 5504
--
......
6560 6560

  
6561 6561

  
6562 6562
--
6563
-- Name: locationplace_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6563
-- Name: locationdetermination_location_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6564 6564
--
6565 6565

  
6566
ALTER TABLE ONLY locationplace
6567
    ADD CONSTRAINT locationplace_location_id FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
6566
ALTER TABLE ONLY locationdetermination
6567
    ADD CONSTRAINT locationdetermination_location_id FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
6568 6568

  
6569 6569

  
6570 6570
--
6571
-- Name: locationplace_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6571
-- Name: locationdetermination_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6572 6572
--
6573 6573

  
6574
ALTER TABLE ONLY locationplace
6575
    ADD CONSTRAINT locationplace_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6574
ALTER TABLE ONLY locationdetermination
6575
    ADD CONSTRAINT locationdetermination_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6576 6576

  
6577 6577

  
6578 6578
--
mappings/VegX-VegBIEN.plots.csv
4 4
/*UniqueIdentifierID->/*s/plot/geospatial/FootprintWKT,/*_id/location/dsgpoly
5 5
/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/*_id/location/elevation/_alt/1
6 6
/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/*_id/location/locationaccuracy
7
/*UniqueIdentifierID->/*s/plot/country,"/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename"
8
/*UniqueIdentifierID->/*s/plot/state,"/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename"
9
/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value,/*_id/location/locationplace(/*_id/namedplace[placesystem=continent])/placename
10
/*UniqueIdentifierID->/*s/plot/county,/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename
11
/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value,/*_id/location/locationplace/*_id/namedplace/placedescription
12
/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value,/*_id/location/locationplace/*_id/namedplace/placedescription
7
/*UniqueIdentifierID->/*s/plot/country,"/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename"
8
/*UniqueIdentifierID->/*s/plot/state,"/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename"
9
/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value,/*_id/location/locationdetermination(/*_id/namedplace[placesystem=continent])/placename
10
/*UniqueIdentifierID->/*s/plot/county,/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename
11
/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value,/*_id/location/locationdetermination/*_id/namedplace/placedescription
12
/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value,/*_id/location/locationdetermination/*_id/namedplace/placedescription
13 13
/*UniqueIdentifierID->/*s/plot/relatedSpatialItem/relatedItem[relationshipType=parentPlot]/relatedItemID->/*s/plot/plotUniqueIdentifier,/*_id/location/parent_id/location/authorlocationcode
14 14
/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude,/*_id/location/reallatitude
15 15
/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude,/*_id/location/reallongitude
mappings/VegX-VegBIEN.organisms.csv
4 4
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/FootprintWKT,/*_id/locationevent/*_id/location/dsgpoly
5 5
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/*_id/locationevent/*_id/location/elevation/_alt/1
6 6
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/*_id/locationevent/*_id/location/locationaccuracy
7
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/country,"/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename"
8
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/state,"/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename"
9
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value,/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=continent])/placename
10
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/county,/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename
11
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value,/*_id/locationevent/*_id/location/locationplace/*_id/namedplace/placedescription
12
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value,/*_id/locationevent/*_id/location/locationplace/*_id/namedplace/placedescription
7
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/country,"/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename"
8
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/state,"/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename"
9
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value,/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=continent])/placename
10
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/county,/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename
11
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value,/*_id/locationevent/*_id/location/locationdetermination/*_id/namedplace/placedescription
12
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value,/*_id/locationevent/*_id/location/locationdetermination/*_id/namedplace/placedescription
13 13
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/relatedSpatialItem/relatedItem[relationshipType=parentPlot]/relatedItemID->/*s/plot/plotUniqueIdentifier,/*_id/locationevent/*_id/location/parent_id/location/authorlocationcode
14 14
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude,/*_id/locationevent/*_id/location/reallatitude
15 15
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude,/*_id/locationevent/*_id/location/reallongitude
mappings/for_review/VegX-VegBIEN.organisms.csv
104 104
//*s/taxonConcept[@code=fam]/Name,"/taxondetermination[rolecode=computer,plantlevel=Family]/*_id/plantconcept/*_id/*/plantname"
105 105
//*s/taxonConcept[@code=gen]/Name,"/taxondetermination[rolecode=computer,plantlevel=Genus]/*_id/plantconcept/*_id/*/plantname"
106 106
//*s/taxonConcept[@code=sp]/Name,"/taxondetermination[rolecode=computer,plantlevel=Species]/*_id/plantconcept/*_id/*/plantname"
107
//*s/taxonConcept[@code=TaxonomicRankBelowSubspeciesEnum]/Rank,"/taxondetermination[rolecode=computer,plantlevel=Subspecies]/*_id/plantconcept/_name/first"
108
//*s/taxonConcept[@code=TaxonomicRankBelowSubspeciesEnum]/Name,"/taxondetermination[rolecode=computer,plantlevel=Subspecies]/*_id/plantconcept/_name/last"
107
//*s/taxonConcept[@code=TaxonomicRankBelowSubspeciesEnum]/Rank,"/taxondetermination[rolecode=computer,plantlevel=Subspecies]/*_id/plantconcept/*_id/*/plantname/_name/first"
108
//*s/taxonConcept[@code=TaxonomicRankBelowSubspeciesEnum]/Name,"/taxondetermination[rolecode=computer,plantlevel=Subspecies]/*_id/plantconcept/*_id/*/plantname/_name/last"
109 109
//*s/taxonDetermination[role=computer]/note,"/taxondetermination[rolecode=identifier]/definedvalue[*_id/userdefined[tablename=taxondetermination,userdefinedname=cfAff]]/definedvalue"
110 110
//individualOrganism/simpleUserdefined[name=sex]/value,"/taxondetermination[rolecode=identifier]/definedvalue[*_id/userdefined[tablename=taxondetermination,userdefinedname=sex]]/definedvalue"
111 111
//*s/taxonDetermination[role=identifier]/date,/taxondetermination[rolecode=identifier]/determinationdate
mappings/DwC-VegBIEN.specimens.csv
1 1
"DwC::[@xmlns:dcterms=""http://purl.org/dc/terms/""]/list/",VegBIEN:/specimenreplicate,Comments,Order
2 2
coordinatePrecision,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationaccuracy,,89
3
country,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL,63
4
stateProvince,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=""region|state|province""])/placename",,65
5
county,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace(/*_id/namedplace[placesystem=county])/placename,,66
6
verbatimLocality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationplace/*_id/namedplace/placedescription,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
3
country,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""area|country|territory""])/placename",Brad: Required; reject record if this field NULL,63
4
stateProvince,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=""region|state|province""])/placename",,65
5
county,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination(/*_id/namedplace[placesystem=county])/placename,,66
6
verbatimLocality,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/*_id/namedplace/placedescription,"Brad: Correct for VB; Nick, is there no specific element for locality description in VegX? Definitely need one.",69
7 7
verbatimLatitude,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/reallatitude,,81
8 8
verbatimLongitude,/*_id/taxonoccurrence/*_id/locationevent/*_id/location/reallongitude,,82
9 9
maximumElevationInMeters,"/*_id/taxonoccurrence/*_id/locationevent/*_id/location/{elevation/_alt/2/_avg/max,elevationrange/_range/to}",,72

Also available in: Unified diff