Polygon: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Maxim@tygron.com (talk | contribs)
No edit summary
Maxim@tygron.com (talk | contribs)
No edit summary
Line 2: Line 2:


Each individual polygon is still stored as a list of linear rings (outer boundary, plus optional holes). The outer array contains one entry per polygon.
Each individual polygon is still stored as a list of linear rings (outer boundary, plus optional holes). The outer array contains one entry per polygon.
In [[GeoJSON]], a Polygon looks like this:
<br>
<code>
{
"type": "Feature",
"properties": { "name": "Square" },
"geometry": {
"type": "Polygon",
"coordinates": [[
[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]
]]
}
}
</code>
{{article end
|seealso=
* [[Point]]
* [[MultiPolygon]]
* [[GeoJSON]]
}}

Revision as of 13:07, 15 July 2026

A polygon is a 2D (flat) shape made from straight line segments that connect end-to-end to form a closed loop.

Each individual polygon is still stored as a list of linear rings (outer boundary, plus optional holes). The outer array contains one entry per polygon.

In GeoJSON, a Polygon looks like this:
{ "type": "Feature", "properties": { "name": "Square" }, "geometry": { "type": "Polygon", "coordinates": [[ [0, 0], [1, 0], [1, 1], [0, 1], [0, 0] ]] } }