Collections Endpoints
Method | URL | Description |
---|---|---|
GET |
https:/api.qwikgeo.com/api/v1/collections |
Collections |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id} |
Collection |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/items |
Items |
POST |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/items |
Create Item |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/items/{id} |
Item |
PUT |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/items/{id} |
Update Item |
DELETE |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/items/{id} |
Delete Item |
PATCH |
https:/api.qwikgeo.com/api/v1/collections/table}/items/{id} |
Modify Item |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/queryables |
Queryables |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/tiles |
Tiles |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/{tile_matrix}/{tile_row}/{tile_col} |
Tile |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/metadata |
Tiles Metadata |
GET |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/tiles/cache_size |
Cache Size |
DELETE |
https:/api.qwikgeo.com/api/v1/collections/{table_id}/tiles/cache |
Delete Cache |
POST |
https://api.qwikgeo.com/api/v1/collections/{table_id}/statistics |
Statistics |
POST |
https://api.qwikgeo.com/api/v1/collections/{table_id}/bins |
Bins |
POST |
https://api.qwikgeo.com/api/v1/collections/{table_id}/numeric_breaks |
Numeric Breaks |
POST |
https://api.qwikgeo.com/api/v1/collections/{table_id}/custom_break_values |
Custom Break Values |
GET |
https://api.qwikgeo.com/api/v1/collections/{table_id}/autocomplete |
Autocomplete |
GET |
https://api.qwikgeo.com/api/v1/collections/{table_id}/closest_features |
Closest Features |
Endpoint Description's
Collections
Collection endpoint returns a list of all available tables to query.
Collections endpoint is available at https:/api.qwikgeo.com/api/v1/collections
Example Response
[
{
"id": "{table_id}",
"title": "zip_centroids",
"description": "zip_centroids",
"keywords": [
"zip_centroids"
],
"links": [
{
"type": "application/json",
"rel": "self",
"title": "This document as JSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}"
}
],
"geometry": "point",
"extent": {
"spatial": {
"bbox": [
-180,
-90,
180,
90
],
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"itemType": "feature"
},
{},...
Collection
Collection endpoint returns information about a single table.
Collection endpoint is available at https:/api.qwikgeo.com/api/v1/collections/{table_id}
Example Response
{
"id": "{table_id}",
"title": "Zip Centroids",
"description": "",
"keywords": [],
"links": [
{
"type": "application/geo+json",
"rel": "self",
"title": "Items as GeoJSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/items"
},
{
"type": "application/json",
"rel": "queryables",
"title": "Queryables for this collection as JSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/queryables"
},
{
"type": "application/json",
"rel": "tiles",
"title": "Tiles as JSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles"
}
],
"geometry": "point",
"extent": {
"spatial": {
"bbox": [
-180,
-90,
180,
90
],
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"itemType": "feature"
}
Items
Items endpoint returns a geojson feature collection for a collection.
Items endpoint is available at https:/api.qwikgeo.com/api/v1/collections/{table_id}/items
Parameters
bbox=mix,miny,maxx,maxy
- filter features in response to ones intersecting a bounding box (in lon/lat or specified CRS). Ex.17,-48,69,-161
<propname>=val
- filter features for a property having a value. Multiple property filters are ANDed together.filter=cql-expr
- filters features via a CQL expression.properties=PROP-LIST
- return only specific properties (comma-separated). If PROP-LIST is empty, no properties are returned. If not present, all properties are returned.dinates to use N decimal placessortby=PROP
- sort the response items by a property.sortdesc=1
- sort the response items by ascending or descending. Default desclimit=N
- limits the number of features in the response.offset=N
- starts the response at an offset.return_geometry=bool
- Boolean to determine if geometry should be returned with response.srid=srid_number
- The srid number for data. Default is 4326.
Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
...
]
},
"properties": {
"gid": 5,
"state_name": "Nevada",
"state_fips": "32",
"sub_region": "Mountain",
"state_abbr": "NV",
"population": 2994047
},
"id": 1
},
...
],
"numberMatched": 57,
"numberReturned": 10,
"links": [
{
"type": "application/geo+json",
"rel": "self",
"title": "This document as GeoJSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/items"
},
{
"type": "application/json",
"title": "States",
"rel": "collection",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}"
},
{
"type": "application/geo+json",
"rel": "next",
"title": "items (next)",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/items?offfset=10"
}
]
}
Create Item
Create item endpoint allows you to add an item to a collection.
Create Item endpoint is available at https:/api.qwikgeo.com/api/v1/collections/{table_id}/items
Example Input
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.8892,
36.201015
]
},
"properties": {
"objectid": 45,
"manage_area": 2,
"am_first_name": "Ryan",
"am_last_name": "Forbess",
"am_title": "Area Manager",
"am_email": "[email protected]",
"am_phone": "731-358-9724",
"pm_first_name": "Michael",
"pm_last_name": "Beasley",
"pm_email": "[email protected]",
"pm_title": "Park Manager 1",
"pm_phone": "731-253-9652",
"park_name": "Big Cypress Tree State Park",
"tsp_uid": "TSP-0314"
}
}
Example Response
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.8892,
36.201015
]
},
"properties": {
"objectid": 45,
"manage_area": 2,
"am_first_name": "Ryan",
"am_last_name": "Forbess",
"am_title": "Area Manager",
"am_email": "[email protected]",
"am_phone": "731-358-9724",
"pm_first_name": "Michael",
"pm_last_name": "Beasley",
"pm_email": "[email protected]",
"pm_title": "Park Manager 1",
"pm_phone": "731-253-9652",
"park_name": "Big Cypress Tree State Park",
"tsp_uid": "TSP-0314"
},
"id": 63
}
Item
Item endpoint returns a geojson feature collection for a single feature in a collection.
Item endpoint is available at https:/api.qwikgeo.com/api/v1/collections/{table_id}/items/{id}
Parameters
properties=PROP-LIST
- return only specific properties (comma-separated). If PROP-LIST is empty, no properties are returned. If not present, all properties are returned.return_geometry=bool
- Boolean to determine if geometry should be returned with response.
Example Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
...
]
},
"properties": {
"gid": 5,
"state_name": "Nevada",
"state_fips": "32",
"sub_region": "Mountain",
"state_abbr": "NV",
"population": 2994047
},
"id": 1,
"links": [
{
"type": "application/geo+json",
"rel": "self",
"title": "This document as GeoJSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/items/{id}"
},
{
"type": "application/geo+json",
"title": "items as GeoJSON",
"rel": "items",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/items"
},
{
"type": "application/json",
"title": "States",
"rel": "collection",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}"
}
]
}
]
}
Update Item
Update item endpoint allows update an item in a collection. You must pass in all properties to update an item.
Update Item endpoint is available at https:/api.qwikgeo.com/api/v1/collections/{table_id}/items/{id}
Example Input
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.8892,
36.201015
]
},
"properties": {
"objectid": 45,
"manage_area": 2,
"am_first_name": "Ryan",
"am_last_name": "Forbess",
"am_title": "Area Manager",
"am_email": "[email protected]",
"am_phone": "731-358-9724",
"pm_first_name": "Michael",
"pm_last_name": "Beasley",
"pm_email": "[email protected]",
"pm_title": "Park Manager 1",
"pm_phone": "731-253-9652",
"park_name": "Big Cypress Tree State Park",
"tsp_uid": "TSP-0314"
},
"id": 1
}
Example Response
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.8892,
36.201015
]
},
"properties": {
"objectid": 45,
"manage_area": 2,
"am_first_name": "Ryan",
"am_last_name": "Forbess",
"am_title": "Area Manager",
"am_email": "[email protected]",
"am_phone": "731-358-9724",
"pm_first_name": "Michael",
"pm_last_name": "Beasley",
"pm_email": "[email protected]",
"pm_title": "Park Manager 1",
"pm_phone": "731-253-9652",
"park_name": "Big Cypress Tree State Park",
"tsp_uid": "TSP-0314"
},
"id": 1
}
Delete Item
Delete item endpoint allows delete an item in a collection.
Delete Item endpoint is available at https:/api.qwikgeo.com/api/v1/collections/{table_id}/items/{id}
Example Response
Modify Item
Modify item endpoint allows update part of an item in a collection. You do not have to pass all properties.
Modify Item endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/items/{id}
Example Input
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.8892,
36.201015
]
},
"properties": {
"park_name": "Big Cypress Tree State Park (New)"
},
"id": 1
}
Example Response
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.8892,
36.201015
]
},
"properties": {
"park_name": "Big Cypress Tree State Park (New)",
},
"id": 1
}
Queryables
Queryables endpoint allows you to see queryable information about a collection.
Queryables endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/queryables
Example Response
{
"$id": "https://api.qwikgeo.com/api/v1/collections/{table_id}/queryables",
"title": "Tennessee State Parks",
"type": "object",
"$schema": "http://json-schema.org/draft/2019-09/schema",
"properties": {
"objectid": {
"title": "objectid",
"type": "numeric"
},
"manage_area": {
"title": "manage_area",
"type": "numeric"
},
"gid": {
"title": "gid",
"type": "numeric"
}
}
}
Tiles
Tiles endpoint allows you to get information about generating tiles for a collection.
Tiles endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles
Example Response
{
"id": "{table_id}",
"title": "Tennessee State Parks",
"description": "",
"links": [
{
"type": "application/json",
"rel": "self",
"title": "This document as JSON",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles"
},
{
"type": "application/vnd.mapbox-vector-tile",
"rel": "item",
"title": "This collection as Mapbox vector tiles",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/{tile_matrix}/{tile_row}/{tile_col}",
"templated": true
},
{
"type": "application/json",
"rel": "describedby",
"title": "Metadata for this collection in the TileJSON format",
"href": "https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/metadata",
"templated": true
}
],
"tileMatrixSetLinks": [
{
"tileMatrixSet": "WorldCRS84Quad",
"tileMatrixSetURI": "http://schemas.opengis.net/tms/1.0/json/examples/WorldCRS84Quad.json"
}
]
}
Tile
Tile endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/{tile_matrix}/{tile_row}/{tile_col}
Fields
If you have a table with a large amount of fields you can limit the amount of fields returned using the fields parameter.
Note
If you use the fields parameter the tile will not be cached on the server.
For example, if we only want the state_fips
field.
https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/{tile_matrix}/{tile_row}/{tile_col}?fields=state_fips
CQL Filtering
CQL filtering is enabled via pygeofilter. This allows you to dynamically filter your tiles database size for larger tiles.
For example, filter the states layer to only show states with a population greater than 1,000,000.
https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/{tile_matrix}/{tile_row}/{tile_col}?cql_filter=population>1000000
Geoserver has examples of using cql filters.
Spatial Filters
Filters |
---|
Intersects |
Equals |
Disjoint |
Touches |
Within |
Overlaps |
Crosses |
Contains |
Note
If you use the cql_filter parameter the tile will not be cached on the server.
Tiles Metadata
Tiles metadata endpoint allows you to get information about tiles for a collection.
Tiles endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/{tile_matrix_set_id}/metadata
Example Response
{
"tilejson": "3.0.0",
"name": "{table_id}",
"tiles": "https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/WorldCRS84Quad/{tile_matrix}/{tile_row}/{tile_col}?f=mvt",
"minzoom": "0",
"maxzoom": "22",
"attribution": null,
"description": "",
"vector_layers": [
{
"id": "{table_id}",
"description": "",
"minzoom": 0,
"maxzoom": 22,
"fields": {
"objectid": "numeric",
"manage_area": "numeric",
"gid": "numeric"
}
}
]
}
Cache Size
Cache Size endpoint allows you to determine the size of a vector tile cache for each table.
Cache Size endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/cache_size
Example Response
Delete Cache
The delete cache endpoint allows you to delete any vector tile cache on the server.
Delete Cache endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/tiles/cache
Example Response
Statistics
Description
The statistics endpoints allows you to perform a multitude of common math statistics on your table such as 'distinct', 'avg', 'count', 'sum', 'max', 'min'
.
Statistics endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/statistics
Parameters
coordinates=coords
- a list of coordinates used to filter the responsegeometry_type=geom_type
- The type of geometry from the coordinates parameters. Options:'POINT', 'LINESTRING', 'POLYGON'
spatial_relationship=relationship
- The type of spatial query to perform with the coordinates parameters. Options:'ST_Intersects', 'ST_Crosses', 'ST_Within', 'ST_Contains', 'ST_Overlaps', 'ST_Disjoint', 'ST_Touches'
filter=cql-expr
- filters features via a CQL expression.
Example
In the example below we will be searching for the number of parcels, average deed ac, and distinct first names filtered by last name of DOOLEY
.
Example Input
{
"aggregate_columns": [
{
"type": "count",
"column": "gid"
},
{
"type": "avg",
"column": "deed_ac"
},
{
"type": "distinct",
"column": "first_name",
"group_column": "first_name",
"group_method": "count"
}
],
"filter": "last_name LIKE '%DOOLEY%'"
}
Example Output
{
"results": {
"count_gid": 19,
"avg_deed_ac": 64.28666666666666,
"distinct_first_name_count_first_name": [
{
"first_name": "",
"count": 3
},
{
"first_name": "COLE",
"count": 3
},
{
"first_name": "% BAS",
"count": 2
},
{
"first_name": "%FIRST MID AG SERVICES ",
"count": 2
},
{
"first_name": "COLE & WENDY",
"count": 1
},
{
"first_name": "EDITH",
"count": 1
},
{
"first_name": "JAMES R & TERESA",
"count": 1
},
{
"first_name": "KENNETH",
"count": 1
},
{
"first_name": "KEVIN",
"count": 1
},
{
"first_name": "LUCAS",
"count": 1
},
{
"first_name": "MCCALLA O & DEANA J",
"count": 1
},
{
"first_name": "THOMAS",
"count": 1
},
{
"first_name": "WENDY",
"count": 1
}
]
},
"status": "SUCCESS"
}
Bins
Description
The bins endpoints allows you to help visualize the spread of a data for a numerical column.
Bins endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/bins
Parameters
coordinates=coords
- a list of coordinates used to filter the responsegeometry_type=geom_type
- The type of geometry from the coordinates parameters. Options:'POINT', 'LINESTRING', 'POLYGON'
spatial_relationship=relationship
- The type of spatial query to perform with the coordinates parameters. Options:'ST_Intersects', 'ST_Crosses', 'ST_Within', 'ST_Contains', 'ST_Overlaps', 'ST_Disjoint', 'ST_Touches'
filter=cql-expr
- filters features via a CQL expression.
Example
Calculate 10 bins for the deed_ac
column on the vccvnkvhrmzsqqbbcacvjrlspfpdhbcthvjszbnfledgklxnps_new
table.
Example Input
Example Output
{
"results": [
{
"min": 0.0,
"max": 145.158,
"count": 15993
},
{
"min": 145.158,
"max": 290.316,
"count": 1088
},
{
"min": 290.316,
"max": 435.47399999999993,
"count": 116
},
{
"min": 435.47399999999993,
"max": 580.632,
"count": 19
},
{
"min": 580.632,
"max": 725.79,
"count": 11
},
{
"min": 725.79,
"max": 870.9479999999999,
"count": 1
},
{
"min": 870.9479999999999,
"max": 1016.1059999999999,
"count": 0
},
{
"min": 1016.1059999999999,
"max": 1161.264,
"count": 0
},
{
"min": 1161.264,
"max": 1306.4219999999998,
"count": 0
},
{
"min": 1306.4219999999998,
"max": 1451.58,
"count": 1
}
],
"status": "SUCCESS"
}
Numeric Breaks
Description
Create bins of data based off of different mathmatical break types.
Break Types: equal_interval, head_tail, quantile, jenk
.
Numeric Breaks endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/numeric_breaks
Parameters
coordinates=coords
- a list of coordinates used to filter the responsegeometry_type=geom_type
- The type of geometry from the coordinates parameters. Options:'POINT', 'LINESTRING', 'POLYGON'
spatial_relationship=relationship
- The type of spatial query to perform with the coordinates parameters. Options:'ST_Intersects', 'ST_Crosses', 'ST_Within', 'ST_Contains', 'ST_Overlaps', 'ST_Disjoint', 'ST_Touches'
filter=cql-expr
- filters features via a CQL expression.
Example
Create 3 breaks based off of the column population
for the table vccvnkvhrmzsqqbbcacvjrlspfpdhbcthvjszbnfledgklxnps
using a quantile break type.
Example Input
Example Output
{
"results": [
{
"min": 0,
"max": 1470,
"count": 10301
},
{
"min": 1470,
"max": 8932,
"count": 10373
},
{
"min": 8932,
"max": 133324,
"count": 10377
}
],
"status": "SUCCESS"
}
Custom Break Values
Description
Create bins based off of your own min and max ranges and provide a count back for each bin.
Custom Break Values endpoint is available at https://api.qwikgeo.com/api/v1/collections/{table_id}/custom_break_values
Parameters
coordinates=coords
- a list of coordinates used to filter the responsegeometry_type=geom_type
- The type of geometry from the coordinates parameters. Options:'POINT', 'LINESTRING', 'POLYGON'
spatial_relationship=relationship
- The type of spatial query to perform with the coordinates parameters. Options:'ST_Intersects', 'ST_Crosses', 'ST_Within', 'ST_Contains', 'ST_Overlaps', 'ST_Disjoint', 'ST_Touches'
filter=cql-expr
- filters features via a CQL expression.
Example
Create 3 custom bins 0 - 1,000
, 1,000 - 9,000
, and 9,000 - 140,000
based
off of the column population
for the table vccvnkvhrmzsqqbbcacvjrlspfpdhbcthvjszbnfledgklxnps
using a quantile break type.
Example Input
{
"column": "population",
"breaks": [
{
"min": 0,
"max": 1000
},
{
"min": 1000,
"max": 9000
},
{
"min": 9000,
"max": 140000
}
]
}
Example Output
{
"results": [
{
"min": 0.0,
"max": 1000.0,
"count": 7981
},
{
"min": 1000.0,
"max": 9000.0,
"count": 12720
},
{
"min": 9000.0,
"max": 140000.0,
"count": 10350
}
],
"status": "SUCCESS"
}
Autocomplete
Description
Return a list of possible values from a column in a table in alphabetical order.
Parameters
q=q
- The search term used when performing a lookupcolumn=column
- Name of the column to perform lookup against
Example
Search for possible park names in Tennessee that contain bi
.
Example Input
Example Output
[
"Bicentennial Capitol Mall State Park",
"Big Cypress Tree State Park",
"Big Hill Pond State Park",
"Big Ridge State Park",
"Cordell Hull Birthplace State Park",
"David Crockett Birthplace State Park",
"Seven Islands State Birding Park"
]
Closest Features
Description
Find the closest features for a collection from a latitude and longitude.
Parameters
latitude=LAT
- The starting latitudelongitude=LNG
- The starting longitude
Example
Search for closest wildfires to latitude and longitude -88, 40
.
Example Input
curl https://api.qwikgeo.com/api/v1/collections/{table_id}/closest_features?latitude=40&longitude=-88
Example Output
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": null,
"properties": {
"gid": 4,
"objectid": 4,
"incidentname": "Ocmulgee Bluffs",
"featurecategory": "Wildfire Final Fire Perimeter",
"mapmethod": "Hand Sketch",
"comments": null,
"gisacres": 100.0,
"label": null,
"createdate": 1669989640000,
"datecurrent": 1669989640000,
"polygondatetime": 1669989640000,
"complexname": null,
"complexid": null,
"gacc": "SACC",
"imtname": null,
"unitid": "GACHF",
"localincidentid": "220103",
"irwinid": "{6A18E672-4A6C-4A4B-8BD3-84704366D743}",
"geometryid": "{6A61C502-F3B1-4785-9925-27E2C34051E9}",
"globalid": null,
"currentdateage": 30,
"createdateage": 30,
"incidenttypecategory": "WF",
"shape__area": 5.03938449583075e-05,
"shape__length": 0.036150960126245,
"distance_in_kilometers": 8168.4830821382
},
"id": 4
}
],
"numberMatched": 1,
"numberReturned": 1
}