Searches a named table within the repository for features that are at a specified point, within a certain tolerance. You have the options of returning all of the attribute data, specific attribute data, and ordering the returned data by an attribute. Here are some basic rules for the searchAtPoint method:
This operation returns a feature collection JSON that can be passed to a render map or render legend request in the Mapping service.
The following format is used for HTTP GET requests:
HTTP GET /tables/tablename/features.rep;[attributes=attname];[orderBy=attname dir] &q=searchAtPoint&point=point,srs&[tolerance=distance unit] &destinationSrs&[geometryAttributeName=geomname]&[l=locale] &[page=pagenumber]&[pageLength=pagelength]
For information on the parameter types listed below, see Request URL Data Types.
|tablename||String||yes||The name of the table to return metadata. The table is specified by a Regex for the named table to render based on the location of the named table in the Repository. The name of the named table is defined between the /tables portion of the URL and the /metadata.rep portion of the URL. For example, to return the metadata for a named table located at /Samples/NamedTables/WorldTable in the Repository, the following URL would be used:
|rep||String||yes||The representation to be returned. Supported representation is json.|
|attributes=attname||String||no||The attribute names of the table to be returned in the response. By default all attributes are returned. More than one attribute is defined by a comma separated list. This is a simple way of limiting the amount of information in the response to include only the information requested. Each feature in the resulting feature collection will only contain the specified attributes. For example, if the table contains four attributes, but only two are required in the response, those two attribute names can be specified here (separated by a comma) and the values for the other two will not be returned.|
|orderBy=attname dir||String||no||The attribute name and direction to order the returned results. By default the results are ordered from closest to farthest based on the distance from the specified point. When specifying an attribute to order the results, you must include both the attribute name and the ordering direction (A for ascending(low to high) or D for descending(high to low)).|
|q=searchAtPoint||String||yes||The query method to perform. This must be searchAtPoint.|
|point=point,srs||String||yes||The point used as the starting location for the search. The point must include the x/y positions and the spatial reference system for the geometry. For example: point=-75.651157,45.374245,EPSG:4326|
|tolerance=distance unit||String||no||The distance to search around the point. By default the tolerance is 300 meters. When specified, the tolerance must include the distance value and distance unit. The distance values returned in the response will be in the units specified in the request (default is meters).|
|destinationSrs||String||no||The coordinate system to return the resulting geometries. The default is the coordinate system of the data used (for example: epsg:4326).|
|String||no||The geometry definition attribute from the table that should be used for processing the spatial query. This attribute is only required for tables that contain more than one geometry attribute definition.|
|l=locale||String||no||The locale in which to return the table information. Uses the Java Locale format consisting of an ISO two letter language code and an ISO two letter country code. If not specified then assumes server default.|
|page=pagenumber||String||no||The page number to return.|
|String||no||The number of features returned on each page. If the page parameter is specified in the request, you must define pageLength.|
Returns metadata for a named table in the repository.
Returns the world capitals that are within 1000 miles from the specified point. All attributes for features found in the WorldcapTable will be returned.
Returns the world capitals that are within 500 miles from the specified point. Only the Country and Cap_Pop attributes for features found in the WorldcapTable will be returned.
http://www.pbbi.com/rest/Spatial/FeatureService/tables/Samples/NamedTables/WorldcapTable/ features.json;attributes=Country,Cap_Pop?q=searchAtPoint&point=-75.651157,45.374245, EPSG%3A4326&tolerance=500%20mi&destinationSrs=epsg:3857
Returns the world capitals that are within 500 miles from the specified point. Only the Country attribute will be returned, and order on the Country attribute in descending order, for features found in the WorldcapTable.
http://www.pbbi.com/rest/Spatial/FeatureService/tables/Samples/NamedTables/WorldcapTable/features.json; attributes=Country;orderBy=Country%20D?q=searchAtPoint&point=-75.651157,45.374245, EPSG%3A4326&tolerance=500%20mi&l=en-US