itinero / geo

A module for Itinero for IO using NTS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

geo

Build status Join the chat at https://gitter.im/Itinero/Lobby Visit our website Apache 2.0 licensed

A module to use Itinero together with NTS and IO from common geo formats. The following projects can be found in this repo:

  • Itinero.Geo: Links Itinero and NTS together. NuGet Badge
  • Itinero.IO.Shape: IO to read/write routable shapefiles. NuGet Badge

How to use

The biggest usecase is to load shapefiles into Itinero:

// the vehicle profile defines the from and to columns and things like speeds per link type.
var vehicle = DynamicVehicle.LoadFromStream(File.OpenRead("car.lua")); // load data for the car profile.

// create a new router db and load the shapefile.
var routerDb = new RouterDb(EdgeDataSerializer.MAX_DISTANCE);
routerDb.LoadFromShape("/path/to/shape/", "wegvakken.shp", vehicle);

// write the router db to disk for later use.
routerDb.Serialize(File.OpenWrite("nwb.routerdb"));

More info is in the sample in this repo.

About

A module for Itinero for IO using NTS.

License:Apache License 2.0


Languages

Language:C# 98.9%Language:Shell 0.7%Language:Batchfile 0.4%