You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently testing some functionalities in my app, of which one is to check if an object is a valid GeoJSON. I'm using @mapbox/geojsonhint for this.
To test this function I generate random polygons with @turf/random. The problem is that all polygons randomly generated by the randomPolygon function fail due to the right-hand rule.
To reproduce generate a new feature using the randomPolygon function from @turf/random or copy the example above and paste it into geojson.io or geojsonlint.
The text was updated successfully, but these errors were encountered:
Yikes. That's not ideal. Thanks for reporting this @ariel-salgado. If you need a workaround take a look at @turf/rewind - it should re-wind your polygons into compliance.
I am currently testing some functionalities in my app, of which one is to check if an object is a valid GeoJSON. I'm using @mapbox/geojsonhint for this.
To test this function I generate random polygons with
@turf/random
. The problem is that all polygons randomly generated by therandomPolygon
function fail due to the right-hand rule.The RFC 7946 states here:
@mapbox/geojsonhint is not the only one complaining about this, tools like geojson.io and geojsonlint also throw the same error.
I'm using @turf/random v6.5.0.
Random feature generated by
randomPolygon
:To reproduce generate a new feature using the
randomPolygon
function from@turf/random
or copy the example above and paste it into geojson.io or geojsonlint.The text was updated successfully, but these errors were encountered: