Database Reference
In-Depth Information
Thedifficultywithskeletonizationapproaches,aswe'llsoonsee,isthattheyareof-
ten subject to noise, which is something that natural features like our stream have
plentyof.Thismeansthattypicalskeletonization,whichcouldbedonesimplywitha
Voronoi approach, is therefore inherently inadequate for our purposes.
Thisbringsustothereasonwhyskeletonizationisincludedinthischapter.Routing
is a way for us to simplify skeletons derived from the Voronoi method. It allows us
to trace from one end of a major feature to the other, and skip all of the noise in
between.
Getting ready
AswewillbeusingtheVoronoicalculationsfromthe Using external scripts to embed
new functionality in order to calculate a Voronoi diagram recipein Chapter4 , Work-
ing with Vector Data - Advanced Recipes ,refertothatrecipetoprepareyourselffor
using the functions in this recipe.
Once the Voronoi function is in place, we can begin with our problem dataset—a
stream—using the following command:
shp2pgsql -s 3734 -d -i -I -W LATIN1 -g
the_geom ebrr_polygon public.voronoi_hydro |
psql -U me -d postgis_cookbook
The streams we create will look as shown in the following screenshot:
Search WWH ::




Custom Search