How the Polygon Generator Works
This tool lets you create GeoJSON Polygon features by defining vertex coordinates. Enter the coordinates of each vertex and the generator produces a valid GeoJSON Polygon with a properly closed ring (the last coordinate automatically matches the first).
GeoJSON Polygon Rules
Valid GeoJSON Polygons must follow these rules from the RFC 7946 specification:
- The exterior ring must have at least four positions (three unique vertices plus the closing point)
- The first and last positions must be identical (closed ring)
- Exterior rings should follow the right-hand rule (counterclockwise winding)
- Holes (interior rings) use clockwise winding
- Coordinates are in
[longitude, latitude]order
Use Cases
- Creating boundary polygons for geofencing applications
- Defining service areas or delivery zones
- Building test polygons for spatial query development
- Drawing regions of interest for data analysis
To create point features instead, use the point generator. To verify your polygon's winding order, use the rewind tool.
Try It
Create a triangle connecting Central Park, Brooklyn Bridge, and Times Square. The generator produces a Polygon with four positions (three vertices plus the closing point):
GeoJSON{
"type": "Feature",
"properties": { "name": "NYC Triangle" },
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-73.9654, 40.7829],
[-73.9969, 40.7061],
[-73.9855, 40.7580],
[-73.9654, 40.7829]
]
]
}
}The first vertex (Central Park) and last vertex are identical, closing the ring. The vertices follow counterclockwise winding order as required by RFC 7946. Paste this output into the viewer to see the triangle rendered on a map of Manhattan.
How It Works
The polygon generator takes your list of vertex coordinates, validates that each falls within the WGS 84 coordinate range, and arranges them into a GeoJSON Polygon coordinate array. It automatically appends a copy of the first vertex to close the ring, and applies counterclockwise winding order for the exterior ring. Interior rings (holes) can be added separately with clockwise winding.
Learn more about polygon rules in the GeoJSON specification guide.