{ "openapi": "3.0.0", "servers": [ { "url": "https://apps.gov.bc.ca/pub/geomark", "description": "Production" }, { "url": "https://test.apps.gov.bc.ca/pub/geomark", "description": "Test" }, { "url": "https://delivery.apps.gov.bc.ca/pub/geomark", "description": "Delivery" } ], "info": { "title": "GeoMark Web Service REST API", "description": "The Geomark Web Service allows you to create and share geographic areas of interest over the web in a variety of formats and coordinate systems. This service is especially helpful when you need to share an area of interest with people who require that the data be in a different format, or they use different mapping software. \n\nPlease note that you may experience issues when submitting requests to the delivery or test environment if using this [OpenAPI specification](https://github.com/bcgov/api-specs/tree/master/geomark) in other API console viewers.", "termsOfService": "https://www2.gov.bc.ca/gov/content?id=D1EE0A405E584363B205CD4353E02C88", "contact": { "name": "Contact DataBC", "url": "https://dpdd.atlassian.net/servicedesk/customer/portal/1/group/7/" }, "license": { "name": "Open Government License - British Columbia", "url": "https://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61" }, "version": "4.1.2" }, "externalDocs": { "description": "Geomark Web Service", "url": "https://www2.gov.bc.ca/gov/content?id=F6BAF45131954020BCFD2EBCC456F084" }, "tags": [ { "name": "create" }, { "name": "boundingBox" }, { "name": "feature" }, { "name": "info" }, { "name": "parts" }, { "name": "point" } ], "paths": { "/geomarks/new": { "post": { "summary": "Create a new geomark", "description": "Create a new geomark from the geometries read from the 'body' parameter or file.", "tags": [ "create" ], "responses": { "200": { "description": "If the geomark was created via a web service call." }, "302": { "description": "If the geomark was created and a redirectUrl was specified then the response will redirect to the redirectUrl with the query string parameters geomarkId and geomarkUrl of the created geomark.\n\nAdditional reasons for this status code can be found in the [Geomark Web Service Developer Guide](https://apps.gov.bc.ca/pub/geomark/docs/rest-api/)" }, "400": { "description": "**Couldn't create Geomark.**\n\nPossible reasons:\n\n* No Polygon, Multi-Polygon, or folder(set) of Polygons provided.\n* A point or line was provided without a buffer width.\n\nAdditional reasons for this status code can be found in the [Geomark Web Service Developer Guide](https://apps.gov.bc.ca/pub/geomark/docs/rest-api/)" }, "500": { "description": "**Internal Server Error**" } }, "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "format": { "description": "The file format name extension of the input geometry.", "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "srid": { "description": "The srid of the coordinate system the input geometries are in. If the file includes a coordinate system definition that will be used.", "type": "integer", "enum": [ 4326, 3005, 3857, 26907, 26908, 26909, 26910, 26911 ], "default": 4326 }, "resultFormat": { "description": "The file format the geomark info resource should be returned using.", "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "multiple": { "description": "Boolean flag indicating if multiple geometries are to be used for the geomark (true) or only a single geometry from the first geometry (false).", "type": "boolean", "enum": [ false, true ], "default": false }, "allowOverlap": { "description": "When multiple=true select this option to allow overlapping geometries", "type": "boolean", "enum": [ false, true ], "default": false }, "callback": { "description": "The callback function a JSON result format would be wrapped in to support Ajax requests.", "type": "string" }, "redirectUrl": { "description": "The optional external URL to redirect the user to when the geomark is created rather than showing the geomark info page. The geomarkId and geomarkUrl query string parameters will be added to the redirectUrl so that the target application gets a reference to the geomark.", "type": "string" }, "failureRedirectUrl": { "description": "The url to redirect if the geomark could not be created. The URL will include a _Error parameter with the error message for the field that caused the error.", "type": "string" }, "bufferMetres": { "description": "The amount to buffer the geometry in metres, must only contain numerical digits (e.g 10). Leave blank and no buffer will be added to input geometries. If blank then any Point, LineString, MultiPoint and MultiLineString geometries will be ignored.", "type": "integer" }, "bufferJoin": { "description": "If bufferMetres is specified, The style of buffer to use for joins between the line segments for lines and polygons.", "type": "string", "enum": [ "ROUND", "MITRE", "BEVEL" ], "default": "ROUND" }, "bufferCap": { "description": "If bufferMetres is specified, The style of buffer to use at the ends of a buffered line.", "type": "string", "enum": [ "ROUND", "SQUARE", "FLAT" ], "default": "ROUND" }, "bufferMitreLimit": { "description": "If bufferMetres is specified, the maximum ratio of distance from the original geometry to a mitre buffer point and the buffer amount. If the ratio is greater than this a bevel will be used instead. This prevents infinite distances when the angle between the two lines at a join is small. Must be > 0.", "type": "integer", "default": 5 }, "bufferSegments": { "description": "If bufferMetres is specified, the number of line segments used in each quadrant to approximate the curve for round end-cap and join styles. Must be > 0.", "type": "integer", "default": 8 }, "body": { "description": "The binary or character content representing the geometry or geometries", "type": "string" } } } } } } } }, "/geomarks/copy": { "post": { "summary": "Create a new geomark by copying the geometries from one or more existing geomarks from the current server.", "description": "The source geomarks can be specified by with the geomarkUrl parameter. Repeat the parameter if sourcing from multiple geomarks", "tags": [ "create" ], "parameters": [ { "name": "geomarkUrl", "in": "query", "description": "One or more geomark URLs or identifiers to create the new geomark from.", "required": true, "schema": { "type": "string" }, "example": "https://apps.gov.bc.ca/pub/geomark/geomarks/gm-abcdefghijklmnopqrstuv0bcislands" }, { "name": "resultFormat", "in": "query", "description": "The file format the geomark info resource should be returned using.", "required": false, "schema": { "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "example": "json" }, { "name": "allowOverlap", "in": "query", "description": "Select this option to allow overlapping geometries", "required": false, "schema": { "type": "boolean", "enum": [ false, true ], "default": false } }, { "name": "callback", "in": "query", "description": "The callback function a JSON result format would be wrapped in to support Ajax requests.", "required": false, "schema": { "type": "string" } }, { "name": "redirectUrl", "in": "query", "description": "The optional external URL to redirect the user to when the geomark is created rather than showing the geomark info page. The geomarkId and geomarkUrl query string parameters will be added to the redirectUrl so that the target application gets a reference to the geomark.", "required": false, "schema": { "type": "string" } }, { "name": "failureRedirectUrl", "in": "query", "description": "The url to redirect if the geomark could not be created. The URL will include a _Error parameter with the error message for the field that caused the error.", "required": false, "schema": { "type": "string" } }, { "name": "bufferMetres", "in": "query", "description": "The amount to buffer the geometry in metres, must only contain numerical digits (e.g 10). Leave blank and no buffer will be added to input geometries. If blank then any Point, LineString, MultiPoint and MultiLineString geometries will be ignored.", "required": false, "schema": { "type": "integer" } }, { "name": "bufferJoin", "in": "query", "description": "If bufferMetres is specified, The style of buffer to use for joins between the line segments for lines and polygons.", "required": false, "schema": { "type": "string", "enum": [ "ROUND", "MITRE", "BEVEL" ], "default": "ROUND" } }, { "name": "bufferCap", "in": "query", "description": "If bufferMetres is specified, The style of buffer to use at the ends of a buffered line.", "required": false, "schema": { "type": "string", "enum": [ "ROUND", "SQUARE", "FLAT" ], "default": "ROUND" } }, { "name": "bufferMitreLimit", "in": "query", "description": "If bufferMetres is specified, the maximum ratio of distance from the original geometry to a mitre buffer point and the buffer amount. If the ratio is greater than this a bevel will be used instead. This prevents infinite distances when the angle between the two lines at a join is small. Must be > 0.", "required": false, "schema": { "type": "integer", "default": 5 } }, { "name": "bufferSegments", "in": "query", "description": "If bufferMetres is specified, the number of line segments used in each quadrant to approximate the curve for round end-cap and join styles. Must be > 0.", "required": false, "schema": { "type": "integer", "default": 8 } } ], "responses": { "200": { "description": "If the geomark was created via a web service call." }, "302": { "description": "If the geomark was created and a redirectUrl was specified then the response will redirect to the redirectUrl with the query string parameters geomarkId and geomarkUrl of the created geomark.\n\nAdditional reasons for this status code can be found in the [Geomark Web Service Developer Guide](https://apps.gov.bc.ca/pub/geomark/docs/rest-api/)" }, "400": { "description": "**Couldn't create Geomark.**\n\nPossible reasons:\n\n* No Polygon, Multi-Polygon, or folder(set) of Polygons provided.\n* A point or line was provided without a buffer width.\n\nAdditional reasons for this status code can be found in the [Geomark Web Service Developer Guide](https://apps.gov.bc.ca/pub/geomark/docs/rest-api/)" }, "500": { "description": "**Internal Server Error**" } } } }, "/geomarks/{geomarkId}/boundingBox.{fileFormatExtension}": { "get": { "summary": "Gets the bounding box of the geomark", "description": "The source geomarks can be specified by with the geomarkUrl parameter. Repeat the parameter if sourcing from multiple geomarks", "tags": [ "boundingBox" ], "parameters": [ { "name": "geomarkId", "in": "path", "description": "The unique identifier for the geomark", "required": true, "schema": { "type": "string" }, "example": "gm-abcdefghijklmnopqrstuv0bcislands" }, { "name": "fileFormatExtension", "in": "path", "description": "The file format name extension used to represent the geomark download.", "required": true, "schema": { "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "example": "json" }, { "name": "srid", "in": "query", "description": "The srid of the coordinate system the geometry should be converted to.", "required": false, "schema": { "type": "integer", "enum": [ 4326, 3005, 3857, 26907, 26908, 26909, 26910, 26911 ], "default": 4326 } } ], "responses": { "200": { "description": "The geomark will be returned in the body of the HTTP response encoded in the requested [file format](https://apps.gov.bc.ca/pub/geomark/docs/fileFormats.html)." }, "400": { "description": "**Coordinate system with srid = is not supported.**\n\nCheck the list of supported [coordinate systems](https://apps.gov.bc.ca/pub/geomark/docs/coordinateSystems.html)." }, "404": { "description": "**The geomark could not be found.**\n\nCheck for extra characters on the end of the URL. The geomark may have expired and been deleted." }, "500": { "description": "**Internal Server Error**" } } } }, "/geomarks/{geomarkId}/feature.{fileFormatExtension}": { "get": { "summary": "Get the feature and attribution of the geomark", "description": "The geomark feature resource returns a single spatial feature with either a single (Point, LineString, Polygon) or multi-part geometry (MultiPoint, MultiLineString, MultiPolygon) and the geomark attribution. The geometry and attribution can be downloaded as a spatial download file format in a supported coordinate system. The download files can then be used in a desktop GIS application (e.g. ArcMap), Google Earth or a web mapping application.", "tags": [ "feature" ], "parameters": [ { "name": "geomarkId", "in": "path", "description": "The unique identifier for the geomark", "required": true, "schema": { "type": "string" }, "example": "gm-abcdefghijklmnopqrstuv0bcislands" }, { "name": "fileFormatExtension", "in": "path", "description": "The file format name extension used to represent the geomark download.", "required": true, "schema": { "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "example": "json" }, { "name": "srid", "in": "query", "description": "The srid of the coordinate system the geometry should be converted to.", "required": false, "schema": { "type": "integer", "enum": [ 4326, 3005, 3857, 26907, 26908, 26909, 26910, 26911 ], "default": 4326 } } ], "responses": { "200": { "description": "The geomark will be returned in the body of the HTTP response encoded in the requested [file format](https://apps.gov.bc.ca/pub/geomark/docs/fileFormats.html)." }, "400": { "description": "**Coordinate system with srid = is not supported.**\n\nCheck the list of supported [coordinate systems](https://apps.gov.bc.ca/pub/geomark/docs/coordinateSystems.html)." }, "404": { "description": "**The geomark could not be found.**\n\nCheck for extra characters on the end of the URL. The geomark may have expired and been deleted." }, "500": { "description": "**Internal Server Error**" } } } }, "/geomarks/{geomarkId}.{fileFormatExtension}": { "get": { "summary": "Get information about a particular geomark", "description": "The attribution can be downloaded as a info file format. The download files can then be processed by a client application to access the geomark info fields and to get the URLs to the geometry download resources.", "tags": [ "info" ], "parameters": [ { "name": "geomarkId", "in": "path", "description": "The unique identifier for the geomark.", "required": true, "schema": { "type": "string" }, "example": "gm-abcdefghijklmnopqrstuv0bcislands" }, { "name": "fileFormatExtension", "in": "path", "description": "The file format name extension used to represent the geomark download.", "required": true, "schema": { "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "example": "json" }, { "name": "srid", "in": "query", "description": "The srid of the coordinate system the geometry should be converted to.", "required": false, "schema": { "type": "integer", "enum": [ 4326, 3005, 3857, 26907, 26908, 26909, 26910, 26911 ], "default": 4326 } } ], "responses": { "200": { "description": "The geomark will be returned in the body of the HTTP response encoded in the requested [file format](https://apps.gov.bc.ca/pub/geomark/docs/fileFormats.html)." }, "404": { "description": "**The geomark could not be found.**\n\nCheck for extra characters on the end of the URL. The geomark may have expired and been deleted." }, "500": { "description": "**Internal Server Error**" } } } }, "/geomarks/{geomarkId}/parts.{fileFormatExtension}": { "get": { "summary": "Get the individual geometries within a multi-part geometry", "description": "The geomark parts resource returns a one or more spatial features. One for each part of the Geomark's geomerty. Each part contains a single (Point, LineString, Polygon) geometry and the geomark attribution.", "tags": [ "parts" ], "parameters": [ { "name": "geomarkId", "in": "path", "description": "The unique identifier for the geomark", "required": true, "schema": { "type": "string" }, "example": "gm-abcdefghijklmnopqrstuv0bcislands" }, { "name": "fileFormatExtension", "in": "path", "description": "The file format name extension used to represent the geomark download.", "required": true, "schema": { "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "example": "json" }, { "name": "srid", "in": "query", "description": "The srid of the coordinate system the geometry should be converted to.", "required": false, "schema": { "type": "integer", "enum": [ 4326, 3005, 3857, 26907, 26908, 26909, 26910, 26911 ], "default": 4326 } } ], "responses": { "200": { "description": "The geomark will be returned in the body of the HTTP response encoded in the requested [file format](https://apps.gov.bc.ca/pub/geomark/docs/fileFormats.html)." }, "400": { "description": "**Coordinate system with srid = is not supported.**\n\nCheck the list of supported [coordinate systems](https://apps.gov.bc.ca/pub/geomark/docs/coordinateSystems.html)." }, "404": { "description": "**The geomark could not be found.**\n\nCheck for extra characters on the end of the URL. The geomark may have expired and been deleted." }, "500": { "description": "**Internal Server Error**" } } } }, "/geomarks/{geomarkId}/point.{fileFormatExtension}": { "get": { "summary": "Gets a single spatial point representative of the geomark.", "description": "The geomark point resource returns a single spatial feature with a single Point and the geomark attribution. The point geometry will be created from the first geometry part of the Geomark. Point geomarks will return the first Point part in the geomark. LineString geomarks will return the first coordinate of the first LineString part in the geomark. Polygon geomarks will return the centroid or another point inside the first Polygon part in the geomark. The geometry and attribution can be downloaded as a spatial download file format in a supported coordinate system. The download files can then be used in a desktop GIS application (e.g. ArcMap), Google Earth or a web mapping application.", "tags": [ "point" ], "parameters": [ { "name": "geomarkId", "in": "path", "description": "The unique identifier for the geomark.", "required": true, "schema": { "type": "string" }, "example": "gm-abcdefghijklmnopqrstuv0bcislands" }, { "name": "fileFormatExtension", "in": "path", "description": "The file format name extension used to represent the geomark download.", "required": true, "schema": { "type": "string", "enum": [ "json", "xml", "kml", "kmz", "shp", "shpz", "geojson", "gml", "gpkg", "wkt" ] }, "example": "json" }, { "name": "srid", "in": "query", "description": "The srid of the coordinate system the geometry should be converted to.", "required": false, "schema": { "type": "integer", "enum": [ 4326, 3005, 3857, 26907, 26908, 26909, 26910, 26911 ], "default": 4326 } } ], "responses": { "200": { "description": "The geomark will be returned in the body of the HTTP response encoded in the requested [file format](https://apps.gov.bc.ca/pub/geomark/docs/fileFormats.html)." }, "400": { "description": "**Coordinate system with srid = is not supported.**\n\nCheck the list of supported [coordinate systems](https://apps.gov.bc.ca/pub/geomark/docs/coordinateSystems.html)." }, "404": { "description": "**The geomark could not be found.**\n\nCheck for extra characters on the end of the URL. The geomark may have expired and been deleted." }, "500": { "description": "**Internal Server Error**" } } } } }, "components": { "schemas": {} } }