Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of nested polygons with --update mode #398

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

rustprooflabs
Copy link
Owner

@rustprooflabs rustprooflabs commented Jul 31, 2024

Details

This PR addresses #397 reported by @jhon100, and other issues exposed by investigating that bug report.

Overview

Running --update append was missing the pre/post steps used by the --replication mode to avoid similar errors. The prep step is now handled in one place for both. The post step is handled in one place each due to differing code paths.

Tasks

  • --update append update shouldn't require --force
  • Overlapping regions cause FK error in nested table even with --skip-nested
  • Clean out nested data when --update append to avoid FK error when nested data previously loaded
  • 🚧 Improve documentation around --update mode
  • Test --replication to verify there wasn't a regression

@rustprooflabs rustprooflabs added bug Something isn't working documentation Improvements or additions to documentation labels Jul 31, 2024
@rustprooflabs rustprooflabs added this to the 1.0.3 milestone Jul 31, 2024
@rustprooflabs
Copy link
Owner Author

Commands used for testing for reference:

export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=mysecretpassword

docker stop pgosm && docker build -t rustprooflabs/pgosm-flex .

docker run --name pgosm -d --rm \
    -v ~/pgosm-data:/app/output \
    -v /etc/localtime:/etc/localtime:ro \
    -e POSTGRES_USER=$POSTGRES_USER \
    -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
    -p 5433:5432 -d rustprooflabs/pgosm-flex

docker exec -it \
    pgosm python3 docker/pgosm_flex.py \
    --ram=8 \
    --region=north-america/us \
    --subregion=district-of-columbia \
    --update create

docker exec -it \
    pgosm python3 docker/pgosm_flex.py \
    --ram=8 \
    --region=north-america/us \
    --subregion=maryland \
    --update append

@rustprooflabs rustprooflabs merged commit 0498f4b into dev Aug 6, 2024
1 check passed
@rustprooflabs rustprooflabs deleted the fix-397-update-append-errors branch August 6, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant