Skip to content

Update from task 7164cb1f-2349-465a-8217-35a326681d96#4

Open
tronpis wants to merge 3 commits into
ampliación-de-overture-maps-y-optimización-de-elevación-bd5e9from
elevationprovider-selection-bugs-81d96
Open

Update from task 7164cb1f-2349-465a-8217-35a326681d96#4
tronpis wants to merge 3 commits into
ampliación-de-overture-maps-y-optimización-de-elevación-bd5e9from
elevationprovider-selection-bugs-81d96

Conversation

@tronpis
Copy link
Copy Markdown
Owner

@tronpis tronpis commented May 2, 2026

This PR was created by qwen-chat coder for task 7164cb1f-2349-465a-8217-35a326681d96.

- Update src/elevation/selector.rs to handle global providers correctly and fix test assertion for Copernicus selection
- Modify src/elevation/selector.rs to properly include CopernicusDem30 in provider selection when no regional matches exist
- Fix src/overture.rs by adding missing scale parameter to process_partition_file_by_collection function
- Correct src/overture.rs to replace nonexistent CoordTransformer::identity() and LLBBox::new_unchecked() APIs with valid constructor calls
- Update .gitignore to simplify ignored file patterns
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

Copy link
Copy Markdown

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR replaces unsafe LLBBox::new_unchecked() calls with safe LLBBox::new() validation in four locations, properly handling errors with .ok()? pattern. The safety improvements in src/overture.rs correctly validate coordinate bounds before bbox construction.

The .gitignore simplification removes many useful patterns that prevent accidental commits of build artifacts, IDE files, and system files. While this doesn't block compilation, it increases the risk of repository pollution.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Comment thread .gitignore
Comment on lines -2 to -3
# Compiled and build artifacts
*.pyc
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Configuration Risk: Removing essential .gitignore entries allows build artifacts, IDE files, system files, and logs to be accidentally committed to the repository.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .gitignore file and replaces unchecked bounding box creation with validated creation in src/overture.rs. The .gitignore changes incorrectly include markdown delimiters and remove many necessary ignore patterns. In src/overture.rs, the new LLBBox validation logic is redundantly executed inside closures for every feature (buildings, roads, water, and landuse), which should be moved outside the closures to improve performance.

Comment thread .gitignore Outdated
Comment on lines 1 to 4
```
# Compiled and build artifacts
*.pyc
__pycache__/
*.o
*.obj
*.exe
*.dll
*.so
*.a
*.out
dist/
build/
target/

# Dependencies
.venv/
venv/
node_modules/
.mypy_cache/
.pytest_cache/
.gradle/

# Logs and temp files
*.log
*.tmp
*.swp
*.swo

# Environment
.env
.env.local
.env.*

# Editors
.vscode/
.idea/

# System files
.DS_Store
Thumbs.db

# Coverage
coverage/
htmlcov/
.coverage

# Compressed files
*.zip
*.gz
*.tar
*.tgz
*.bz2
*.xz
*.7z
*.rar
*.zst
*.lz4
*.lzh
*.cab
*.arj
*.rpm
*.deb
*.Z
*.lz
*.lzo
*.tar.gz
*.tar.bz2
*.tar.xz
*.tar.zst
**/*.rs.bk
``` No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The .gitignore file contains markdown code block delimiters (```), which is incorrect for a configuration file. Furthermore, this change deletes a large number of essential ignore patterns for build artifacts, dependencies, and IDE settings. These should be restored to maintain project hygiene.

target/
**/*.rs.bk

Comment thread src/overture.rs Outdated
return None;
}
building_to_processed_way(&b, coord_transformer, &LLBBox::new_unchecked(target_min_lat, target_min_lng, target_max_lat, target_max_lng))
let bbox = LLBBox::new(target_min_lat, target_min_lng, target_max_lat, target_max_lng).ok()?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The LLBBox is being reconstructed and validated for every single building in the collection (up to 100,000 iterations). Since the bounding box coordinates are constant for the entire row group, this instance should be created once outside the filter_map closure to improve performance.

Comment thread src/overture.rs Outdated
return None;
}
road_to_processed_way(&r, coord_transformer, &LLBBox::new_unchecked(target_min_lat, target_min_lng, target_max_lat, target_max_lng))
let bbox = LLBBox::new(target_min_lat, target_min_lng, target_max_lat, target_max_lng).ok()?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The LLBBox is being reconstructed for every road feature. This should be moved outside the filter_map closure to avoid redundant calculations.

Comment thread src/overture.rs Outdated
return None;
}
water_to_processed_way(&w, coord_transformer, &LLBBox::new_unchecked(target_min_lat, target_min_lng, target_max_lat, target_max_lng))
let bbox = LLBBox::new(target_min_lat, target_min_lng, target_max_lat, target_max_lng).ok()?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The LLBBox is being reconstructed for every water feature. This should be moved outside the filter_map closure to avoid redundant calculations.

Comment thread src/overture.rs Outdated
return None;
}
landuse_to_processed_way(&l, coord_transformer, &LLBBox::new_unchecked(target_min_lat, target_min_lng, target_max_lat, target_max_lng))
let bbox = LLBBox::new(target_min_lat, target_min_lng, target_max_lat, target_max_lng).ok()?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The LLBBox is being reconstructed for every land use feature. This should be moved outside the filter_map closure to avoid redundant calculations.

tronpis added 2 commits May 11, 2026 14:54
…lbbox-validation

Support multiple Copernicus TIFF sample formats, reuse bbox in Overture parsing, and expand .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants