[ Whereis® API Home ] [ JSON API Home ] [ Object Index ] [ Geometry Types ]
A polygon describes an area on the map as a list of ring structures.
The <polygon> object may take one of three basic forms:
- a single ring, which is simply a closed polyline: that is, a polyline in which the start point and end point are the same. This is what one would usually think of as a 'polygon'
- a series of separate but related rings, such as might be used to. represent a series of islands
- a complex of rings, one within another to create, for example, a doughnut shape in which the inner polygon is effectively an exclusion zone within the outer polygon. For example, if you wished to create a polygon describing the shape of New South Wales, you might define an inner ring to exclude the ACT.
Format
{
"rings":[ {"points":[<point>] } ],
"area":<double>,
"centroid":<point>
}
Parameters
Name | Mandatory? | Description |
rings | Y | An array of one or more <point> arrays |
points | Y | A polyline - or array of <point> objects - which, when joined, make one ring |
| area | Response only | Area of the polygon in square metres |
| centroid | Response only | Centroid (centre of mass) of the polygon |
NOTES
The system will automatically join the first <point> in the "points" array to the last <point>.