[GIS] How to calculate degrees per pixel in a given image? Or .nth of degree

geolocationgoogle mapsimage

I am trying to make very rough estimates of Lat/Long coordinates in some random parking lot images. If I visit any such random parking lot on a Google map, I can click some driving area and Google gives me a location. For example.

Here is a parking lot image from Florida. (Hosted on wikimedia commons.)
Big Lots Lot

The image is 1280 pixel width and I can find some pretty close coordinates for the corners of the building on the google map. Here is the corresponding map view served up at Google.

Geolocated building

The left side of the Big Lots is very close to 30.180806, -82.670137. And the right side of the store is very close to 30.180752, -82.669594

So there is a LAT difference of 0.000054 and a LONG difference of 0.000543.

Let's say I measure the pixels of the Big Lots CarPark in the image and find it uses 800 pixels. With that, I can approximate the width of each pixel.

0.000543 / 800 = 0.000000679 per pixel.

My First Question (not so important) is: what is that 0.000000679 measurement called? (One 0.000000679 th of a degree per pixel?)

Anyway, to the real question.

If I have some other image, for which I cannot reliably find the location on map or GIS, how can I make a similar estimate, given close guess of the the locations LAT and LONG?

Example:

Here is another parking lot image for which I cannot know the exact location. I can make a guess that the store front is something like 100 feet wide, by counting the parking spaces. I might even guess the image is 120 feet wide, just for the sake of making calculations.
Random storefront

Then let's say I assign an arbitrary LAT / LONG to the pixel at the left side of the image, at ground level with the building foundation.

LAT 34.065154
LONG -118.468884

Note: I am also arbitrarily assuming the camera is facing directly north.

I can find on the internet that at this latitude, there are 363922 feet in a degree of longitude.

So, how can I calculate the 0.0000XXX per pixel?

I am given:

rough estimate of ground distance, 120 feet
estimated 363922 feet per degree latitude
left most pixel location:  34.065154, -118.468884
image pixel width 1280

I should be able to estimate the LAT / LONG on the other side of the image right?

Here is my uneducated guess:

120 feet / 1280 pixels = 0.09375 ft/pixel
0.09375 ft/pixel / 363922 ft/deg/lat = 0.000000258 nth degree per pixel?

If so, do I calculate the right side of the image like this?

-118.468884 + (0.000000258 * 1280) =
-118.468884 + 0.000329741 =
-118.468554259

LAT  34.065154
LONG -118.468554

Is the same working for the latitude if I estimate the distance to the camera by counting the cars for instance?

Best Answer

After testing the math against the known location parking lot image, I am pretty sure my guess is correct.

I found distances between the type of lot in the map image vary in some parking lot code specifications that I located on Google.

In a two-way traffic direction, with 60 degree parking stalls, requirements vary from 55 to 62 feet between the long parallel lines.

Based on the left building edge next to the pizza place, and the appearance of a van on the right (at the edge of the parking lot) I counted 5 two-way traffic lanes.

Using 55 feet between them made a reasonably close result. Starting guess of left side longitude:

Starting guess of left side longitude

Doing the math:

330 estimated image width in feet
------------------------------------  = 0.2578125 feet per pixel 
1280 image width in pixels 

AND SO:

0.2578125 feet_per_pixel 
------------------------------------  = 0.00000071 decimal degree per pixel 
363699 feet_per_degree_of_longitude

Using the values calculated above:

-82.670329 + (0.00000071 * 1280) =
-82.670329 + 0.0009088 = 
-82.669420

         LAT        LON    
Left  30.180805, -82.670329
Right 30.180805, -82.669420

And here is the map location using my end result.

calculated result displayed in google maps

I think it is close enough for my project.

In case it ever comes up again, here are the equations.

                              ~                             ~
                             | estimated image width in feet |
                             |-------------------------------|
decimal degree per pixel =   |     image width in pixels     |
                              ~                             ~
                           -------------------------------------   
                                feet_per_degree_of_longitude


                              ~                                                             ~
                             |  ~                                 ~                          |
                             | |  ~                             ~  |                         |
                             | | | estimated image width in feet | |                         |
                             | | |-------------------------------| |                         |
image right side longitude = | | |     image width in pixels     | | * image width in pixels | + image left side longitude 
                             | |  ~                             ~  |                         |
                             | |-----------------------------------|                         |  
                             | |    feet_per_degree_of_longitude   |                         |
                             |  ~                                 ~                          |
                              ~                                                             ~