1

I'm currently trying to find a way to extract site location data from Google Earth Engine for several MODIS products in its original projection (sinusoidal). Yet I have not managed to receive the exact pixel values as provided from MODIS itself.

So far I have used the commands like this.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

def _data_extract(site_id, sensor, lon, lat, radius, product, bands, res, start, end):

    geometry = ee.Geometry.Point(lon, lat).buffer(radius)

    col = ee.ImageCollection(product).\
                    filterDate(start, end);


projection = col.first().pixelLonLat().projection()

data2 = col.getRegion(geometry, int(res), projection.crs()).getInfo()

df2 = pd.DataFrame.from_records(data2[1:])

1 Answer 1

2

I think you just want:

df2 = pd.DataFrame(data2, columns = data2[0])

See this blog post for more info: https://mygeoblog.com/2017/01/13/your-gee-data-in-pandas/

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.