Database Reference
In-Depth Information
Extracting the centerlines of polygons
exploredextractingVoronoipolygonsfromsetsofpoints.Inthisrecipe,we'llusethe
Voronoifunctionemployedinthe
Using external scripts to embed new functionality in
order to calculate a Voronoi diagram
recipe,in
Chapter4
,
Working with Vector Data
- Advanced Recipes
,toserveasthefirststepinextracting thecenterlineofapoly-
gon.Onecouldalsousethe
Using external scripts to embed other libraries in order
Data - Advanced Recipes
,whichwouldrunfasteronlargedatasets.Forthisrecipe,
we will use the simpler but slower approach.
One additional dependency is that we will be using the
chp02.polygon_to_line(geometry)
function from the
Normalizing
internal
Whatdowemeanbythecenterlineofapolygon?Imagineadigitizedstreambetween
its pair of banks as shown in the following screenshot: