Questions tagged [voronoi]
A Voronoi diagram is a subdivision of space.
voronoi
544
questions
1
vote
2
answers
50
views
Add a legend to a voronoi diagram with field values
I try to create a map with a voronoi diagram of some climate stations. I've already created the diagram and also colored the areas in the diagram with a fitting color. Now I want a continuous legend ...
1
vote
0
answers
38
views
QGIS, GRASS - Voronoi skeleton at cycles
I have some vector-geometries (made from rasters earlier) in QGIS and try to find the center line within them with v.voronoi.skeleton, so far so good:
However, if the geometries get more complicated, ...
0
votes
0
answers
65
views
Add adjacency matrix in Voronoi
The data x and y represent the geographic coordinates of the centroids of cities 1 to 8:
> df <- data.frame(
+ ID = 1:8,
+ x = c(4.0, 7.0, 2.5, 8.0, 3.0, 5.0, 6.0, 7.0),
+ y = c(8, 9, 4, 5,...
1
vote
1
answer
53
views
Given a convex polygon as a set of edges how to fill the area inside depending on the distance to the closest edge
Given a convex Polygon as a set of edges (in this case on the plane from [[-1,1],[-1,1]] like this:
edges = [
[[-0.8, 0],[-0.3,0.6]],
[[-0.3,0.6],[0,0.8]],
[[0,0.8],[0.7,0.6]],
[[0.7,0.6],[...
0
votes
0
answers
25
views
Custom labels in Voronoi chart
The below code uses just one parameter label_size, but given that the actual data that I will use will contain short and (very) long names, I wonder if it is possible to make the labels as large as ...
3
votes
1
answer
205
views
Intersecting GEOMETRYCOLLECTION with POLYGON
I am using Shapely to intersect geographical data and Pyshp to write the results to a shapefile. I don't completely understand how "intersection" works.
First, I create some points and ...
0
votes
0
answers
12
views
Respacing dense areas in schematic point diagram
I am trying to create a schematic diagram from a geographical map such that I can somehow avoid dense areas while still trying to maintain the rough "shape" of the pointset.
Below is an ...
0
votes
1
answer
71
views
PostGIS ST_VoronoiPolygons with a single point
Working on some geography code in PostGIS, I come across what seems to me to be some odd behaviour for ST_VoronoiPolygons
Returns an empty geometry collection if the input geometry contains only one ...
1
vote
1
answer
119
views
Search of optimal algorithm to find a point in 2D plane, whose inclusion maximizes the area of new voronoi region
I am working with Voronoi diagrams limited to a section of plane (so that I can measure areas of regions, and they don't go off to infinity), and I'm considering only integer co-ordintes in this ...
1
vote
2
answers
186
views
Fast way to find closest line segment for a large set of planar points [Python]
Problem
Given are n=10000 points and m=1000 line segments in a plane. The task is to determine the closest segment to each point. A fast solution in Python is preferred.
Specifications
Line segments ...
1
vote
2
answers
139
views
How to find valleys and intersections in a distance field?
I have a 2d array representing height. It contains peaks, and then a linear gradient in between the peaks.
I am generating the array myself, based on the positions of the peaks. The gradient is simply ...
0
votes
0
answers
29
views
white regions in voronoi diagram
help pls
How i can color the unfilled (white) regions in the corresponding color points, just like all the others?
the code accepts several clusters as input, gives each a light and builds a ...
1
vote
0
answers
75
views
Compute Voronoi nodes of a polygon with CGAL
I have a polygon P given as a set of points, and I need to compute the radius of the largest inscribed circle.
To do that, I am following the answer given by the user "Plow" here: https://...
0
votes
1
answer
84
views
Voronoi diagram gives unexpected results in scipy
I have the following pandas dataframe:
import pandas as pd
pd.DataFrame({'cl': {0: 'A', 1: 'C', 2: 'H', 3: 'M', 4: 'S'},
'd': {0: 245.059986986012,
1: 320.49044143557785,
2: 239.79023081978914,
...
1
vote
2
answers
122
views
Transparent or uniform colour for outer-most Voronoi polygons in a figure
I'm trying to remove the outer polygons in a Voronoi diagram. The main plot looks like this:
require(ggplot2)
require(ggvoronoi)
set.seed(2023)
N <- 80
x <- runif(N)
y <- runif(N)
df <- ...