Skip to main content

To get enormous amount of Apple Maps tile with ease

Project description


...Bringing Data to Humans



Contents

Purpose

This manually brute forces apple-map. It Then scraps all the tiles (image and road mask pair) as given by the parameters provided by the user. This uses an API-key generated at the time of browsing the map.

The api accessKey token is automatically fetched if you have Google Chrome or Chromium installed using chromedriver-autoinstaller. Otherwise, you'll have to fetch it manually and set the ac_key parameter (which can be found out by selecting one tile from Apple Map, through chrome/firefox by going Developer->Network, looking at the assets, and finding the part of the link beginning with &accessKey= until the next &) every 10-15 mins.

[Back to Top]

Need for scraping satellite data

Well it's good (best in the world) satellite images, we just need to give the coordinates (Lat,Lon, and zoom) to get your dataset of high resolution satellite images! Create your own dataset and apply ML algorithms :')

The scraping API is present, call it and download it.

[Back to Top]

Installation and Usages

sudo pip install jimutmap
sudo pip install -r requirements.txt
# optional for viewing the temporary files generated by internal databases
sudo apt-get install sqlite sqlitebrowser

Needs to have google chrome web browser in the system.

For example usage, check test.py

>>from jimutmap import api

>>download_obj = api(min_lat_deg = 10,
                      max_lat_deg = 10.2,
                      min_lon_deg = 10,
                      max_lon_deg = 11,
                      zoom = 19,
                      verbose = False,
                      threads_ = 5, 
                      container_dir = "myOutputFolder")

# If you don't have Chrome and can't take advantage of the auto access key fetch, set
# a.ac_key = ACCESS_KEY_STRING
# here

>>download_obj.download(getMasks = True)

100%|██████████████████████████████████████████████████████████████                     | 1000/10000000 [00:02<00:00, 3913.19it/s

[Back to Top]

Some of the example images downloaded at different scales

[Back to Top]

YouTube video

If you are confused with the documentation, please see this video, to see the scraping in action Apple Maps API to get enormous amount of satellite data for free using Python3.

[Back to Top]

Sample of the images downloaded

img of sat dat

[Back to Top]

Perks

This is done through parallel proccessing, so this will take maximum threads available in your CPU, change the code to your own requirements!

If you want to re-fetch tiles, remember to delete/move tiles after every fetch request done! Else you won't get the updated information (tiles) of satellite data after that tile. It is calculated automatically so that all the progress remains saved!

[Back to Top]

Additional Note

This also uses multithreading, which may overload your computer, so set the parameters in the API, minimise the pool else your PC may hang! This is created for educational and research purposes only! The authors are not liable for any damage to private property.

[Back to Top]

TODOs

Please check TODOs, since this project needs collaborators.

[Back to Top]

Questions or want to discuss about something ?

Submit an issue.

[Back to Top]

Contribution

Please see Contributing.md

[Back to Top]

LICENSE

 GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2019-20 Jimut Bahan Pal, <https://jimut123.github.io/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[Back to Top]

BibTeX and citations

@misc{jimutmap_2019,
  author = {Jimut Bahan Pal},
  title = {jimutmap},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Jimut123/jimutmap}}
}

[Back to Top]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jimutmap-1.4.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jimutmap-1.4.0-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file jimutmap-1.4.0.tar.gz.

File metadata

  • Download URL: jimutmap-1.4.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for jimutmap-1.4.0.tar.gz
Algorithm Hash digest
SHA256 1c77bc2725b9557bb4143b1d58695066daecb64b769097d49efc93391ad30c9a
MD5 a1f0ce18ad0fdb78641beca7b3cdb40d
BLAKE2b-256 2027e2a56a56cd0590e556596c5ab087fe13787dddb463941dd262912190dd6b

See more details on using hashes here.

File details

Details for the file jimutmap-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: jimutmap-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for jimutmap-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3aaa3d31171b1129f525b63b0ce6786406d879b413eac0cc166c003e04d3f033
MD5 431d60ce3ddc56f45665abd90a137088
BLAKE2b-256 533c7fe2810ab25115033daf6982546f617aac4dff462a667927b4b139d78188

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page