Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

itinero/geo

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages