Skip to content

API to get enormous amount of high resolution satellite images from apple / google maps quickly through multi-threading! create map your own map dataset. Bringing data to Humans.

License

Notifications You must be signed in to change notification settings

Akashchatterj/jimutmap

 
 

Repository files navigation

...Bringing Data to Humans


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.

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.

Installation and Usages

sudo pip3 install jimutmap

Needs to have google chrome web browser in the system.

>>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

Some of the example images downloaded at different scales

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.

Sample of the images downloaded

img of sat dat

📁 Download the whole dataset

Perks

Well I'm not that bad. This is done through parallel proccessing, so this will take all the thread in your CPU, change the code to your own requirements! This is done so that you could download about 40K images in 30 mins! (That's too fast!!!)

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!

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.

📓 TODOs

Please check TODOs, since this project needs collaborators.

Questions or want to discuss about something ?

Submit an issue.

💻 Contribution

Please see Contributing.md

 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.

BibTeX and citations

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

About

API to get enormous amount of high resolution satellite images from apple / google maps quickly through multi-threading! create map your own map dataset. Bringing data to Humans.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%