-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creation of Polygon from a Nested Array of Points #23
Comments
But this convert is pretty straightforward:
Do you think it is not enough? |
That doesn't work for both. The point is though, that this is probably an extremely common process, so there should be a method to handle it so the load to switch to Flatten is even easier. Here is my code:
|
It makes sense. Maybe I will add this ability to the library |
…e() method, updated typescript definition, tests and documentation - Allow creation of polygon from array of numeric pairs, or from a nested array of numeric pairs (issue #23)
Available in @flatten-js/core v1.1.0 |
Available in v1.1.0. |
I have a number of arrays, such as [[1,1], [1,2], [2,2], [2,1]], and [[[1,1],[1,3],[2,3],[2,1]], [[2,2], [2,3], [4,3], [4,2]]].
That describe a single polygon and multipolygon respectively. The first function I need to add for any project I have is the code to convert from the nested points, to the Flatten polygons.
If there could be a function that would do this for me, it would make the library much easier to work with when implementing into a new project.
The text was updated successfully, but these errors were encountered: