Retrieve the dataset service description. This contains information regarding the type of dataset, the services available, and the download options.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
uuid | Dataset identifier | uuid |
None
View the service description for the 2013 Tres Lagunas Post Fire, 10 dataset:
/apps/rgis/datasets/43db7a5d-67ec-4635-aef6-97131bf390cb/services.json
"geoimage" refers to a raster dataset.
The keys referenced by {format} are the list of supported data formats for this dataset.
The keys referenced by {service} are the list of supported OGC services for this dataset (wms, wcs, or wfs).
The keys referenced by {format} are the list of supported documentation formats for the standard.
The keys referenced by {standard} are the list of supported documentation standards for this dataset.
The keys referenced by {standard} are the list of supported documentation standards for this dataset. In most cases, this key will be "all" to indicate that the modifications made to the source documentation are reflected in all documentation representations.
Unless otherwise noted, vector datasets generated by the GSToRE platform are in WGS84 (EPSG:4326). The EPSG code referenced here refers only to the source data (the ZIP format).
This service will be deprecated shortly.
Response for a raster dataset:
{ "downloads": [{"tif": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/treslagunasfire2013_1.original.tif"}], "lastupdate": "20140325", "uuid": "233adca8-5131-4ca1-aac1-669f6be4c530", "taxonomy": "geoimage", "description": "2013 Tres Lagunas Post Fire, 1", "metadata": [ {"FGDC-STD-012-2002": { "xml": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/FGDC-STD-012-2002.xml", "html": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/FGDC-STD-012-2002.html" }}, {"ISO-19115:2003": { "xml": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19115:2003.xml", "html": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19115:2003.html" }}, { "ISO-19119:WMS": {"xml": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19119:WMS.xml"}, "ISO-19119:WCS": {"xml": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19119:WCS.xml"} } ], "metadata-modified": {"all": "2014-03-26T03:56:16Z"}, "spatial": { "epsg": 26913, "bbox": [ -105.719133333, 35.7587972222, -105.697138889, 35.7738111111 ] }, "services": [ {"wms": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1"}, {"wcs": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/services/ogc/wcs?SERVICE=wcs&REQUEST=GetCapabilities&VERSION=1.1.2"} ], "preview": "http://gstore.unm.edu/apps/epscor/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/mapper", "type": "dataset", "id": 367375, "categories": [{ "subtheme": "2013 Wildfire Data", "theme": "Digital Orthophotography", "groupname": "Tres Lagunas - Post Fire" }], "name": "treslagunasfire2013_1" }
This request is only available for vector and table datasets and is limited to text-based outputs, for example CSV or KML.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
uuid | Dataset identifier | uuid | |
ext | Data format | string | CSV, JSON, GeoJSON, KML, GML |
Coming soon.
Stream the RGIS dataset SCAN Alcalde, NM (Mar, 2014) as a KML file:
/apps/rgis/datasets/b6b22969-dfa9-41e5-a836-c483b099c8f7/dataset.kml
The structure of the response depends on the format requested, the filters of the request and the structure of the dataset.
Some datasets are hosted on external sites or, if the format is "html", are external sites. In those instances, the request redirects you to the external location. The options available through the query parameters are not available for those datasets, nor are any GSToRE-generated documentation files included with the response.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
uuid | Dataset identifier | uuid | |
basename | Dataset name | string | |
set | string | original or derived | |
ext | Data format | string | any supported format for the dataset |
Parameter | Description | Type | Options | Required |
---|---|---|---|---|
ignore-cache | Generate a new download | boolean | F (defaults to False) | |
standard | Specify a specific documentation standard to be included in the zip file. | string | F (defaults to the preferred metadata standard of the application specified) |
Download the zip file for the GeoTIFF for AZ Barth Well, US Topo 2011 dataset:
/apps/rgis/datasets/bb5350f9-64ba-4198-8274-eb11f3813955/AZ_Barth_Well_20111125_TM_geo.original.tif
Download the zip file for the GSToRE-generated KML for NM Gross Receipts January - June 2011 dataset:
/apps/rgis/datasets/0acbf4fd-d2ab-4216-9c48-803418166003/nmgrossreceipts_jan_jun2011.derived.kml
The structure of the response depends on the format requested, the filters of the request and the structure of the dataset.
Download the documentation for the specified dataset.
GSTORE includes support for FGDC-STD-001-1998 (file or vector) or FGDC-STD-012-2002 (raster), ISO-19115:2003, ISO-19119, and ISO-19110 standards. ISO-19119 is only available for those datasets with web services; ISO-19110 only for vector or tabular datasets. Check the dataset service description for the complete listing of metadata options for a dataset.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
uuid | Dataset identifier | uuid | |
standard | Documentation standard | string | any supported documentation standard |
ext | Documentation format | string | xml or html (not all formats available for all standards) |
None
Download the zip file for the GeoTIFF for AZ Barth Well, US Topo 2011 dataset:
/apps/rgis/datasets/bb5350f9-64ba-4198-8274-eb11f3813955/AZ_Barth_Well_20111125_TM_geo.original.tif
Download the zip file for the GSToRE-generated KML for NM Gross Receipts January - June 2011 dataset:
/apps/rgis/datasets/0acbf4fd-d2ab-4216-9c48-803418166003/nmgrossreceipts_jan_jun2011.derived.kml
The structure of the response varies by standard and format.
Basic data preview HTML.
Note: this functionality will be deprecated soon. Please take advantage of the OGC Services and other streaming data services in any future development.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
uuid | Dataset identifier | uuid |
None
View the HTML response for the 2013 Jaroso Post Fire Imagery, 32 raster dataset:
/apps/rgis/datasets/43db7a5d-67ec-4635-aef6-97131bf390cb/mapper
The request returns an HTML page containing a basic map preview and dataset information.
Get the attribute definitions for a vector or tabular dataset.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
uuid | Dataset identifier | uuid | |
ext | format | string | json, kml |
None
View the JSON response for the SNOTEL Chamita, NM (Mar, 2014) vector dataset:
/apps/rgis/datasets/2730123d-070c-45ee-8d8d-b5e4df135faf/attributes.json
{ "total": 19, "results": [ { "datatype": "int", "description": "NRCS Internal Site Number", "original_name": "Site Id", "uuid": "aeb97c0a-3c43-4abb-8837-c8f7e1a6f3a8", "name": "site_id" }, { "datatype": "string", "description": "Date", "original_name": "Date", "uuid": "c9746566-2942-4357-9b34-a1891eb7eff3", "name": "date" }, { "datatype": "double", "description": "Snow Water Equivalent", "original_name": "WTEQ.I-1 (in)", "uuid": "e5a53571-b025-4781-b42e-68a391ac6d4e", "name": "wteqi_1" } ] }
Refer to the KML Documentation for more information.
<Schema name="2730123d-070c-45ee-8d8d-b5e4df135faf" id="2730123d-070c-45ee-8d8d-b5e4df135faf"> <SimpleField type="int" name="site_id"> <displayName>site_id</displayName> </SimpleField> <SimpleField type="string" name="date"> <displayName>date</displayName> </SimpleField> <SimpleField type="string" name="time"> <displayName>time</displayName> </SimpleField> <SimpleField type="double" name="wteqi_1"> <displayName>wteqi_1</displayName> </SimpleField> </Schema>
Allows uploading of model data to the Virual Watershed filesystem.
None.
name: Name of model
modelid: Model Run UUID
payload = {"name": "isnobal","modelid": "1dacc407-6488-42c1-a4de-0b6de97b46c1"} r = requests.post(129.24.196.25/apps/my_app/data, files=in.0000, data=payload, auth=(u, p))
Coming soon.
Allows uploading of model data to the Virual Watershed filesystem using swift client intermediary.
None.
filename: Name of file
modelid: Model Run UUID (name of container in swift)
preauthurl: Url (provided by gettoken for swift request
preauthtoken: Token (provided by gettoken for swift request
Use case for creating a new model run in VWP, obtaining a swift token and uploading data to that model run using Python
import requests import os import subprocess import json import uuid url = 'https://vwp-dev.unm.edu/' newmodelurl = url + 'apps/vwp/newmodelrun' apiloginurl = url + 'apilogin' gettokenurl = url + 'gettoken' swiftuploadurl = url + 'apps/vwp/swiftdata' s = requests.Session() user = 'yourusername' password = 'yourpassword' login = s.get(apiloginurl, auth=(user,password), verify=False) if login.status_code == 200: # Create Model newuuid=str(uuid.uuid1()) modeldata = json.dumps({"description": "Swift Upload Example","model_run_name":"$model_run_name" ,"model_keywords":"your keywords here"}) newmodelname = "swift upload example " + newuuid data = modeldata.replace('$model_run_name', newmodelname) result = s.post(newmodelurl, data=data) model_run_uuid = result.text # Request Token token = json.loads(s.get(gettokenurl).text) preauthurl = token['preauthurl'] preauthtoken = token['preauthtoken'] # Upload to Swift using token containername = model_run_uuid filename = 'sample_inputs.nc' segmentsize = 1073741824 # 1 Gig command = ['swift'] command.append('upload') command.append(containername) command.append('-S') command.append(str(segmentsize)) command.append(filename) command.append('--os-storage-url='+preauthurl) command.append('--os-auth-token='+preauthtoken) print "Uploading..." print command ls_output = subprocess.check_output(command) print ls_output print "Telling VWP to download..." params = {'modelid':model_run_uuid,'filename':filename,'preauthurl':preauthurl,'preauthtoken':preauthtoken} r = s.get(swiftuploadurl, params=params) if r.status_code == 200: print "VWP has successfully downloaded data file!" else: print "Download failure" print r.text else: print "Login failure" print login.text
Coming soon.
Uploads information about data that has been inserted in to the database.
Payload for this method is a formatted JSON with the following required structure:
{ "formats": [], "description": "$description", "externaluserid": "$valid_UUID", "sources": [ { "mimetype":"$mimetype", "files": [ "$inputFilePath" ], "set":"$set", "external":"$external", "extension":"$extension" } ], "taxonomy":"$taxonomy", "basename":"$basename", "parent_model_run_uuid":"$parent_model_run_uuid", "apps":[ ], "model_set_taxonomy":"$model_set_taxonomy", "model_run_uuid":"$model_run_uuid", "records":"$records", "model_set":"$model_set", "spatial":{ "geomtype":"$geomtype", "records":"$spatial_records", "features":"$features", "bbox":"$bbox", "epsg":"$epsg" }, "services":[ "$service1",... ], "model_set_type":"$model_set_type", "standards":[ "$standard1",... ], "active":"$active", "model_vars":"$model_vars", "categories":[ { "state":"$state", "modelname":"$modelname", "location":"$location" } ], "metadata":{ "xml":"$xml" "upgrade":"$upgrade", "standard":"$xmlstandard" } }
The above is a reasonable baseline template for both raster and vector inserts. However, while filling in the above information is sufficient for raster inserts, vector inserts require additional steps, detailed below.
None.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | vwp |
Parameter | Description | Type | Options |
---|---|---|---|
formats | The file formats that are intended to be offered as downloads | list of strings | |
description | Description of this dataset | string | |
sources | Dictionary detailing file information | dictionary | |
mimetype | Internet Media Type of transmitted data | string | (attribute of sources) |
files | List of full paths to the uploaded file on the Virtual Watershed | list of strings | (attribute of sources) |
set | 'original' or 'derived', should be 'original for purposes of insert | string | (attribute of sources) |
external | If file whose associated data is located on another server | string | true, false(attribute of sources) |
extension | extension of original file | string | (attribute of sources) |
taxonomy | Taxonomy of data for purposes of processing | string | file, vector, geoimage, table, service, netcdf_[model] |
basename | Name used for all download paths when building URLs | string | |
parent_model_run_uuid | Parent Model Run UUID for this model run | uuid | |
apps | Application alia | string | vwp |
model_set_taxonomy | Defines the taxonomy of data for searches within a model set | string | grid, vector, file |
model_run_uuid | Model Run UUID specific to all datasets in this model run | uuid | |
records | Number of records in this dataset; should equal records number in spacial information | integer | |
model_set | Defines the set of data to assign this data to | string | |
spatial | Dictionary of spatial information regarding the dataset | dictionary | |
geomtype | Geometry type (required for Vector only) | string | POINT, LINESTRING, POLYGON (attribute of spatial) |
records | Number of records associated to features (usually same as number of features | int | (attribute of spatial) |
features | Number of features represented by this dataset, usually 1 for rasters and many for vectors | int | (attribute of spatial) |
bbox | Bounding box coordinates as a comma-delimited list | string | (attribute of spatial) |
epsg | EPSG code of the provided BOX geometry | int | (attribute of spatial) |
services | List of services that are requested to be supported | sring | wms, wcd, wfs |
model_set_type | Defines type of data within the model set | sring | |
standards | GIS metadata standards to support | list of strings | |
active | Whether this dataset is visible to users to start | string | true, false |
model_vars | Comma delimited string of variables represented by inputs and outputs | string | |
categories | A triplet enforced by our database as a means of dividing data in to categories and subcategories | dictionary | |
modelname | Top level category, name of model type being run | string | (attribute of categories) |
state | Mid level category, name of the state that the model was run in | string | (attribute of categories) |
location | Bottom level category, name of the watershed that hte model was run in | string | (attribute of categories) |
metadata | Attached metadata for this file | dictionary | |
xml | Original Metadata XML. Please use correct and verified metadata as per FGDC standards | string | See Examples below for XML template(attribute of metadata) |
standard | Standard that this metadata is in (should be in supported metadata list) | string | (attribute of metadata) |
upgrade | Whether to upgrade metadata to gstore | string | true, false(attribute of metadata) |
XML Metadata Template
Replace any Unknowns with information about your data that is known
All tags within this template are required; if you do not have this information leave it as unknown.
Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown -106.375 -106.3125 36.1875 36.125 Unknown Unknown Unknown Unknown Unknown Unknown Unknown None Unknown Unknown Unknown Unknown Unknown UnknownUnknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown 0.0 Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown UnknownUnknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Raster Pixel 1 1 1 Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown UnknownUnknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown 1 Unknown Unknown Unknown 20130116 Unknown Unknown Unknown Unknown Unknown UnknownUnknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown Unknown local time Unknown Unknown Unknown
modelrun UUID
Updates information about a dataset that has been inserted in to the database.
Payload for this method is a formatted JSON with the same structure as Dataset Information Upload
The above is a reasonable baseline template for both raster and vector inserts. However, while filling in the above information is sufficient for raster inserts, vector inserts require additional steps, detailed below.
None.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | vwp |
dataset_uuid | Dataset identifier | uuid |
See Dataset Information Upload
modelrun UUID
Uploads attribute information about an existing vector dataset.
Payload for this method is a formatted JSON with the following structure:
{ "dataset": "$dataset_uuid", "fields": [ #list of entries with the following form: { "name": "$name", "description": "$description", "orig_name": "$orig_name", "ogr_type": "$ogr_type", "nodata": "$nodataval" "ogr_precision": "$ogr_precision" "ogr_width": "$ogr_width" "ogr_justify": "$ogr_justify" }# ,... ] }
None.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | rgis, epscor, elseweb |
dataset_uuid | Dataset identifier | uuid |
Parameter | Description | Type | Options |
---|---|---|---|
dataset | The UUID of the dataset | uuid | |
fields | List of dictionaries representing attribute | list of dictionaries | |
name | Name pulled the layer field definition | string | (attribute of fields) |
description | Description of this layer | string | (attribute of fields) |
orig_name | Name pulled the layer field definition | string | (attribute of fields) |
ogr_type | OGR Data type from the layer field definition | string | (attribute of fields) |
nodata | Value used to represent no data | int,float | (attribute of fields) |
ogr_precision | Precision of data from the layer field definition | int,float | (attribute of fields) |
ogr_width | Width of data from the layer field definition | int,float | (attribute of fields) |
ogr_justify | Justify from the layer field definition | int,float | (attribute of fields) |
modelrun UUID
Uploads geometry information about an existing vector dataset.
Payload for this method is a formatted JSON with the following structure:
{ "gid": "$gid", "geom": "$geom" }
None.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | vwp |
dataset_uuid | Dataset identifier | uuid |
Parameter | Description | Type | Options |
---|---|---|---|
gid | The feature id of the geometry/feature. | string | |
geom | Well-Known Binary representation of geometry from the feature, encoded to a hex string | hex string |
modelrun UUID
Uploads attribute feature information about an existing vector dataset.
Payload for this method is a formatted JSON with the following structure:
{ "fids": [], # list of feature ids, "records": [ # list of records { "fid": "$fid", "uuid": "$uuid", "observed": "$observed", "atts": [ # list of attributes { #attribute features "name": "$att_name", "u": "$att_uuid", "val": "$att_val", "qual": "$att_ } ] } ] }
None.
Parameter | Description | Type | Options |
---|---|---|---|
app | Application alias | string | vwp |
dataset_uuid | Dataset identifier | uuid |
Parameter | Description | Type | Options |
---|---|---|---|
fids | List of feature IDs | list of string | |
records | A list of features | list of dictionaries | |
fid | Feature id of this attribute feature | string | (attribute of records) |
uuid | UUID of associated geometry | uuid | (attribute of records) |
observed | Datetime observed | datetime | (attribute of records) |
atts | List of attributes | list of dictionaries | (attribute of records) |
name | Name of this attribute feature | string | (attribute of atts) |
u | UUID of this attribute feature | uuid | (attribute of atts) |
val | Value of this attribute feature | (varies) | (attribute of atts) |
qual | (optional) | (varies) | (attribute of atts) |
modelrun UUID
Creates a database record of the new model run and a landing point for files to be uploaded.
None.
{app}
description: isnobal experimental run.
modelid: Model Run UUID
{"description": "inital insert"}
modelrun UUID
Verifies if a model run UUID already exists.
{app}
modelid:
{"modelid": "1dacc407-6488-42c1-a4de-0b6de97b46c1"}
True or False
Get basic statistics for a dataset. This includes descriptive statistics such as mean, minimum and maximum for numeric fields for tabular of vector data or histograms for raster data.
Coming soon.
Coming soon.
Coming soon.
Coming soon.