Skip to content

Enhance Map Tile Downloader with Multi-Zoom Support, Parallel Downloads and API Key Management #1

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Track07-cda
Copy link

Overview

This PR enhances the map tile downloader with multiple improvements focused on performance, reliability, and usability. It introduces multi-zoom level support, parallel downloading capabilities, and better API key management.

Key Changes

Performance Improvements

  • Implemented parallel downloading using ThreadPoolExecutor for significantly faster downloads
  • Added support for downloading multiple zoom levels in a single operation
  • Optimised tile boundary calculations for accurate coverage

Reliability Features

  • Added automatic retry mechanism for failed downloads (up to 3 times)
  • Improved error handling and resilience against API failures
  • Fixed tile boundary calculation by adding +1 to stop_x and stop_y coordinates
  • Added coordinate validation to ensure proper ordering

Usability Enhancements

  • Added environment variable support for Baidu API key management
  • Implemented progress tracking with failed download counts
  • Enhanced progress reporting during downloads

Documentation

  • Updated README with setup instructions and usage examples
  • Added better code comments throughout
  • Created requirements.txt file for dependencies

…lity features

- Added support for downloading multiple zoom levels in a single run
- Implemented automatic retry mechanism for failed downloads (up to 3 times)
- Added progress tracking with failed download counts
- Introduced parallel downloading using threads
- Improved error handling and resilience against API failures
- Enhanced documentation with better code comments and updated README
- Fix tile boundary calculation by adding +1 to stop_x and stop_y
- Add coordinate validation to ensure proper ordering
- Add environment variable support for Baidu API key
- Add multithreading with ThreadPoolExecutor for faster downloads
- Add progress reporting during downloads
- Update README with setup instructions
- Add requirements.txt file for dependencies
- Modified `download_tiles` method to handle vector tile downloads by adding a `vector` parameter, which is mutually exclusive with the satellite mode.
- Updated URL construction in `download_tile` to distinguish between vector and raster tile requests.
- Adjusted log messages to include mode information (Vector, Satellite, or Road map).
- Changed default number of threads to 8 for improved performance.
- Updated `.gitignore` to include `.7z` files and added `.gitkeep` to the vector directory.
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.

1 participant