I'm prepping a data set and would like to download all images from Open Aerial Map that have a ground resolution of say greater than 5cm/pixel.

The web UI displays this data for each image: enter image description here

But I can't see a way to access it through the API (Note: Link to API docs from main site is currently broken): https://hotosm.github.io/oam-api/

I can access the metadata for any image, but can't find any kind of resolution data:

{"uuid":"http://oin-hotosm.s3.amazonaws.com/573a17d4cd0663bb003c32b6/0/575fcf142b67227a79b4fbfd.tif","title":"Carretera _ Puente Rio Chico","projection":"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]]","bbox":[-80.4248105,-0.9801461999990004,-80.418725308,-0.9748216999999999],"footprint":"POLYGON((-80.4248105 -0.9748216999999999,-80.418725308 -0.9748216999999999,-80.418725308 -0.9801461999990004,-80.4248105 -0.9801461999990004,-80.4248105 -0.9748216999999999))","gsd":1.8570457238770968e-7,"file_size":47649982,"acquisition_start":"2016-04-27T05:00:00.000Z","acquisition_end":"2016-04-28T17:00:03.000Z","platform":"uav","provider":"Santiago Pastor","contact":"fruizc,francisco.ruiz@engeotec.net","properties":{"sensor":"Unknow","thumbnail":"http://oin-hotosm.s3.amazonaws.com/573a17d4cd0663bb003c32b6/0/575fcf142b67227a79b4fbfd_thumb.png","tms":"http://tiles.openaerialmap.org/573a17d4cd0663bb003c32b6/0/575fcf142b67227a79b4fbfd/{z}/{x}/{y}.png","wmts":"http://tiles.openaerialmap.org/573a17d4cd0663bb003c32b6/0/575fcf142b67227a79b4fbfd/wmts"},"uploaded_at":"2016-05-16T00:00:00.000Z"}

How do I find image resolution data for Open Aerial Map images through the API?


TL;DR Web site resolution Resolution == Metadata GSM*

Full answer*: I did some hunting through the web site and API source and think I have it worked out.

First I got the metadata for a specific image. Easy-ish to do through the UI: 1. Copy the "TMS" URL for an image. 2. Replace the image IDs in a meta URL query and get the JSON.

eg: TMS URL: https://tiles.openaerialmap.org/5e40d48b56992d0006e589df/0/5e40d48b56992d0006e589e0/{z}/{x}/{y}

Metadata URL: http://oin-hotosm.s3.amazonaws.com/5e40d48b56992d0006e589df/0/5e40d48b56992d0006e589e0_meta.json

This is the src for the search result pane:


And from utils.js:

   * Coverts the given GSD to meters or centimeters
   * @param  float gsd in meters
   * @return string
  gsdToUnit: function(gsd) {
    var unit = "m";
    // If it's less than 1m, convert to cm so it displays more nicely
    if (gsd < 1) {
      unit = "cm";
      gsd *= 100;

    return Math.round(gsd) + " " + unit;

In above example metadata GSD = 0.0199991051357, and web UI displays 2cms which matches the function.

What tricked me up is a lot of images seem to have very small possibly invalid GSD values which probably need to be corrected by several orders of magnitude.

Bonus info: Can hit the metadata endpoint with GSD queries, eg:

| improve this answer | |
  • 1
    That value can also be found via an meta api call example api.openaerialmap.org/… – Mapperz Feb 10 at 19:13
  • Thanks! Wierdly some queries contain "resolution_in_meters" and some "gsd" fields – Geordie Feb 10 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.