Giter Club home page Giter Club logo

satellite_image_retrieval's Introduction

Satelite Image Retrieval

Retieve highest resolution aerial image of a given Latitude-Longitude bounding box using Bing Maps API


Dependencies

  1. Numpy
  2. OpenCv
  3. Python Requests

Directory Structure

\.
├── images
│   └── ref.png
├── README.md
└── request.py

Execution

  • Method 1 Convert the python script into executable and run it directly from the command line.
    $ chmod +x request.py
    $ ./request.py
    
    
  • Method 2 Run the file using Python
    $ python request.py 
    

Approach

  • The program expects a latitude-longitude bounding box for which the image is to be retrieved. The box is defined using two diagonally oppositte points.

  • Latitude and longitude values are converted to pixel values based on the highest level of detail (starting with 23) and this is followed by getting tile numbers for respective pixels.

  • Once we get the tiles for the corners, a loop iterates through all the intermediate tiles, generating quadkey for each and getting corresponding images.

  • If the image is blank, the loop breaks and restarts with a level of detail one lower than the previous one.

  • Once all the images are retrieved, they are stiched together to generate one single image.

  • The stitched image is then cropped to the bounding box using the pixel values obtained in the second step. The final image is displayed and is also saved in the current directory as output.png

    Blank image refers to the empty image returned by the request response. A simple element by element comparison is used to determine if the obtained image is blank or not.

Output

The output of the program is the aerial image of the given bounding box in the highest possible resolution.

Reflections

  • For large bounding boxes, the number of images is very large and the program completion time is very large. Solutions such as multi process threading may be useful.

satellite_image_retrieval's People

Contributors

kashugoyal avatar

Watchers

James Cloos 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.