Basic Usage

Definition of terms, basic route structures

UUID
The dataset or object identifier, for example 7b5a3ba0-d806-11e1-9b23-0800200c9a66.
app
The GStore name of the application (rgis, epscor, etc). All API calls are limited to the APP data objects. The examples below refer to data objects in the RGIS application.

Datasets

This includes dataset downloads, OGC services, the map preview service, and a dataset service description.

Downloads

To get a list of available download formats for a dataset, please use the Service Description request (see below).

URL structure: /apps/rgis/datasets/{uuid}/{basename}.{set}.{format}

where basename is the dataset file name, set is original or derived, and format is the desired format (so long as it is a supported format for the dataset). Note: Excel file downloads are truncated if a dataset exceeds 65,534 records.

There are no query parameters for this request.

Examples

http://gstore.unm.edu/apps/rgis/datasets/04a22a6b-3b8b-4f73-b7f3-668a1f16f4d3/coalminepermitbounds.derived.shp

http://gstore.unm.edu/apps/rgis/datasets/82b6fc7e-2935-4c06-9fac-683227e7ec8b/snotel_201209_933.derived.kml

http://gstore.unm.edu/apps/rgis/datasets/a8614543-97f0-4bf6-a095-53aeb63d8d9d/doqq05_05_33106g66__11795.original.tif

http://gstore.unm.edu/apps/rgis/datasets/762fe47f-02ee-463a-a9e1-83b3234f778a/1967Map.original.pdf

Service Description

The service description provides a listing of all available downloads, web services, metadata files, and other basic dataset information. The structure of the JSON response is identical to the individual dataset objects in the dataset search results (see below).

URL structure: /apps/rgis/datasets/{uuid}/services.json

There are no query parameters for this request.

Examples

http://gstore.unm.edu/apps/rgis/datasets/04a22a6b-3b8b-4f73-b7f3-668a1f16f4d3/services.json

Example Output

