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

Generated voronoi regions interesect with geometries #4

Closed
christianayala10 opened this issue Sep 19, 2022 · 1 comment
Closed

Generated voronoi regions interesect with geometries #4

christianayala10 opened this issue Sep 19, 2022 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@christianayala10
Copy link

I have generated the voronoi regions (in red) for the geometries in blue. As it can be seen, the resulting voronoi regions interset with the original geometries. Any idea?

image

@longavailable
Copy link
Owner

longavailable commented Nov 17, 2022

Firstly, it is a very interesting feedback. Many thanks!

How did it happen?

Voronoi diagram for polygons is based on shapely.ops.voronoi_diagram.

As it mentioned in the mannual:

All vertices of the geometry will be used as the input points to the diagram.

Let us have a look on the geometries from your inputs.

Simple geometries with TOO less vertices!

Then it should be added more vertices along their edges.

I added a few to functions to reach it. See v0.1.3.

When you type:

vd = voronoiDiagram4plg(builtup, boundary)

It return the same output as you posted.

And when:

vd = voronoiDiagram4plg(input, boundary, densify=True)

It will proceed a automatical densifying preprocessing. And it will return the following.

image

It looks much better!

You can also assign an expected spacing to spacing parameter, for example:

vd = voronoiDiagram4plg(input, boundary, densify=True, spacing=5000)

At last, when you post a specific issue, it 's better to upload the related attachments. That will be time-saving for a reviewer.

@longavailable longavailable added bug Something isn't working enhancement New feature or request question Further information is requested labels Nov 17, 2022
@longavailable longavailable self-assigned this Nov 17, 2022
@longavailable longavailable added the good first issue Good for newcomers label Nov 17, 2022
This was referenced Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants