UP42’s Python SDK supports the following file formats:
- GeoJSON
- KML
- Shapefile
- WKT
Use the read_vector_file tool to upload your geometry from a vector file:
geometry = up42.read_vector_file("data/aoi_washington.geojson")
# An AOI as a polygonaoi = { "type": "Polygon", "coordinates": ( ( (13.375966, 52.515068), # Bottom-left corner (13.375966, 52.516639), # Bottom-right corner (13.378314, 52.516639), # Top-right corner (13.378314, 52.515068), # Top-left corner (13.375966, 52.515068), # Bottom-left corner ), ),}
# An AOI as a bounding boxbbox = [ 13.382853541948975, # Min longitude 52.512321097987126, # Min latitude 13.39586259650261, # Max longitude 52.5185756711692, # Max latitude]
# A POIpoi = { "type": "Point", "coordinates": ( ( (13.375966, 52.515068), ), ),}