Skip to content

Commit

Permalink
Switch to flex output
Browse files Browse the repository at this point in the history
This commit does the actual switch to the new flex config. It removes
the old config files and updates the documentation and various scripts.
  • Loading branch information
joto committed Jun 16, 2024
1 parent 1a5990a commit e3f5f2c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 498 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: sudo -i -u postgres createuser -s $USER && createdb -E utf8 gis && psql -Xq -d gis -c "CREATE EXTENSION postgis; CREATE EXTENSION hstore;"
- name: Import empty file
run: |
osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis -r xml <(echo '<osm version="0.6"/>')
osm2pgsql -O flex -S openstreetmap-carto-flex.lua -d gis -r xml <(echo '<osm version="0.6"/>')
- name: Create indexes
run: psql -1Xq -v ON_ERROR_STOP=1 -d gis -f indexes.sql
- name: Load empty shapefiles
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.import
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
osm2pgsql gdal-bin python3-psycopg2 python3-yaml unzip \
python3-requests postgresql-client && rm -rf /var/lib/apt/lists/*

ADD openstreetmap-carto.style /
ADD openstreetmap-carto-flex.lua /

RUN mkdir -p /openstreetmap-carto
WORKDIR /openstreetmap-carto
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ psql -d gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;'
Then, grab some OSM data; It's probably easiest to grab an PBF of OSM data from [Geofabrik](https://download.geofabrik.de/). Once you've done that, import with osm2pgsql:

```sh
osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis ~/path/to/data.osm.pbf
osm2pgsql -O flex -S openstreetmap-carto-flex.lua -d gis ~/path/to/data.osm.pbf
```

You can find a more detailed guide to setting up a database and loading data with osm2pgsql at [switch2osm.org](https://switch2osm.org/serving-tiles/manually-building-a-tile-server-16-04-2-lts/).
Expand Down
Loading

0 comments on commit e3f5f2c

Please sign in to comment.