PHPackages                             mslwk/route-planner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mslwk/route-planner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mslwk/route-planner
===================

A profiled route planning application designed for urban environments

91[1 issues](https://github.com/maciejslawik/route-planner/issues)PHP

Since Jul 24Pushed 8y ago2 watchersCompare

[ Source](https://github.com/maciejslawik/route-planner)[ Packagist](https://packagist.org/packages/mslwk/route-planner)[ RSS](/packages/mslwk-route-planner/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/f79bc37ad9ef801d2f4da8f32b6f6144c95c447f6bb3a121da8ccc52e51a2db3/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f726f7574652d706c616e6e65722f762f737461626c65)](https://packagist.org/packages/mslwk/route-planner)[![Latest Unstable Version](https://camo.githubusercontent.com/4d2707645e4b2cfc2ef4d96c33f4cbdc3d08f208d8388833f459fd4de6339103/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f726f7574652d706c616e6e65722f762f756e737461626c65)](https://packagist.org/packages/mslwk/route-planner)[![License](https://camo.githubusercontent.com/ad34e69cd248195d2f31c8e0c87ecdc9c8ea79ad1f545362b1403b5be12f580d/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f726f7574652d706c616e6e65722f6c6963656e7365)](https://packagist.org/packages/mslwk/route-planner)

Profiled route planner
======================

[](#profiled-route-planner)

The project finds a route well-suited for the requested type of vehicle in an urban environment. It uses PostgreSQL with additional extensions.

##### Supported vehicles

[](#supported-vehicles)

- motorcycle
- scooter
- bicycle

System requirements
-------------------

[](#system-requirements)

- PostgreSQL 9.6
- PostGIS 2.2
- pgRouting 2.2
- osm2pgrouting 2.0
- osm2pgsql 0.8
- PHP 7.1 with pgsql

Installation
------------

[](#installation)

1. Use composer to include the library in your project.

```
composer require mslwk/route-planner

```

2. After cloning the repository download a city extract in .osm file and place it in `vendor/mslwk/route-planner/maps/map.osm`
3. Create configs/config.yml file based on configs/config.example.yml
4. Run deployment/deploy.sh script

Detailed description
--------------------

[](#detailed-description)

The library utilises two PostgreSQL databases to find the best route between two points. One database is a complete set of information from OSM and is used e.g. to find streets which with trams. The second one is pgRouting database which represents a city as a weighted graph and calculates the route.

Nominatim API is used to find the coordinates between the given addresses. The coordinates are used to find the graph vertices that are closest to the addresses.

The library supports two shortest-path algorithms (Dijkstra/A\*).

The route is returned as an array of coordinates.

The data calculated is a json object.

##### Example of a successfully calculated route (from JSON API)

[](#example-of-a-successfully-calculated-route-from-json-api)

[![Alt text](docs/success.png?raw=true "Route found")](docs/success.png?raw=true)

##### Example of a failure (from JSON API)

[](#example-of-a-failure-from-json-api)

[![Alt text](docs/failure.png?raw=true "Route found")](docs/failure.png?raw=true)

Live examples
-------------

[](#live-examples)

The examples show a route calculated using the library and displayed using Google Maps.

#### Motorcycle

[](#motorcycle)

[![Alt text](docs/example_motorcycle.png?raw=true)](docs/example_motorcycle.png?raw=true)

#### Bicycle

[](#bicycle)

[![Alt text](docs/example_bicycle.png?raw=true)](docs/example_bicycle.png?raw=true)

#### Scooter

[](#scooter)

[![Alt text](docs/example_scooter.png?raw=true)](docs/example_scooter.png?raw=true)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dd1db0bcc71b12f314bdce40703dc572ce6d093a2ff56845f19ddd816283436?d=identicon)[mslwk](/maintainers/mslwk)

---

Tags

navigationpgroutingphppostgispostgresqlroute-planner

### Embed Badge

![Health badge](/badges/mslwk-route-planner/health.svg)

```
[![Health](https://phpackages.com/badges/mslwk-route-planner/health.svg)](https://phpackages.com/packages/mslwk-route-planner)
```

###  Alternatives

[liborm85/composer-vendor-cleaner

Composer Vendor Cleaner removes unnecessary development files and directories from vendor directory.

34389.0k1](/packages/liborm85-composer-vendor-cleaner)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
