Skip to content

Add exact vectorization #18

@AlexeyTrekin

Description

@AlexeyTrekin

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions