-1

I have a very large JavaScript feature collection (I think - will post a snippet below) and I want to display the vectors in Earth Engine with their attributes.

var lots = {
    "type": "FeatureCollection",
    "features": [{
        "id": "PlanId",
        "type": "Feature",
        "geometry": {
            "type": "Polygon",
            "coordinates": [[[152.6224, -30.0293], [152.6224, -30.0294], [152.6223, -30.0294], [152.6222, -30.0294], [152.6221, -30.0294], [152.6221, -30.0293], [152.622, -30.0292], [152.6219, -30.0292], [152.6218, ............- 30.0248]]]
        },
        "properties": {
            "PlanId": "777777777777777",
            "PlanName": "2023",
            "PlanStatusName":
            "Planning" }
    }, {
        "id": "PlanId",
        "type": "Feature",
        "geometry": {
            "type": "Polygon",
            "coordinates": [[[152.6858, -31.5103], [152.6857, -31.5103], [152.6856, -31.5103], [152.6855, -31.5103], [152.6854, -31.5103], [152.6853, -31.5105]
        ........... etc.1.5103], [152.6854, -31.5103], [152.6853, -31.5105]........ etc.

How can I take this script and convert it into something the Google Earth Engine JavaScript API will produce polygons with?

1
  • 1
    Please use a JSON pretty-printer to legibly format your content.
    – Vince
    Commented Sep 20, 2023 at 11:37

1 Answer 1

1

You simply do:

var fc = ee.FeatureCollection(lots)

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.