In the Search service, there are instances when shapes are used, such as an area to search or an area to search for. Below is a table demonstrating the three basic types of shapes.
| Type |
Description |
Formats |
|
Point
|
A single latitude/longitude pair for the shape. A point would be used for a radius search or for single points to search for. As seen below, points are also used to create other shapes |
- raw: 40.099998,-76.305603
- simple: POINT(-76.305603 40.099998)
- compressed: _`wsF~lvpM
|
|
LineString
|
Multiple points that make up a line string, the start and end points do not equal. This is the type of shape used for a corridor search. |
- raw: 39.96488,-76.729949,41.099998,-76.305603,39.899011,-76.164335,39.099998,-78.305603
- simple: LINESTRING(-76.305603 40.099998,-76.305603 41.099998,-77.305603 41.099998,-78.305603 39.099998)
- compressed: os|rFdiisMou|Ee{qAdqiF}qZx`{C|eaL
|
|
Polygon
|
Multiple points that make up a polygon, the start and end points must equal.
Note: polygon doesn't currently support "donut" polygons".
|
- raw: 40.099998,-76.305603,41.099998,-76.305603,41.099998,-77.305603,40.099998,-76.305603
- simple: POLYGON(-76.305603 40.099998,-76.305603 41.099998,-77.305603 41.099998,-76.305603 40.099998)
- compressed: _`wsF~lvpM_ibE??~hbE~hbE_ibE
|
See the Compressed Lat/Lng description
page for more detail on the compressed format, including sample source code and an interactive
encoder/decoder.