- USGS Thesaurus
- Common geographic areas
Common Geographic Areas web services: Area centroid
Given the unique identifier for a geographic area as specified in the Common Geographic Areas thesaurusn, return the longitude and latitude of the centroid of the area, and a practical zoom level appropriate for use in map interfaces employing the web mercator coordinate system.
Service URL |
https://apps.usgs.gov/thesaurus/cga/centroid.php
|
Input parameters |
code |
Unique identifier of a common geographic area as specified in the Common Geographic Areas thesaurus. |
callback |
This parameter is used by Javascript libraries to request information in JSONP format. |
|
Output |
A JSON object is returned. Properties of the object are as follows:
x |
Geographic longitude of the centroid of the area, in decimal degrees WGS84, west longitudes negative. |
y |
Geographic latitude of the centroid of the area, in decimal degrees WGS84, south latitudes negative. |
z |
Zoom level expressed as an integer between 2 and 15. An approximate value intended to enable web map interfaces to provide appropriate focus for the geographic area. |
|
Example
https://apps.usgs.gov/thesaurus/cga/centroid.php?code=fUS50&f=json