This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
thinkgeo_cloud_maps_query [2019/06/25 03:40] kevinwan created |
thinkgeo_cloud_maps_query [2019/06/25 06:47] (current) kevinwan [Get Attributes of Layer] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== ThinkGeo Cloud Maps Query ====== | ====== ThinkGeo Cloud Maps Query ====== | ||
ThinkGeo Cloud Maps Query provides RESTful APIs to perform spatial query against each types of data. | ThinkGeo Cloud Maps Query provides RESTful APIs to perform spatial query against each types of data. | ||
+ | |||
+ | |||
+ | ===== RESTful APIs ===== | ||
+ | |||
+ | * //**Try it Online**:// All of the ThinkGeo Cloud RESTful APIs can be tested online by following the instructions below: | ||
+ | * Get a ThinkGeo Cloud Client Key. Check out [[https://wiki.thinkgeo.com/wiki/thinkgeo_cloud_client_keys_guideline|ThinkGeo Cloud Client Keys Guideline]] to see how to acquire and apply one. All ThinkGeo Cloud evaluations are FREE for 60 days. | ||
+ | * Visit our [[https://cloud.thinkgeo.com/help/|ThinkGeo Cloud API Explorer]], click the "Authorize" button at the top and enter your client credentials. You are then free to play with all the APIs online. | ||
+ | |||
+ | |||
+ | //**ThinkGeo Cloud Maps Query provides the following RESTful APIs**:// | ||
+ | |||
+ | |||
+ | ==== Get Features Within ==== | ||
+ | Get the features that are within the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/within | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20WithinV1|GetFeaturesWithin]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Containing ==== | ||
+ | Get the features that contain the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/containing | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20ContainingV1|GetFeaturesContaining]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Intersecting ==== | ||
+ | Get the features that intersect the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/intersecting | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20IntersectingV1|GetFeaturesIntersecting]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Overlapping ==== | ||
+ | Get the features that overlap the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/overlapping | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20OverlappingV1|GetFeaturesOverlapping]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Touching ==== | ||
+ | Get the features that touch the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/touching | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20TouchingV1|GetFeaturesTouching]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Nearest ==== | ||
+ | Get the features that are nearest the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/nearest | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">searchRadius</span>: Optional. The radius of the search area around the target geometry. If not specified, it's assumed that there is no limit.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">searchRadiusUnit</span>: Optional. The unit of measure in which the <span class="api-parameter-name">searchRadius</span> is expressed. Defaults to Meter.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20NearestV1|GetFeaturesNearest]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Within Distance ==== | ||
+ | Get the features that are within a certain distance of the target shape. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/within-distance | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The layer to query.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">wkt</span>: The well-known text of the target geometry.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">srid</span>: Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">proj4String</span>: Optional. The Proj4 string of the input and output feature's coordinate system.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">distance</span>: Optional. The distance within which to find features. Defaults to 200.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">distanceUnit</span>: Optional. The unit of measure in which the <span class="api-parameter-name">distance</span> is expressed. Defaults to Meter.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">maxResults</span>: Optional. The maximum number of features to return. Defaults to 100.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">returnFeatureAttributes</span>: Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true.</span></html> | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">featureAttributesToReturn</span>: Optional. If <span class="api-parameter-name">returnFeatureAttributes</span> is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20Within%20DistanceV1|GetFeaturesWithinDistance]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Features Custom ==== | ||
+ | Perform a custom spatial query, using the specified query layer, spatial relationship type, and query feature. | ||
+ | |||
+ | <code html> | ||
+ | HTTP POST | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/custom | ||
+ | </code> | ||
+ | |||
+ | //**POST Body (Content-Type: application/json)**// | ||
+ | <code javascript> | ||
+ | { | ||
+ | "queryLayer": "string", //The layer to query. | ||
+ | "queryType": "string", //The type of query to perform. Value can be one of: "Within", "Containing", "Intersecting", "Overlapping", "Touching", "Nearest", "Within-Distance". | ||
+ | "wkt": "string", //The well-known text of the target geometry. | ||
+ | "srid": int, //Optional. The SRID of the input and output feature's coordinate system. Defaults to 4326. | ||
+ | "proj4String": "string", //Optional. The Proj4 string of the input and output feature's coordinate system. | ||
+ | "distance": double, //Optional. The distance within which to find features. Defaults to 200. | ||
+ | "distanceUnit": "string", //Optional. The unit of measure in which the distance is expressed. Defaults to Meter. | ||
+ | "searchRadius": double, //Optional. The radius of the search area around the target geometry. If not specified, it's assumed that there is no limit. | ||
+ | "searchRadiusUnit": "string", //Optional. The unit of measure in which the searchRadius is expressed. Defaults to Meter. | ||
+ | "maxResults": int, //Optional. The maximum number of features to return. Defaults to 100. | ||
+ | "returnFeatureAttributes": bool, //Optional. Specify whether the feature attribute names and values will be returned in the response. Defaults to true. | ||
+ | "featureAttributesToReturn": [ | ||
+ | "string" | ||
+ | ] //Optional. If returnFeatureAttributes is true, this specifies which a specific subset of attributes to be returned. Formatted as a comma-delimited list of attribute names that should be returned with each feature in the response. | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20Features%20CustomV1|GetFeaturesCustom]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Query Layers ==== | ||
+ | List the available query layers. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/layers | ||
+ | </code> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20World%20Maps%20Query%20LayersV1|GetQueryLayers]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ==== Get Attributes of Layer ==== | ||
+ | List the feature attributes available on the given query layer. | ||
+ | |||
+ | <code html> | ||
+ | HTTP GET | ||
+ | https://cloud.thinkgeo.com/api/v1/maps/query/{queryLayer}/attributes | ||
+ | </code> | ||
+ | |||
+ | //**URL Parameters**// | ||
+ | * <html><span class="api-parameter"><span class="api-parameter-name">queryLayer</span>: The query layer.</span></html> | ||
+ | |||
+ | Visit [[https://cloud.thinkgeo.com/help/index.html#/WorldMapsQuery/Get%20World%20Maps%20Query%20Attributes%20Of%20LayerV1|GetAttributesOfLayer]] and click "Try It Out" to explore this API online. | ||
+ | |||
+ | |||
+ | ===== Consume From Client Side SDKs ===== | ||
+ | |||
+ | <code csharp> | ||
+ | |||
+ | Coming soon | ||
+ | |||
+ | </code> | ||
+ | |||
+ | |||
+ | ===== Samples ===== | ||
+ | |||
+ | Online Sample: | ||
+ | |||
+ | <code csharp> | ||
+ | |||
+ | Coming soon | ||
+ | |||
+ | </code> | ||
+ | |||
+ | Desktop Sample: | ||
+ | |||
+ | <code csharp> | ||
+ | |||
+ | Coming soon | ||
+ | |||
+ | </code> | ||
+ | |||
+ | Web Sample: | ||
+ | |||
+ | <code csharp> | ||
+ | |||
+ | Coming soon | ||
+ | |||
+ | </code> | ||
+ | |||
+ | Mobile Sample: | ||
+ | <code csharp> | ||
+ | |||
+ | Coming soon | ||
+ | |||
+ | </code> | ||
+ | |||
+ | |||
+ | ===== Related Links ===== | ||
+ | * [[thinkgeo_cloud_geocoding|ThinkGeo Cloud Geocoding]] | ||
+ | * [[thinkgeo_cloud_maps_wms|ThinkGeo Cloud Maps WMS]] | ||
+ | * [[thinkgeo_cloud_maps_vector_tiles|ThinkGeo Cloud Maps Vector Tiles]] | ||
+ | * [[thinkgeo_cloud_maps_raster_tiles|ThinkGeo Cloud Maps Raster Tiles]] | ||
+ | * [[thinkgeo_cloud_reverse_geocoding|ThinkGeo Cloud Reverse Geocoding]] | ||
+ | * [[thinkgeo_cloud_projection|ThinkGeo Cloud Projection]] | ||
+ | * [[thinkgeo_cloud_colors|ThinkGeo Cloud Colors]] | ||
+ | * [[thinkgeo_cloud_timezone|ThinkGeo Cloud Time Zones]] | ||