# paths./.post.description
The Ag-Analytics® DEM Service API allows for clipping boundaries to the 10 meter USGS DEM map of the United States. The service consists of a POST request where the user can pass a GeoJSON boundary, desired output projection as an EPSG code, and a resolution in degrees lat/lon. The result of the post request is a file name that is the result of the clip, reproject, and resample.
The file name can be used as the parameter in a GET request to the same endpoint. Doing so will download the file to the specified local path.

Sample DEM raster output.

Documentation

Notebook

Github Repo

Click the Jupyter Notebook Static Sample to view a static rendition of this APIs Jupyter Notebook.
Click the Jupyter Notebook Github Repo to access the Jupyter Notebook .ipynb files and
instructions needed in order to run this APIs Jupyter Notebook.

Request Parameters ▼

Request Parameters

Parameter

Data Type

Required?

Default

Options

Description

aoi

geojson, shapefile,
geotiff

Yes

--

geojson, shapefile,
geotiff

Area of interest to return

Projection

List of indices
as a string

No

See Request Handling
Table below

EPSG codes
(ex. "EPSG:4326" WKT)

Output projection of
result DEM geotiff

Resolution

Float

No

See Request Handling
Table below

--

Output geotiff resolution

Elevation_Index

String

No

"False"

"True" "False"

Call will return elevation indices
from the elevation index service
(relative elevation, slope, TPI, TRI)

Legend_Ranges

Integer as string

No

3

0 < Legend_Ranges

Number of ranges to display
in png of output image

Request Handling - Default Projections and Resolutions

AOI Type

Projection
Specified?

Resolution
Specified?

Ouput Projection

Output Resolution

Any

Yes

Yes

Request projection

Request resolution

GeoTIFF

Yes

No

Request projection

GeoTIFF resolution

GeoTIFF

No

Yes

GeoTIFF projection

Request resolution

GeoTIFF

No

No

GeoTIFF projection

GeoTIFF resolution

Shapefile

Yes

No

Request projection

Native tile resolution

Shapefile

No

Yes

Shapefile projection

Request resolution

Shapefile

No

No

Shapefile projection

Native tile resolution

GeoJSON

Yes

No

Request projection

Native tile resolution

GeoJSON

No

Yes

GeoJSON projection

Request resolution

GeoJSON

No

No

GeoJSON projection

Native tile resolution

Response Parameters ▼

Response Parameters

Parameter

Data Type

Required?

Features

List

Container for all of the features of the DEM raster.

Features.attributes (F.a)

Dictionary

Each feature in Features has an associated attributes dictionary.

F.a.CellSize

List

Resolution as x,y cell size. In units of projection.

F.a.CoordinateSystem

String

Projection in WKT

F.a.Extent

String

Extent of result geotiff.

F.a.Legend (F.a.L)

List

Each range in the output PNG is represented by a separate dictionary.

F.a.L.Area

String

Percent of total image that the particular range of values covers.

F.a.L.Count

Int

Number of pixels that a particular range takes up in the png.

F.a.L.CountAllPixels

Int

Total number of pixels in the png image.

F.a.L.Max

Float

Maximum value in the range.

F.a.L.Mean

Float

Mean value of the range.

F.a.L.Min

Float

Min value of the range.

F.a.L.color

String

Hex value that is used to display the png image.

F.a.Matrix

List

Dimensions of output image.

F.a.Max

Float

Maximum value of entire raster.

F.a.Mean

Float

Mean value of entire raster.

F.a.Min

Float

Min value of entire raster.

F.a.OID

Int

Deprecated

F.a.Percentile5

Float

5th percentile value.

F.a.Percentile95

Float

95th percentile value.

F.a.Std

Float

Standard deviation of raster values.

F.a.Variet

String

Either Variety or NoVariety. Flag for category or continuous data.

F.a.pngb64

String

The png image returned in base64 encoding.

FileName

String

Name of result raster that was generated in POST request. Used in GET request to retrieve GeoTiff file.

Index_Files

List

List of elevation index files that can be used in GET request to return the GeoTiffs.

# paths./.post.requestBody.description
aoi=%7B%22type%22%3A%22Feature%22%2C%22geometry%22%3A%7B%22type%22%3A%22Polygon%22%2C%22coordinates
%22%3A%5B%5B%5B-76.5907145%2C+42.443918%5D%2C+%5B-76.5898132%2C+42.4224745%5D%2C+
%5B-76.5699863%2C+42.4230447%5D%2C+%5B-76.5710592%2C+42.4443296%5D%2C+%5B-76.5907145%2C+42.443918%5D%5D%5D%7D%2C%22properties%22%3A%7B%22OBJECTID%22%3A4944402%2C%22
CALCACRES%22%3A46.15999985%2C%22CALCACRES2%22%3Anull%7D%2C%22id%22%3A4944402%7D&
Elevation_Index=False&Legend_Ranges=20

# paths./.get.description
The Ag-Analytics® DEM Service API allows for clipping boundaries to the 10 meter USGS DEM map of the United States. The service consists of a GET request where the user can pass the filename from POST request. The result of the GET request is the GeoTIFF file of the DEM clip to the specified local path.

Sample DEM raster output.

Documentation

Notebook

Github Repo

Click the Jupyter Notebook Static Sample to view a static rendition of this APIs Jupyter Notebook.
Click the Jupyter Notebook Github Repo to access the Jupyter Notebook .ipynb files and
instructions needed in order to run this APIs Jupyter Notebook.

GET Request

Parameter | Description | Example | Request

FileName

File name to download. From POST request.
Only request a single file at a time.

result_raster_dem_
2020022713.tif

https://ag-analytics.azure-api.net/dem-service?
FileName= result_raster_dem_2020022713.tif