Hello Everyone.
I am new to geometry and have a question about the sample code (GeoAI_cropland_mapping_starter_notebook.ipynb).
In the code to get band data from the Earth Engine in the 7th cell, Lat/Lon is reversed as follows.
def extract_mean_pixel_values(row):
lon = row['Lat'] # here
lat = row['Lon'] # here
# Create a point geometry for the labeled location
point = ee.Geometry.Point(lon, lat)
Is there any intention behind this? (e.g., compliance with Earth Engine specs, etc...)
Hi, Thanks for the question. This sounds odd. Original sample code provided was
"""
def extract_mean_pixel_values(row):
lon = row['longitude']
lat = row['latitude']
# Create a point geometry for the labeled location
point = ee.Geometry.Point(lon, lat)
"""
Anyway, the above is correct. Please note that EE requires longitude firts when defining a point geometry
Thank you for your response.
It is strange. I joined it in September, the Notebook I downloaded from [Data] was as you see. (The column names in 'Train.csv' were also abbreviated as 'Lat', 'Lon').
Anyway, I can do it if I follow your answer. Thanks!