Project-OSRM / node-osrm

DEPRECATED Part of osrm-backend since 5.7. NodeJS bindings for OSRM
BSD 2-Clause "Simplified" License
141 stars 48 forks source link

Bundle osrm-components with node-osrm #283

Closed daniel-j-h closed 7 years ago

daniel-j-h commented 7 years ago

The use case came up to quickly iterate on components and a modified profile making use of the shapefile generated by osrm-components. At the moment we do not bundle osrm-components mainly because it is an internal tool, we run it on the demo server anyway, and there is the debug map rendering components in real-time.

Can we bundle osrm-components easily with this package for npm?

What I can see on the osrm side is components not being supported by the mason build? Is this because of libgdal? @springmeyer any insights here - what's your take on this ticket?

cc @geohacker @srividyacb @oini

TheMarex commented 7 years ago

Yeah we don't bundle it because we don't want to depend on libgdal (of which we require a super outdated version that doesn't even ship with Debian anymore as far as I recall).

One way around this would be to let osrm-components emit geojson and use tippecanoe to convert it to vector tiles we can use.

springmeyer commented 7 years ago

What I can see on the osrm side is components not being supported by the mason build? Is this because of libgdal? @springmeyer any insights here - what's your take on this ticket?

Yes, we could support libgdal in the mason build (there are mason packages for gdal) but @TheMarex and I decided not to. I'm still in support of this because gdal is a large download and would slow down the mason fetch. I also agree that the best route forward is to target geojson in osrm-components to avoid a gdal dep.

danpat commented 7 years ago

Another alternative:

http://shapelib.maptools.org/

I've used this, it works. The shapefile format is significantly smaller than a GeoJSON output would be. For our use case, we would only need a very simple wrapper.

daniel-j-h commented 7 years ago

Let's keep the discussion here free of upstream decisions, we already have

which outlines pros and cons of going the GeoJSON way.

daniel-j-h commented 7 years ago

https://github.com/Project-OSRM/osrm-backend/pull/3570 just landed upstream unblocking us from bundling osrm-components with node-osrm in the 5.6 release. Let's ship this!