# Grab the file and get its attributes:
shapefile = 'sample:CONUS_states'
attributes = pyGDP.getAttributes(shapefile)
for attr in attributes:
    print attr

# Grab the values from the 'STATE' attribute:
usr_attribute = 'STATE'
values = pyGDP.getValues(shapefile, usr_attribute)
for v in values:
    print v

# Instead of specifically specifying a value, we get request to get
# the gmlID of these values and append them to a gmlID to be used
# as an input instead of value.
michGMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Michigan')
gmlIDs = michGMLID

# We get the dataset URI that we are interested in by searching for prism:
dataSetURIs = pyGDP.getDataSetURI(anyText='prism')
pp = pprint.PrettyPrinter(indent=5,width=60)
pp.pprint(dataSetURIs)

# Set our datasetURI
dataSetURI = 'dods://cida.usgs.gov/thredds/dodsC/prism'
# Get the available data types associated with the dataset
datatypes = pyGDP.getDataType(dataSetURI)
for dt in datatypes:
	print dt

# Set the dataType. Note that leaving dataType out below will select all.
Example #2
0
# Grab the file and get its attributes:
shapefile = 'sample:CONUS_states'
attributes = pyGDP.getAttributes(shapefile)
for attr in attributes:
    print(attr)

# Grab the values from the 'STATE' attribute:
usr_attribute = 'STATE'
values = pyGDP.getValues(shapefile, usr_attribute)
for v in values:
    print(v)

# Instead of specifically specifying a value, we get request to get
# the gmlID of these values and append them to a gmlID to be used
# as an input instead of value.
michGMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Michigan')
gmlIDs = michGMLID

# We get the dataset URI that we are interested in by searching for prism:
dataSetURIs = pyGDP.getDataSetURI(anyText='prism')
pp = pprint.PrettyPrinter(indent=5, width=60)
pp.pprint(dataSetURIs)

# Set our datasetURI
dataSetURI = 'dods://cida.usgs.gov/thredds/dodsC/prism'
# Get the available data types associated with the dataset
datatypes = pyGDP.getDataType(dataSetURI)
for dt in datatypes:
    print(dt)

# Set the dataType. Note that leaving dataType out below will select all.
    print attr
print

# Grab the values from 'OBJECTID' and 'upload:OKCNTYD'
usr_attribute = 'STATE'
values = pyGDP.getValues(shapefile, usr_attribute)
for v in values:
    print v
print

"""
Instead of specifically specifying a value, we get request to get
the gmlID of these values and append them to a gmlID to be used
as an input instead of value.
"""
wisGMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Wisconsin')
michGMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Michigan')
minnGDMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Minnesota')
gmlIDs = wisGMLID + michGMLID + minnGDMLID

# our shapefile = 'upload:OKCNTYD', usr_attribute = 'OBJECTID', and usr_value = 13
# We get the dataset URI that we are interested in
dataSetURIs = pyGDP.getDataSetURI()
for d in dataSetURIs:
    print d

# Set our datasetURI
dataSetURI = 'dods://cida.usgs.gov/thredds/dodsC/gmo/GMO_w_meta.ncml'
# Get the available data types associated with the dataset
dataType = 'Prcp'
# Get available time range on the dataset
    print attr
print

# Grab the values from 'OBJECTID' and 'upload:OKCNTYD'
usr_attribute = 'STATE'
values = pyGDP.getValues(shapefile, usr_attribute)
for v in values:
    print v
print

"""
Instead of specifically specifying a value, we get request to get
the gmlID of these values and append them to a gmlID to be used
as an input instead of value.
"""
wisGMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Wisconsin')
michGMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Michigan')
minnGDMLID = pyGDP.getGMLIDs(shapefile, usr_attribute, 'Minnesota')
gmlIDs = wisGMLID + michGMLID + minnGDMLID

# our shapefile = 'upload:OKCNTYD', usr_attribute = 'OBJECTID', and usr_value = 13
# We get the dataset URI that we are interested in
dataSetURIs = pyGDP.getDataSetURI()
for d in dataSetURIs:
    print d

# Set our datasetURI
dataSetURI = 'dods://igsarm-cida-thredds1.er.usgs.gov:8080/thredds/dodsC/gmo/GMO_w_meta.ncml'
# Get the available data types associated with the dataset
dataType = 'Prcp'
# Get available time range on the dataset