omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
710 stars 156 forks source link

Let geojson files in mapping be specified relative to mapping files #233

Open pnorman opened 4 years ago

pnorman commented 4 years ago

Context

Right now when specifying a geojson file for geojson_intersects_feature it needs to be specified as an absolute path or relative to the imposm binary. This makes it difficult to distribute a mapping.yaml file with associated geojson in a way that doesn't depend on deployment-specific paths.

Expected Behavior

A relative path in a mapping file is relative to the mapping file.

Possible Fix

Change the current working directory before https://github.com/omniscale/imposm3/blob/3b6e6b38f4529ac468580040dff25a0b47a037c9/mapping/columns_intersection.go#L41