0

I have a bunch of satellite photos downloaded from Google Maps by a third party. The data looks like down below, where each row is a photo. I also have the resolution of each pic.

photo_id zoom center_lat center_lon
1 20 48.871998764001 8.642190889688
2 18 49.4295354 10.9601192
3 18 49.4295354 10.9601192
4 18 58.426932941296 22.657546623349

I wonder if - with this data - I can retrieve the bounding box of each photo -- which I need to retrieve OpenStreetMaps data of the buildings in each picture.

Can I use the center coordinates and the zoom level to retrieve an approximate bounding box?

2
  • please see gis.stackexchange.com/a/49813/276
    – Mapperz
    Commented Feb 7, 2022 at 15:45
  • thank you! I guess I saw that wandering around gis.stackexchange, but from what I understood the user needed to do the opposite: I do not have the bounds, I need to retrieve them. Guess I should edit the question to make this clear, sorry for that.
    – baggiponte
    Commented Feb 7, 2022 at 19:13

1 Answer 1

0

To get the bounding box, you need to obtain the coordinates of left/right, bottom/top limits.

Google Map uses the Mercator projection, so you need to find the coordinates in this system with a unit of meter first. https://en.wikipedia.org/wiki/Web_Mercator_projection

To do so, I suggest you can try to convert the existing center location to this projection first. Next, you can use the zoom level to calculate the pixel resolution, i.e., how many meters does one pixel represent. Some example is here: http://idlcoyote.com/idldoc/cg/cggoogle_metersperpixel.html

Once you have the above information, you can calculate the bounding box coordinates in meters using the image size, pixel resolution, and center location.

Last, you can convert the coordinates back to lat/lon-based WGS 84 system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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