rustprooflabs / pgosm-flex

PgOSM Flex provides high quality OpenStreetMap datasets in PostGIS (Postgres) using the osm2pgsql Flex output.
MIT License
101 stars 20 forks source link

Fix using `--append` with input file #264

Closed petrell9 closed 2 years ago

petrell9 commented 2 years ago

Hi there,

First of all, thanks for the awesome project. I watched your talk on PostGIS + OSM and followed it to here. This whole process makes it really easy to work with the large amounts of data OSM provides.

I was playing around with the docker scripts and I noticed running --append with --input would lead to an error here because pbf_filename was unassigned. I know append is experimental, so I'm not sure if this has unintentional side-effects but I thought I would submit this PR anyway.

I tried to run the tests Makefile as suggested but I kept getting permission denied/file not found errors for the downloaded region file. Not sure if you know what may be the issue here?

image

In any case, let me know if I can be of any more assistance. Cheers

rustprooflabs commented 2 years ago

@petrell9 Thank you for your feedback and the PR! It's great to know it's a helpful tool for you.

This looks good and doesn't seem to have any unintended consequences. I'll merge it to dev, in a few days it should make it to main and the :latest Docker image.

Did you modify the Makefile when you got that error? That message seems unexpected, it's probably best to open an issue for that and we can figure out what's the cause. The part that's unexpected is seeing the /home/... path. In the Docker image it should be using /app/.... I think!

The --append feature is still marked experimental, that'll probably change sometime in the not so distant future. I've been using it in dev for a while with no issues. It needs a bit more testing but I'm getting close to upgrading my prod databases to use --append.

rustprooflabs commented 2 years ago

This is pushed to Docker hub tagged as :dev.

docker pull rustprooflabs/pgosm-flex:dev