Skip to content

Commit d01a8f0

Browse files
author
Stephanie Reeder
committed
create CV parent class
1 parent d14b3cf commit d01a8f0

File tree

3 files changed

+68
-371
lines changed

3 files changed

+68
-371
lines changed

Examples/Sample.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
#connect to database
2323
#createconnection (dbtype, servername, dbname, username, password)
24-
#session_factory = dbconnection.createConnection('mysql', 'localhost', 'odm2', 'ODM', 'odm')
25-
#session_factory = dbconnection.createConnection('connection type: sqlite|mysql|mssql|postgresql', '/your/path/to/db/goes/here', 2.0)
26-
# session_factory= dbconnection.createConnection('mssql', "(local)", "LBRODM2", "ODM", "odm")
27-
session_factory= dbconnection.createConnection('mssql', "arroyoodm2", "LBRODM2", "ODM", "odm")
24+
# session_factory = dbconnection.createConnection('mysql', 'localhost', 'odm2', 'ODM', 'odm')#mysql
25+
#session_factory = dbconnection.createConnection('connection type: sqlite|mysql|mssql|postgresql', '/your/path/to/db/goes/here', 2.0)#sqlite
26+
# session_factory= dbconnection.createConnection('mssql', "(local)", "LBRODM2", "ODM", "odm")#win MSSQL
27+
session_factory= dbconnection.createConnection('mssql', "arroyoodm2", "", "ODM", "odm")#mac/linux MSSQL
2828

2929

3030

@@ -64,22 +64,22 @@
6464
numSites = len(siteFeatures)
6565

6666
for x in siteFeatures:
67-
print x.SamplingFeatureCode + ": " + x.SamplingFeatureName
67+
print x.SamplingFeatureCode + ": " + x.SamplingFeatureName + ", " + x.SamplingFeatureTypeCV
6868
except Exception as e:
6969
print "Unable to demo getSamplingFeaturesByType", e
7070

7171

7272
# Now get the SamplingFeature object for a SamplingFeature code
7373
try:
74-
sf = read.getSamplingFeatures(code='USU-LBR-Mendon')
74+
sf = read.getSamplingFeatures(code='USU-LBR-Mendon')[0]
7575
print sf
7676
print "\n-------- Information about an individual SamplingFeature ---------"
7777
print "The following are some of the attributes of a SamplingFeature retrieved using getSamplingFeature(code = x): \n"
7878
print "SamplingFeatureCode: " + sf.SamplingFeatureCode
7979
print "SamplingFeatureName: " + sf.SamplingFeatureName
8080
print "SamplingFeatureDescription: %s" % sf.SamplingFeatureDescription
8181
print "SamplingFeatureGeotypeCV: %s" % sf.SamplingFeatureGeotypeCV
82-
print "SamplingFeatureGeometry: %s" % sf.FeatureGeometry
82+
print "SamplingFeatureGeometry: %s" % sf.FeatureGeometryWKT
8383
print "Elevation_m: %s" % str(sf.Elevation_m)
8484
except Exception as e:
8585
print "Unable to demo getSamplingFeatureByCode: ", e

0 commit comments

Comments
 (0)