Hello, in a Collect Earth project I would like to load the plot shapes from the CSV. The desired shapes are 40 ha projected hexagons with a square centroid of 1 ha. From a fusion table I download this line (below an example) that goes into the "geometry" column in the Grid file of the project: <polygon><outerboundaryis><linearring><coordinates>120.093914,-8.56532,0.0 120.092215,-8.562381,0.0 120.088809,-8.562381,0.0 120.087101,-8.56532,0.0 120.0888,-8.568258,0.0 120.092215,-8.568258,0.0 120.093914,-8.56532,0.0</coordinates></linearring></outerboundaryis><innerboundaryis><linearring><coordinates>120.090099,-8.565726,0.0 120.090916,-8.565726,0.0 120.090916,-8.564913,0.0 120.090099,-8.564913,0.0 120.090099,-8.565726,0.0</coordinates></linearring></innerboundaryis></polygon> This works in Google Earth, but in the auxiliary Bing maps and Google Earth Engine windows, only the outer shape is loaded, the square centroid is missing. This other trial <multigeometry><polygon><linearring><coordinates>120.093914,-8.56532,0.0 120.092215,-8.562381,0.0 120.088809,-8.562381,0.0 120.087101,-8.56532,0.0 120.0888,-8.568258,0.0 120.092215,-8.568258,0.0 120.093914,-8.56532,0.0</coordinates></linearring></polygon><polygon><linearring><coordinates>120.090099,-8.565726,0.0 120.090916,-8.565726,0.0 120.090916,-8.564913,0.0 120.090099,-8.564913,0.0 120.090099,-8.565726,0.0</coordinates></linearring></polygon></multigeometry> doesn't show the polygon in Google Earth either. How can I solve this? Valeria asked 07 Aug '18, 17:04 VContessa |
Dear Valeria, The problem is that the format that Collect Earth expects the polygons to be is inside a MultiGeometry. The KML geometry should look like this:
Also, in the eeCodeEditorScript.fmt file that you use in the survey you need to adapt it so that there is a piece of code that "paints" the polygons after the first one. So after the "processPlotInfo" method add these lines: // START -- SPECIAL CODE TO ADD SUBPLOTS var subPlot;
You can for instance use this file that already has the changes implemented : eeCodeEditorScript.fmt So. In your CSV file you will have instead a KML Multigeometry like this:
answered 08 Aug '18, 11:54 collectearth ♦ |
Thank you, now it works! Related to this, do you know if is there is perhaps a way to export directly from Google Earth Engine a CSV file with the coordinates written as a KML Multigeometry? To avoid going through exporting the KML, transforming it in a Fusion Table and getting the polygon values as a CSV file. Thanks, Valeria answered 08 Aug '18, 15:02 VContessa |