TransWikia.com

Google Earth Coordinates to Google Earth Engine

Geographic Information Systems Asked by Martí Prat i Esquerdo on October 4, 2021

I am trying to define a polygon in GEE from a set of points I have defined in Google Earth Pro.
I have converted the Google Earth given coordinates as follows: [24°27’41.42"N], [36°23’20.51"E] = [24.461506, 36.389031], but when plotting the polygon in GEE i can’t seem to obtain the same shape nor centering.
The code in GEE:

    ee.Geometry.Polygon(
        [[[24.461506, 36.389031],
          [16.445217, 40.374192],
          [11.210819, 44.119544],
          [16.188453, 54.824286],
          [20.058042, 60.245078],
          [24.364033, 59.358711],
          [27.331878, 56.753617],
          [27.096642, 51.463783],
          [30.724233, 48.432361]]], null, false);

// Create a planar polygon.
var planarPolygon = ee.Geometry(polygon, null, false);

// Display the polygons by adding them to the map.
Map.centerObject(polygon);
Map.addLayer(polygon, {color: 'FF0000'}, 'geodesic polygon');
Map.addLayer(planarPolygon, {color: '000000'}, 'planar polygon');

What is my mistake?

One Answer

You have your coordinates in the wrong order for Earth Engine. The appropriate order is [East-Coordinate, North-Coordinate].

So it should work by just switching the order of your coordinates.

Correct answer by JonasV on October 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP