Geospatial services are generated automatically for each ScienceBase item and follow a standard naming convention. The service end-point is generated at https://www.sciencebase.gov/catalogMaps/mapping/ows/[id]. WMS, WFS, and WCS can each be accessed through this URL, using the standard parameters.
Consider a ScienceBase item with the identifier 4f4e4ad5e4b07f02db683919, which can be found at https://www.sciencebase.gov/catalog/item/4f4e4ad5e4b07f02db683919. When viewing this item in the ScienceBase user interface, one sees a map overview of the contents of the shape file facet contained by this item. Further, this item has a footprint.
To find the underlying spatial services provided by the system, select the Advanced Services link in the menu shown above the map. A dialog box will appear that contains links to the services provided for this item. In this case, ScienceBase provides WMS and WFS services for two layers: the shape file layer, named Fault_Poly. The links direct the user to the GetCapabilities documents for each of these services. These are standard XML documents described by the OGC specifications that enumerate the capabilities of each service. It is possible, from this XML, to determine what layers are available and in what projections.
The OGC Web Mapping Service endpoint provides rendered images of geospatial products. Typically, you will generate an image in PNG or JPEG format, but others are supported, as described in this snippet from the GetCapabilities XML. This service is supported for vector and raster spatial types.
The most useful capability supported by a WMS service is called GetMap. A GetMap request has a variety of parameters:
|Yes||Service name. Value is WMS.|
|Yes||Service version. Value is one of 1.0.0, 1.1.0, 1.1.1, 1.3|
|Yes||Operation name. Value is GetMap.|
Layers to display on map. Value is a comma-separated list of layer names. Read below for more on the various available layers.
|Yes||Styles in which layers are to be rendered. Value is a comma-separated list of style names, or empty if default styling is required. Style names may be empty in the list.|
|Yes||Spatial Reference System for map output. Value is in formEPSG:nnn. crs is the parameter key used in WMS 1.3.0.|
|Yes||Bounding box for map extent. Value is minx,miny,maxx,maxy in units of the SRS.|
|Yes||Width of map output, in pixels.|
|Yes||Height of map output, in pixels.|
|Yes||Format for the map output. See the list above or the capabilities XML document for supported values.|
|No||Whether the map background should be transparent. Values aretrue or false. Default is false|
|No||Background color for the map image. Value is in the form RRGGBB. Default is FFFFFF (white).|
|No||Format in which to report exceptions. Default value isapplication/vnd.ogc.se_xml. Other valid values areapplication/vnd.ogc.inimage and application/vnd.ogc.se_blank.|
Here is an example of a GetMap request that returns a transparent 680x350 PNG file for the example item above. It uses the EPSG:900913 projection, which is web mercator.
Much more is possible with this and other features of the WMS service. Please reference the GeoServer WMS documentation or the WMS specification for more information.
This service provides access to geospatial vector data in various formats. As such, it is only supported for vector sources of data. Our services will export in the following formats:
Excellent help on using WFS is available at http://docs.geoserver.org/stable/en/user/services/wfs/index.html.
WCS is the Web Coverage Service standard that provides access to raster data. Excellent information on using a WCS service is again available from GeoServer at http://docs.geoserver.org/stable/en/user/services/wcs/index.html.
The KML reflector provides a short-hand way to get KML output without having to construct a complicated WMS string.
More information is available at http://docs.geoserver.org/stable/en/user/googleearth/features/kmlreflector.html?highlight=kml.
ScienceBase Layer Types
Each ScienceBase item may have a "footprint," which is basic spatial data to communicate the spatial context of an item. This may take the form of a single representational point or more complex points, lines, and polygons.
This layer is available through WMS and WFS services for items that have footprints.
This layer provides point data showing where all of the child items of this item are located. Each representational point for underlying items is available.
This layer is available through WMS and WFS services for items that have children with footprints.
ScienceBase items may have extensions that contain further geospatial data, like GeoTIFF files or ESRI Shapefiles. These are available as additional layers in the spatial services. Each layer has the same name as the associated extension on the ScienceBase item. Most often, this is the filename.
Raster types, like GeoTIFF files, are made available through WMS and WCS services.
Shapefiles, which contain vector data, are made available through WMS and WFS services.
It is possible to control the styling of raster and shapefile extension services by attaching an SLD (styled layer descriptor) file to the extension's list of files, as illustrated by the image below. Notice that the extension contains both a GeoTIFF and an SLD file for coloring it.
Here is the simple example SLD file used above that creates a two-color ramp between values, as well as transparency for the rest of the map.
Map packages are an ESRI format that packages a complete ESRI map into a compressed file. Once uploaded to ScienceBase, an automated process creates a service for each map package on an ArcGIS Server platform. The URL to the associated service can be obtained by concatenating the servicePath value from the extension JSON with the following url: http://www.sciencebase.gov/catalogMaps/services/Catalog/.