Skip to content
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

Terracer #18

Open
systemed opened this issue May 20, 2021 · 0 comments
Open

Terracer #18

systemed opened this issue May 20, 2021 · 0 comments

Comments

@systemed
Copy link
Owner

systemed commented May 20, 2021

It would be good to have terracer functionality like JOSM's, even if we just restrict it to simple rectangles for now.

First of all we need to implement a "slice" action for areas: given nodes A1 and B1, slice the polygon into two along a new line A1-B1.

Then we can implement a terracer like this:

  • find the longest edge (A)
  • find the opposite edge (B)
  • interpolate nodes A1, A2, A3... and B1, B2, B3...
  • slice polygon A1-B1
  • slice remainder A2-B2
  • slice remainder A3-B3
  • etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant