A GeoJSON geometry, feature, feature collection, or null.
A rewound copy; non-polygon geometries are returned unchanged. Polygon coordinates are two-dimensional.
// Rewind a FeatureCollection.
const featureCollection = {
type: "FeatureCollection",
features: [
{
type: "Feature",
properties: {},
geometry: {
type: "Polygon",
coordinates: [[[-10, -10], [-10, 10], [10, 10], [10, -10], [-10, -10]]]
}
}
]
};
const rewoundFeatureCollection = rewind(featureCollection);
Rewinds the winding order of the specified GeoJSON object to be clockwise. It is based on the D3-geo library's winding order conventions.