Project

General

Profile

« Previous | Next » 

Revision 69

Finished ch_map_root (renamed from submap)

View differences:

scripts/util/submap
1
#!/usr/bin/env python
2
# Extracts subpaths from a map spreadsheet
3

  
4
import csv
5
import os.path
6
import sys
7

  
8
sys.path.append(os.path.dirname(__file__)+"/../lib")
9

  
10
import opts
11

  
12
def all_not_none(list_):
13
    return reduce(lambda a, b: a and b, map(lambda e: e != None, list_))
14

  
15
def main():
16
    # Get subpath config from env vars
17
    config_names = ['subpath', 'new_root']
18
    env_names = []
19
    configs = map(lambda col: opts.get_env_vars(config_names, col, env_names),
20
        ['left', 'right'])
21
    if not all_not_none(configs): raise SystemExit(
22
        'Usage: '+opts.env_usage(env_names)+' '+sys.argv[0]+' <map >submap')
23
    
24
    # Transform map
25
    for config in configs:
26
        config['prefix'] = config['subpath']+config['new_root']
27
        config['prefix_len'] = len(config['prefix'])
28
    reader = csv.reader(sys.stdin)
29
    col_names = reader.next()[:2]
30
    # TODO: replace col_names with new_roots
31
    writer = csv.writer(sys.stdout)
32
    writer.writerow(col_names)
33
    for row in reader:
34
        if row[0].startswith(configs[0]['prefix']):
35
            assert row[1].startswith(configs[1]['prefix'])
36
            for idx in range(len(configs)):
37
                row[idx] = row[idx][configs[idx]['prefix_len']:]
38
            writer.writerow(row)
39

  
40
main()
41 0

  
scripts/util/ch_map_root
1
#!/usr/bin/env python
2
# Transforms a map spreadsheet to use a different root
3

  
4
import csv
5
import os.path
6
import sys
7

  
8
sys.path.append(os.path.dirname(__file__)+"/../lib")
9

  
10
import opts
11

  
12
def all_not_none(list_):
13
    return reduce(lambda a, b: a and b, map(lambda e: e != None, list_))
14

  
15
def main():
16
    # Get config from env vars
17
    config_names = ['in_root', 'out_root']
18
    env_names = []
19
    configs = map(lambda col: opts.get_env_vars(config_names, col, env_names),
20
        ['left', 'right'])
21
    if not all_not_none(configs): raise SystemExit(
22
        'Usage: '+opts.env_usage(env_names)+' '+sys.argv[0]+' <in_map >out_map')
23
    
24
    # Transform map
25
    reader = csv.reader(sys.stdin)
26
    writer = csv.writer(sys.stdout)
27
    cols = reader.next()
28
    for i in range(len(configs)):
29
        config = configs[i]
30
        config['root'] = cols[i]
31
        label = cols[i].partition('/')[0]
32
        config['prefix'] = label+config['in_root']
33
        config['prefix_len'] = len(config['prefix'])
34
        cols[i] = label+config['out_root']
35
    writer.writerow(cols)
36
    for row in reader:
37
        for i in range(len(configs)): row[i] = configs[i]['root']+row[i]
38
        if row[0].startswith(configs[0]['prefix']):
39
            assert row[1].startswith(configs[1]['prefix'])
40
            for i in range(len(configs)):
41
                row[i] = row[i][configs[i]['prefix_len']:]
42
            writer.writerow(row)
