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

Add Make step to test initial --append call with --input-file #271

Closed rustprooflabs closed 2 years ago

rustprooflabs commented 2 years ago

Closes #265, in response to #264.

I verified this additional test run catches the issue if I revert the change in #264.

<truncated output>
Post-processing road_major

2022-11-25 08:11:35,839:INFO:pgosm-flex:pgosm_flex:Skipping calculating nested polygons
Traceback (most recent call last):
  File "/app/docker/pgosm_flex.py", line 538, in <module>
    run_pgosm_flex()
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/app/docker/pgosm_flex.py", line 111, in run_pgosm_flex
    success = run_osm2pgsql_standard(input_file=input_file,
  File "/app/docker/pgosm_flex.py", line 178, in run_osm2pgsql_standard
    pbf_filename=pbf_filename)
UnboundLocalError: local variable 'pbf_filename' referenced before assignment
make: *** [Makefile:113: docker-exec-append-w-input-file] Error 1
rustprooflabs commented 2 years ago

Bonus: Switched layerset to minimal (from default) on steps that are only testing functional abilities of the in-Docker processing, and not the data itself. This change makes the full make process to run 38% faster (knocked off 57 seconds).

Before this change:

real    2m27.436s

After

real    1m30.863s