1

From the point

long: 16.499050771335575, lat: -30.882

I want to find the corresponding latitude and longitude values that would result in a 200 km by 200 km square in which the aforementioned point would be the bottom left (southwest) corner of the square.

I stumbled upon Understanding terms in Length of Degree formula? that gave the corresponding formulas. So I used this to come up with the points of my square:

16.499050771335575,-29.07796275949132

18.584367695114103,-29.07796275949132

18.584367695114103,-30.882

16.499050771335575,-30.882

However, when using the following code to download the corresponding image from the Modis NDVI 1km data set through Google Earth Engine, I got a 233 by 201 image.

path = img.getDownloadUrl({
    'scale': 1000,
    'bands': [{'id':'NDVI'}],
    'region': '[[16.499050771335575,-29.07796275949132],[18.584367695114103,-29.07796275949132],[18.584367695114103,-30.882],[16.499050771335575,-30.882],[16.499050771335575,-29.07796275949132]]'
})

I have double checked that the distances between the four points are indeed ~200 km.

I don't understand why the code is producing a 233 by 201 km image instead of the expected 200 by 200 km image?

Furthermore, when I moved the latitude up to the equator, I got an image returned by Google Earth engine that was 201 by 203, even though the distances between the points was ~200 (plus minus 1).

Update: After further investigation I've noticed that the distance between two neighboring pixels of the same latitude is 858 meters and not 1000 meters. This is odd, as I specified in the code the spatial resolution of 1000 meters.

  • 2
    The distance between two pixels along the same latitude is supposed to vary, with a maximum at the equator and zero at the poles. It is not possible to specify a geographic coordinate system and have fixed width pixels. – Vince Sep 7 '18 at 11:35
  • @Vince Ah. I see. Is there anyway I can calculate the size of these pixels given a specific latitude? – Rehaan Ahmad Sep 9 '18 at 0:56
  • Yes, of course you can, but I don't know how with your software. – Vince Sep 9 '18 at 1:32
  • I have found the formula, cos(lat) is the width of the pixel in km. – Rehaan Ahmad Sep 9 '18 at 2:33
  • For a sphere, yes, but not an oblate spheroid. – Vince Sep 9 '18 at 2:39

Your Answer

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

Browse other questions tagged or ask your own question.