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

Add exact vectorization #18

Open
AlexeyTrekin opened this issue Apr 2, 2020 · 0 comments · May be fixed by #20
Open

Add exact vectorization #18

AlexeyTrekin opened this issue Apr 2, 2020 · 0 comments · May be fixed by #20
Assignees
Labels
enhancement New feature or request

Comments

@AlexeyTrekin
Copy link
Member

Current vectorization is based on OpenCV and produces a simplified output.
It can lead to errors due to self-intersection of the geometries, and can cause holes and intersections in case of two near objects.
Also, we want a topojson-like structure if the objects of two different classes have the same boundary, but currently their boundaries will be different due to separate vectorization.

So what we need is:

  • test if the current variant can make the exact vectorization if the parameters are correct ( probably not).
  • vectorization by the actual pixel boundaries (like rasterio.features.shapes(), but with contour hierarchy).
  • merge of the polygons that are connected by the corner, without self-intersection
  • simplification of the contours that will preserve correctness of the shapes

The next step will be a topojson extension based on the current result.

Screenshot from 2020-04-02 11-59-19

Illustration: current result of the vectorization of two objects with the shared boundary - both intersection and gap are present.

@AlexeyTrekin AlexeyTrekin added the enhancement New feature or request label Apr 2, 2020
@AlexeyTrekin AlexeyTrekin self-assigned this Apr 2, 2020
@AlexeyTrekin AlexeyTrekin linked a pull request Apr 8, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant