Book Image

Python Geospatial Analysis Cookbook

Book Image

Python Geospatial Analysis Cookbook

Overview of this book

Table of Contents (20 chapters)
Python Geospatial Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Other Geospatial Python Libraries
Mapping Icon Libraries
Index

Creating an indoor route-type service


Building a route based on a specified type value, such as a Barrier Free Route or Standard Pedestrian Route value, is great for your users. How to build different route types is based on the available data connected to our indoor graph of ways. This example will allow a user to select the barrier-free route and our service will generate a path, avoiding obstacles such as stairs:

Getting ready

We need to access some more data on our network to allow routing types. The type of route is based on a network line type, which is stored as an attribute on each LineString. To classify our route types, we have the following lookup table schema:

Value

Route type

0

Indoor route

1

Outdoor route

2

Elevator

3

Stairs

Therefore, we want to avoid any stairs segments, which technically means avoiding type_id = 3.

Note

Optionally, you could create a lookup table to store all the possible types and their equivalent weights. These values could then be included...