description
The dataset title
lastupdate
The date the dataset was added to RGIS as yyyyMMdd.
uuid
The dataset UUID
id
Unique integer ID
taxonomy
Dataset type (file, geoimage or vector)
name
Dataset file name
categories
List of elements defining the category sets this dataset belongs to. Each element has a theme, subtheme and groupname element.
gr
Dataset georelevance score (0+ if performaing a spatial search; 0.0 if not). Datasets are considered more relevant a the score approaches zero.
availability
Optional boolean element (if the result set for a dataset does not include "availablility", assume availability is TRUE. Note, however, that the dataset may still have empty downloads, metadata or services lists (see below) even if a dataset is available.
downloads
List of elements describing the formats available (keys) and the downloads links associated with each format.
services
List of elements describing the services available (keys) and the links associated with service.
metadata
List of elements describing the metadata standards (keys) and formats (nested element) available for a dataset. Each standard has a nested element with the metadata formats (keys) and links defined.
preview
URL for the GSTORE map previewer for the dataset
spatial
Defines the spatial reference (as integer EPSG code) and the bounding box (in WGS84) for the dataset.

Note that the downloads, services, metadata, and preview elements may be empty based on availability or dataset limitations.

Example JSON response for a raster dataset

{
    "lastupdate": "20120827", 
    "uuid": "53e46145-2171-4f33-b1d6-6c0a3e6b6904", 
    "taxonomy": "geoimage", 
    "downloads": [
                    {
                        "img": "http://gstore.unm.edu/apps/rgis/datasets/53e46145-2171-4f33-b1d6-6c0a3e6b6904/mora_tm2011.original.img"
                    }
                    ], 
    "description": "Mora County Landsat Mosaic, 2011", 
    "metadata": [
                    {
                        "fgdc": 
                            {
                                "xml": "http://gstore.unm.edu/apps/rgis/datasets/53e46145-2171-4f33-b1d6-6c0a3e6b6904/metadata/fgdc.xml", 
                                "html": "http://gstore.unm.edu/apps/rgis/datasets/53e46145-2171-4f33-b1d6-6c0a3e6b6904/metadata/fgdc.html"
                            }
                    }
                ], 
    "spatial": {
                    "epsg": 4326, 
                    "bbox": [-105.724276, 35.751735, -104.324307, 36.262927]
                }, 
    "services": [
                    {
                        "wms": "http://gstore.unm.edu/apps/rgis/datasets/53e46145-2171-4f33-b1d6-6c0a3e6b6904/services/ogc/wms", 
                        "wcs": "http://gstore.unm.edu/apps/rgis/datasets/53e46145-2171-4f33-b1d6-6c0a3e6b6904/services/ogc/wcs"
                    }
                ], 
    "preview": "http://gstore.unm.edu/apps/rgis/datasets/53e46145-2171-4f33-b1d6-6c0a3e6b6904/mapper", 
    "gr": 0.0, 
    "id": 163367, 
    "categories": [
                    {
                        "subtheme": "Landsat", 
                        "theme": "Satellite Imagery", 
                        "groupname": "New Mexico"
                    }
                    ], 
    "name": "mora_tm2011"
}

Example JSON response for an unavailable dataset

{
    "downloads": [], 
    "lastupdate": "20120827", 
    "uuid": "5bb2eb39-643b-4ca5-bec5-cff2c2c2d33a", 
    "taxonomy": "geoimage", 
    "description": "Valencia County Landsat Mosaic, 2011", 
    "metadata": [
                    {
                        "fgdc": 
                            {
                                "xml": "http://gstore.unm.edu/apps/rgis/datasets/5bb2eb39-643b-4ca5-bec5-cff2c2c2d33a/metadata/fgdc.xml", 
                                "html": "http://gstore.unm.edu/apps/rgis/datasets/5bb2eb39-643b-4ca5-bec5-cff2c2c2d33a/metadata/fgdc.html"
                            }
                        }
                ], 
    "availability": false, 
    "spatial": 
        {
            "epsg": 4326, 
            "bbox": [-107.214776, 34.425583, -106.403015, 34.970134]
        }, 
    "services": [], 
    "preview": "", 
    "gr": 0.0, 
    "id": 163381, 
    "categories": [
                    {
                        "subtheme": "Landsat", 
                        "theme": "Satellite Imagery", 
                        "groupname": "New Mexico"
                    }
                    ], 
    "name": "valencia_tm2011"
}

Web Services

Available web services by dataset are currently limited to OGC services: WMS, WCS or WFS.

REQUEST
Method
SERVICE
WMS or WFS or WCS
VERSION
which version of the service to use (see GetCapabilities for supported versions)

This list does not include all of the parameters required or supported by the OGC services. Refer to the Mapserver OGC documentation for parameters by service and method.

Examples

http://gstore.unm.edu/apps/rgis/datasets/b8989369-3183-49af-a817-1c9b37116ebc/services/ogc/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1

http://gstore.unm.edu/apps/rgis/datasets/36ef032e-534a-4183-adbb-ffd3e8e42002/services/ogc/wcs?SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.2

Map Preview

The map preview request returns an HTML page containing a slippy map of the specified dataset. Note that this request is likely to be deprecated in future releases of GSToRE. You are strongly encouraged to implement local mapping solutions using the provided WxS services rather than the GSToRE mapper.

Examples

http://gstore.unm.edu/apps/rgis/datasets/04a22a6b-3b8b-4f73-b7f3-668a1f16f4d3/mapper


Metadata

Currently GSToRE only supports FGDC metadata.

URL Structure: /apps/rgis/datasets/{uuid}/metadata/{standard}.{format}

where standard is a supported metadata standard (FGDC or, later, ISO, DC, etc) and format is a supported format (html or xml).

Examples

http://gstore.unm.edu/apps/rgis/datasets/04a22a6b-3b8b-4f73-b7f3-668a1f16f4d3/metadata/fgdc.html


Search

Datasets

version
(optional) 2 or 3. Defaults to version 2 output format if version not included. You are strongly encouraged to use version=3 for any new development.
limit
(optional) integer; number of objects to return. Defaults to 25.
offset
(optional) integer; start of result set based on number of records to return. Defaults to 0.
dir
(optional) ASC or DESC. Sort order of the result set.
sort
(optional) lastupdate or text;
start_time
(optional) Start date for date added comparison. Format yyyyMMdd. UTC.
end_time
(optional) End date for date added comparison. Format yyyyMMdd. UTC.
valid_start
(optional) Start date for valid date range comparison. Format yyyyMMdd. UTC.
valid_end
(optional) End date for valid date range comparison. Format yyyyMMdd. UTC.
box
(optional) Bounding box coordinates as a comma-delimited list (minx, minyy, maxx, maxy)
epsg
(optional) EPSG code for the specified box rectangle. Default is 4326.
theme
(optional) search term for the theme.
subtheme
(optional) search term for the subtheme
groupname
(optional) search term for the groupname
query
(optional) keyword search terms.
format
(optional) zip, shp ,kml ,csv, xls, geojson, json, rss, gml, tif, sid, ecw, dem, img, hdf, ascii, nc, grib, txt, html, pdf, doc, docx, xlsx, gz, png, gif, jpg. Not all formats are available for a given dataset. Availability is based on the dataset taxonomy.
service
(optional) wms, wcs, or wfs
taxonomy
(optional) file, vector, geoimage (raster) or service
geomtype
(optional) point, linestring, polygon, multipolygon, 3d linestring, 3d polygon

Examples

http://gstore.unm.edu/apps/rgis/search/datasets.json?version=3&start_time=20120201&dir=ASC

http://gstore.unm.edu/apps/rgis/search/datasets.json?version=3&box=-106.058,36.013,-105.200,36.996

Category Tree

A category tree is a listing of all category triplets, defined as theme, subtheme, groupname, available for a specified APP. This request also allows searches by theme or subtheme to retrieve the tree for the specified node, i.e. return all subthemes for theme Boundaries.

node
(optional) Theme, subtheme and groupname search terms. Separate each term by __|__. For example, to return the groupnames under the Contour section of Elevation, use Elevation__|__Contours.

Examples

http://gstore.unm.edu/apps/rgis/search/categories.json

http://gstore.unm.edu/apps/rgis/search/categories.json?node=Boundaries__|__General

Example JSON responses Basic category listing:
{
    "total": 0, 
    "results": [
                    {
                        "text": "Area Code Change - New Mexico", 
                        "leaf": false, 
                        "id": "Area Code Change - New Mexico"
                    }, 
                    {
                        "text": "Boundaries", 
                        "leaf": false, 
                        "id": "Boundaries"
                    }, 
                    ...
                    {
                        "text": "Water Resources", 
                        "leaf": false, 
                        "id": "Water Resources"
                    }
                ]
}
            
Basic groupname listing:
{
    "total": 0, 
    "results": [
                    {
                        "text": "New Mexico", 
                        "leaf": true, 
                        "id": "Boundaries__|__General__|__New Mexico", 
                        "cls": "folder"
                    }, 
                    {
                        "text": "United States", 
                        "leaf": true, 
                        "id": "Boundaries__|__General__|__United States", 
                        "cls": "folder"
                    }
                ]
}
            

Geospatial Lookups

Search for quad names or placenames

The search request returns bounding boxes and names for either nm_quads (quad names) or nm_gnis (placenames). Indicate which lookup to use as nm_quads.json or nm_gnis.json.

Query Parameters

query
(optional) Keywords to include in the name search. Replace any spaces with +.
version
(optional) 2 or 3. Defaults to version 2 output format if version not included. You are strongly encouraged to use version=3 for any new development.
limit
(optional) integer; number of objects to return. Defaults to 25.
offset
(optional) integer; start of result set based on number of records to return. Defaults to 0.
dir
(optional) ASC or DESC. Sort order of the result set.
epsg
(optional) EPSG code for the result set bounding boxes.

Examples

http://gstore.unm.edu/apps/rgis/search/nm_quads.json?query=albu


Experimental Services

These requests are experimental. The requests and responses may change at any time.

Dataset Streaming

Retrieve any vector datasets's data as JSON, GeoJSON, KML, GML, or CSV. The response does not include metadata.

URL structure: /apps/rgis/datasets/{uuid}/dataset.{format}

where basename is the dataset file name, and format is the desired format (json, geojson, kml, gml, csv).

No query parameters at this time. Future options include valid date range searches (for data containing timeseries values) and bounding box filters.

Examples

http://gstore.unm.edu/apps/epscor/datasets/c4fcf8e8-e96d-4ccd-9353-97efe3f60756/dataset.json

http://gstore.unm.edu/apps/rgis/datasets/f667c71b-505a-4fcc-842f-4912a93caa93/dataset.kml

Feature Streaming

Coming soon.