43

  
44
main()
0 45

  
mappings/extract_plot_map
4 4
selfDir="$(dirname -- "$0")"
5 5
cd "$selfDir"
6 6

  
7
export left_subpath='*ID->' left_new_root='/*s/plotObservation/' \
8
right_subpath= right_new_root=
7
export \
8
left_in_root='/*s/individualOrganismObservation/*ID->/*s/plotObservation/' \
9
left_out_root='/*s/plotObservation/' \
10
right_in_root=/ \
11
right_out_root=/
9 12

  
10
../scripts/util/submap <VegX-VegBank.csv >VegX-VegBank.plots.csv
13
../scripts/util/ch_map_root <VegX-VegBank.csv >VegX-VegBank.plots.csv
mappings/VegX-VegBank.csv
1 1
"VegX/*s/individualOrganismObservation/","VegBank/"
2 2
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=TaxonomicRankBelowSubspeciesEnum])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Subspecies])/PLANTNAME_ID/plantName/plantName/epithet"
3
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/definedValue[@fkey=tableRecord_ID,userDefined[tableName=taxonInterpretation,userDefinedName=detType]]/definedValue"
4
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/givenName","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collector_ID->/party/givenName"
5
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/surName","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collector_ID->/party/surName"
3
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=TaxonomicRankBelowSubspeciesEnum])/Rank","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Subspecies])/PLANTNAME_ID/plantName/plantName/rank"
6 4
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=fam])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Family])/PLANTNAME_ID/plantName/plantName"
7 5
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=gen])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Genus])/PLANTNAME_ID/plantName/plantName"
8 6
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=sp])/AccordingTo/Simple","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Species])/PLANTNAME_ID/plantName/reference_ID->/referenceParty/{givenName,surname}"
9 7
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=sp])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Species])/PLANTNAME_ID/plantName/plantName"
10
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=TaxonomicRankBelowSubspeciesEnum])/Rank","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Subspecies])/PLANTNAME_ID/plantName/plantName/rank"
11 8
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=TaxonScrubber]/note","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/definedValue[@fkey=tableRecord_ID,userDefined[tableName=taxonInterpretation,userDefinedName=cfAff]]/definedValue"
9
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/definedValue[@fkey=tableRecord_ID,userDefined[tableName=taxonInterpretation,userDefinedName=detType]]/definedValue"
10
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/givenName","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collector_ID->/party/givenName"
11
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/surName","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collector_ID->/party/surName"
12 12
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=cl])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Class])/PLANTNAME_ID/plantName/plantName"
13 13
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=fam])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Family])/PLANTNAME_ID/plantName/plantName"
14 14
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=gen])/Name","stemLocation/taxonInterpretation(/PLANTCONCEPT_ID/plantConcept[plantStatus/plantLevel=Genus])/PLANTNAME_ID/plantName/plantName"
......
31 31
"*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/voucher","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/museumAccessionNumber"
32 32
"*ID->/*s/individualOrganism/identificationLabel","stemLocation/stemCode"
33 33
"*ID->/*s/individualOrganism/simpleUserdefined[name=sex]/value","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/definedValue[@fkey=tableRecord_ID,userDefined[tableName=taxonInterpretation,userDefinedName=sex]]/definedValue"
34
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/magnesium","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilMagnesium]]/definedValue"
35
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/nitrogen","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilNitrogen]]/definedValue"
36
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/ph","soilObs/soilPH"
37
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/phosphorus","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilPhosphorus]]/definedValue"
38
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/pottasium","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilPotassium]]/definedValue"
39
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=acidity]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilAcidity]]/definedValue"
40
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=base]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilBase]]/definedValue"
41
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=calcium]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilCalcium]]/definedValue"
42
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=carbon]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilCarbon]]/definedValue"
43
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=cationCap]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilCationCap]]/definedValue"
44
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=clayPercent]/value","soilObs/soilClay"
45
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=conductivity]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilConductivity]]/definedValue"
46
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=organicPercent]/value","soilObs/soilOrganic"
47
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=sandPercent]/value","soilObs/soilSand"
48
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=siltPercent]/value","soilObs/soilSilt"
49
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=sodium]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilSodium]]/definedValue"
50
"*ID->/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=texture]/value","soilObs/soilTexture"
34 51
"*ID->/*s/plotObservation->/*s/aggregateOrganismObservation[*ID]/simpleUserdefined[name=noOfIndividuals]/value","stemCount/stemCount"
52
"*ID->/*s/plotObservation->/*s/communityDetermination[*ID]/communityConcepts/communityConcept/commonName","commName/commName"
53
"*ID->/*s/plotObservation->/*s/communityDetermination[*ID]/communityConcepts/communityConcept/name","commConcept/commDescription"
54
"*ID->/*s/plotObservation/*ID->/*s/project/title","project/projectName"
55
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area","plot/area"
35 56
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/country","namedPlace[placeSystem=area|country|territory]/placeName"
57
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/county","namedPlace[placeSystem=Geographic Name]/placeName"
36 58
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/county","namedPlace[placeSystem=county]/placeName"
37 59
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters","plot/locationAccuracy"
38 60
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude","plot/realLatitude"
39 61
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude","plot/realLongitude"
40 62
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/FootprintWKT","plot/dsgpoly"
41 63
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/maximumDepthInMeters","observation/waterDepth/max"
64
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters","plot/elevationRange/max"
42 65
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters","plot/{elevation/max,elevationRange/to}"
43 66
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/minimumDepthInMeters","observation/waterDepth/min"
67
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters","plot/elevationRange/min"
44 68
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters","plot/{elevation/min,elevationRange/from}"
69
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation","plot/elevation"
45 70
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier","plot/authorPlotCode"
71
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier","plot/authorPlotCode,observation/authorObsCode"
46 72
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/relatedSpatialItem/relatedItem[relationshipType=parentPlot]/relatedItemID->/*s/plot/plotUniqueIdentifier","plot/PARENT_ID->/plot/authorPlotCode"
73
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value","namedPlace/placeDescription"
47 74
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value","namedPlace/placeDescription"
75
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value","namedPlace[placeSystem=continent]/placeName"
76
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/slopeAspect","plot/slopeAspect"
77
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/slopeGradient","plot/slopeGradient"
78
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/state","namedPlace[placeSystem=Geographic Name]/placeName"
48 79
"*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/state","namedPlace[placeSystem=region|state|province]/placeName"
80
"*ID->/*s/plotObservation/obsEndDate","observation/obsEndDate"
81
"*ID->/*s/plotObservation/obsStartDate","observation/obsStartDate"
49 82
"*ID->/*s/plotObservation/obsStartDate","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate,observation/authorObsCode"
50 83
"*ID->/*s/plotObservation/obsStartDate/_date/day","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate/_date/day"
51 84
"*ID->/*s/plotObservation/obsStartDate/_date/month","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate/_date/month"
52 85
"*ID->/*s/plotObservation/obsStartDate/_date/year","stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate/_date/year"
86
"*ID->/*s/plotObservation/simpleUserdefined[name=plotMethodology]/value","observation/methodNarrative"
87
"*ID->/*s/plotObservation/simpleUserdefined[name=precipMm]/value","observation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=observation,userDefinedName=precipMm]]/definedValue"
88
"*ID->/*s/plotObservation/temperature","observation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=observation,userDefinedName=tempC]]/definedValue"
53 89
"diameterBaseDistance[baseDistance=0]/diameter","stemLocation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=stemLocation,userDefinedName=basalDiam]]/definedValue"
54 90
"diameterBaseDistance[baseDistance=1.37]/diameter","stemCount/stemDiameter"
55 91
"height","stemCount/stemHeight"
......
70 106
"simpleUserdefined[name=vegetation]/value","stemLocation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=stemLocation,userDefinedName=vegetation]]/definedValue"
71 107
"simpleUserdefined[name=xPosition]/value","stemLocation/stemXPosition"
72 108
"simpleUserdefined[name=yPosition]/value","stemLocation/stemYPosition"
73
"/*s/plotObservation->/*s/abioticObservation[*ID]/magnesium","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilMagnesium]]/definedValue"
74
"/*s/plotObservation->/*s/abioticObservation[*ID]/nitrogen","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilNitrogen]]/definedValue"
75
"/*s/plotObservation->/*s/abioticObservation[*ID]/ph","soilObs/soilPH"
76
"/*s/plotObservation->/*s/abioticObservation[*ID]/phosphorus","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilPhosphorus]]/definedValue"
77
"/*s/plotObservation->/*s/abioticObservation[*ID]/pottasium","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilPotassium]]/definedValue"
78
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=acidity]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilAcidity]]/definedValue"
79
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=base]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilBase]]/definedValue"
80
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=calcium]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilCalcium]]/definedValue"
81
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=carbon]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilCarbon]]/definedValue"
82
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=cationCap]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilCationCap]]/definedValue"
83
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=clayPercent]/value","soilObs/soilClay"
84
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=conductivity]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilConductivity]]/definedValue"
85
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=organicPercent]/value","soilObs/soilOrganic"
86
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=sandPercent]/value","soilObs/soilSand"
87
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=siltPercent]/value","soilObs/soilSilt"
88
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=sodium]/value","soilObs/definedValue[@fkey=tableRecord_ID,userDefined[tableName=soilObs,userDefinedName=soilSodium]]/definedValue"
89
"/*s/plotObservation->/*s/abioticObservation[*ID]/simpleUserdefined[name=texture]/value","soilObs/soilTexture"
90
"/*s/plotObservation->/*s/communityDetermination[*ID]/communityConcepts/communityConcept/commonName","commName/commName"
91
"/*s/plotObservation->/*s/communityDetermination[*ID]/communityConcepts/communityConcept/name","commConcept/commDescription"
92
"/*s/plotObservation/*ID->/*s/project/title","project/projectName"
93
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area","plot/area"
94
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/country","namedPlace[placeSystem=area|country|territory]/placeName"
95
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/county","namedPlace[placeSystem=Geographic Name]/placeName"
96
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude","plot/realLatitude"
97
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude","plot/realLongitude"
98
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters","plot/elevationRange/max"
99
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters","plot/elevationRange/min"
100
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation","plot/elevation"
101
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier","plot/authorPlotCode,observation/authorObsCode"
102
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value","namedPlace/placeDescription"
103
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value","namedPlace[placeSystem=continent]/placeName"
104
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/slopeAspect","plot/slopeAspect"
105
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/slopeGradient","plot/slopeGradient"
106
"/*s/plotObservation/*UniqueIdentifierID->/*s/plot/state","namedPlace[placeSystem=Geographic Name]/placeName"
107
"/*s/plotObservation/obsEndDate","observation/obsEndDate"
108
"/*s/plotObservation/obsStartDate","observation/obsStartDate"
109
"/*s/plotObservation/simpleUserdefined[name=plotMethodology]/value","observation/methodNarrative"
110
"/*s/plotObservation/simpleUserdefined[name=precipMm]/value","observation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=observation,userDefinedName=precipMm]]/definedValue"
111
"/*s/plotObservation/temperature","observation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=observation,userDefinedName=tempC]]/definedValue"
mappings/VegX-VegBank.plots.csv
1
VegX/*s/individualOrganismObservation/,VegBank/
1
VegX/*s/plotObservation/,VegBank/
2
*ID->/*s/project/title,project/projectName
3
*UniqueIdentifierID->/*s/plot/area,plot/area
2 4
*UniqueIdentifierID->/*s/plot/country,namedPlace[placeSystem=area|country|territory]/placeName
5
*UniqueIdentifierID->/*s/plot/county,namedPlace[placeSystem=Geographic Name]/placeName
3 6
*UniqueIdentifierID->/*s/plot/county,namedPlace[placeSystem=county]/placeName
4 7
*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,plot/locationAccuracy
5 8
*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude,plot/realLatitude
6 9
*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude,plot/realLongitude
7 10
*UniqueIdentifierID->/*s/plot/geospatial/FootprintWKT,plot/dsgpoly
8 11
*UniqueIdentifierID->/*s/plot/geospatial/maximumDepthInMeters,observation/waterDepth/max
12
*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters,plot/elevationRange/max
9 13
*UniqueIdentifierID->/*s/plot/geospatial/maximumElevationInMeters,"plot/{elevation/max,elevationRange/to}"
10 14
*UniqueIdentifierID->/*s/plot/geospatial/minimumDepthInMeters,observation/waterDepth/min
15
*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters,plot/elevationRange/min
11 16
*UniqueIdentifierID->/*s/plot/geospatial/minimumElevationInMeters,"plot/{elevation/min,elevationRange/from}"
17
*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,plot/elevation
12 18
*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier,plot/authorPlotCode
19
*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier,"plot/authorPlotCode,observation/authorObsCode"
13 20
*UniqueIdentifierID->/*s/plot/relatedSpatialItem/relatedItem[relationshipType=parentPlot]/relatedItemID->/*s/plot/plotUniqueIdentifier,plot/PARENT_ID->/plot/authorPlotCode
21
*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=localityDescription]/value,namedPlace/placeDescription
14 22
*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=locality]/value,namedPlace/placeDescription
23
*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value,namedPlace[placeSystem=continent]/placeName
24
*UniqueIdentifierID->/*s/plot/slopeAspect,plot/slopeAspect
25
*UniqueIdentifierID->/*s/plot/slopeGradient,plot/slopeGradient
26
*UniqueIdentifierID->/*s/plot/state,namedPlace[placeSystem=Geographic Name]/placeName
15 27
*UniqueIdentifierID->/*s/plot/state,namedPlace[placeSystem=region|state|province]/placeName
28
obsEndDate,observation/obsEndDate
29
obsStartDate,observation/obsStartDate
16 30
obsStartDate,"stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate,observation/authorObsCode"
17 31
obsStartDate/_date/day,stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate/_date/day
18 32
obsStartDate/_date/month,stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate/_date/month
19 33
obsStartDate/_date/year,stemLocation/taxonInterpretation[PLANTCONCEPT_ID=]/collectionDate/_date/year
34
simpleUserdefined[name=plotMethodology]/value,observation/methodNarrative
35
simpleUserdefined[name=precipMm]/value,"observation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=observation,userDefinedName=precipMm]]/definedValue"
36
temperature,"observation/definedValue[@fkey=tableRecord_ID,userDefined[tableName=observation,userDefinedName=tempC]]/definedValue"

Also available in: Unified diff