O'Reilly logo

Python Geospatial Analysis Cookbook by Michael Diener

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A point must be on the starting and ending nodes of a line only

A routing network of connected edges may contain some routing logic associated with the intersections of roads that are represented as points. These points must, of course, be exactly located at the start or end of a line in order to identify these junctions. Once the junctions are found, various rules can be applied in the attributes to control your routing, for example.

A typical example would be turn restrictions that could be modeled as points:

A point must be on the starting and ending nodes of a line only

How to do it...

Our handy utils.py module located in the trunk folder helps us out with the mundane tasks of importing a Shapefile and converting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required