Number of Features in a Table

Description

Returns the number of features within a named table. This method can also use a search at point query parameter to return the number of features at a given point, using a distance tolerance around the point. Here are some basic rules for the searchAtPoint method when returning feature count:

HTTP GET URL Format

The following format is used for HTTP GET requests:


HTTP GET /tables/tablename/features/count&q=searchAtPoint&point=point,srs
&[tolerance=distance unit]&destinationSrs
&[geometryAttributeName=geomname]&[l=locale]
			

Parameters

For information on the parameter types listed below, see Request URL Data Types.

Parameter Type Required Description
tablename String yes The name of the table to return feature 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 feature metadata for a named table located at /Samples/NamedTables/WorldTable in the Repository, the following URL would be used:
.../FeatureService/tables/Samples/​NamedTables
/WorldTable/features/count;...
q=searchAtPoint String no The query method to perform. This must be searchAtPoint.
point=point,srs String no 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).
geometryAttributeName=

geomname

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.

Returns

Returns metadata for a named table in the repository.

Examples

Returns the total number of features that are in the WorldTable.



http://www.pbbi.com/rest/Spatial/FeatureService/tables/Samples/NamedTables/WorldTable/features/count

			

Returns the total number of features from the WorldTable that are within 1000 miles from the specified point.



http://midw7x64:8080/rest/Spatial/FeatureService/tables/Samples/NamedTables/WorldTable/features/count?
q=searchAtPoint&point=-75.651157,45.374245,EPSG:4326&tolerance=1000%20mi