GithubHelp home page GithubHelp logo

zuberspace / jimutmap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimut123/jimutmap

0.0 0.0 0.0 3.92 MB

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

Home Page: https://jimutmap.readthedocs.io/en/latest/

License: GNU General Public License v3.0

Python 100.00%

jimutmap's Introduction


...Bringing Data to Humans



๐Ÿ“‹ Contents

Note: I am actively looking for project maintainers who can volunteer to fix bugs/issues and work on TODOs, due to my limited time in maintaining this project. If you want to be a maintainer, either solve a bug or successfully complete a TODO, then email me for the role (this process is for selecting valid maintainers).

๐Ÿ” Purpose

This package collects data from satellites.pro. It fetches 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. There are some future plans for this project, check TODO to see what this will support in the future.

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 pip3 install jimutmap

# Install google chrome for chrome driver
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

# 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

Sorry, 5 -- threads unavailable, using maximum CPU threads : 4
Initializing jimutmap ... Please wait...
Sorry, 50 -- threads unavailable, using maximum CPU threads : 4
Initializing jimutmap ... Please wait...
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 20/20 [00:00<00:00, 113.67it/s]
Sorry, 50 -- threads unavailable, using maximum CPU threads : 4
Initializing jimutmap ... Please wait...
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 20/20 [00:00<00:00, 722.10it/s]
Total satellite images to be downloaded =  210
Total roads tiles to be downloaded =  210
Approx. estimated disk space required = 4.1015625 MB
Total number of satellite images needed to be downloaded =  210
Total number of satellite images needed to be downloaded =  210
Batch =============================================================================  1
===================================================================================
Sorry, 50 -- threads unavailable, using maximum CPU threads : 4
Downloading all the satellite tiles: 
Updating sanity db ...
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 27/27 [00:00<00:00, 13291.81it/s]
Total number of satellite images needed to be downloaded =  197
Total number of satellite images needed to be downloaded =  196
Downloading speed == 0.09333877563476563 MiB/s 
Waiting for 15 seconds... Busy downloading
Downloading speed == 0.11976458231608073 MiB/s 
Waiting for 15 seconds... Busy downloading
Downloading speed == 0.01717344919840495 MiB/s 
Waiting for 15 seconds... Busy downloading
Batch =============================================================================  2
===================================================================================
Downloading all the satellite tiles: 
Updating sanity db ...
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 420/420 [00:00<00:00, 99921.03it/s]
Total number of satellite images needed to be downloaded =  0
Total number of satellite images needed to be downloaded =  0
************************* Download Sucessful *************************
Cleaning up... hold on
Updating sticher db ...
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 420/420 [00:00<00:00, 24357.17it/s]
Total number of satellite images needed to be downloaded =  0
Total number of satellite images needed to be downloaded =  0
Calculating bounding boxes for tiles :: 
Total number of rows present in the database=  210
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 210/210 [00:00<00:00, 528693.78it/s]
Min lat tile = 390842, Max lat tile = 390855, Min lon tile = 228264, Max lon tile = 228278
No. of tiles in latitude = 13, and longitude = 14
Creating an image of size : 3328x3584 pixels ...
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 13/13 [00:00<00:00, 28.89it/s]
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 13/13 [00:00<00:00, 42.02it/s]
Temporary sqlite files to be deleted = ['temp_sanity.sqlite', 'sticher.sqlite'] ? 
(y/N) : y
Temporary chromedriver folders to be deleted = ['100'] ? 
(y/N) : y

[Back to Top]

๐Ÿ“š Some of the example images downloaded at different scales

[Back to Top]

๐Ÿ“š Stitched tiles for Kolkata

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

:feelsgood: 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 is created for educational and research purposes only! The authors are not liable for any damage to private property.

[Back to Top]

:atom: 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]

jimutmap's People

Contributors

jimut123 avatar tigerhawkvok avatar beingsoumyadeepsharma avatar dependabot[bot] avatar imgbotapp avatar soumith avatar sourav-raj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.