You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something has changed in the logic of the the latest release of planet (2.7) and it crashes the get_items method from planet.
to test:
planet_model=PlanetModel(planet_key)
aoi= { # Yasuni national park in Ecuador"type": "Polygon",
"coordinates": (
(
(-75.88994979858398, -1.442146588951299),
(-75.9041976928711, -1.4579343782400327),
(-75.88651657104492, -1.476982541739627),
(-75.85647583007812, -1.4534726228737347),
(-75.88994979858398, -1.442146588951299),
),
),
}
start="2020-11-18"end="2020-11-19"cloud_cover=0.5# Get the itemsitems=planet_model.get_items(aoi, start, end, cloud_cover)
items=hide_key(items, planet_key) # hide the key in the produced file
File [~/.local/lib/python3.10/site-packages/planet/geojson.py:135](http://localhost:8888/home/dguerrero/.local/lib/python3.10/site-packages/planet/geojson.py#line=134), in geom_from_geojson(data)133features=data['features']
134exceptKeyError:
-->135raiseGeoJSONError(f'Invalid GeoJSON: {data}')
137iflen(features) >1:
138raiseGeoJSONError(
139'FeatureCollection has multiple features. Only one feature'140' can be used to get geometry.')
GeoJSONError: InvalidGeoJSON: {'type': 'AndFilter', 'config': [{'type': 'GeometryFilter', 'field_name': 'geometry', 'config': {'type': 'Polygon', 'coordinates': (((-75.88994979858398, -1.442146588951299), (-75.9041976928711, -1.4579343782400327), (-75.88651657104492, -1.476982541739627), (-75.85647583007812, -1.4534726228737347), (-75.88994979858398, -1.442146588951299)),)}}, {'type': 'RangeFilter', 'field_name': 'cloud_cover', 'config': {'lte': 0.5}}, {'type': 'DateRangeFilter', 'field_name': 'acquired', 'config': {'gt': '2020-11-18T00:00:00Z'}}, {'type': 'DateRangeFilter', 'field_name': 'acquired', 'config': {'lt': '2020-11-19T00:00:00Z'}}]}
The text was updated successfully, but these errors were encountered:
Something has changed in the logic of the the latest release of planet (2.7) and it crashes the
get_items
method from planet.to test:
The text was updated successfully, but these errors were encountered: