Geometry handling

Learn how to correctly provide geometries while creating orders with the SDK.


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:

Python
geometry = up42.read_vector_file("data/aoi_washington.geojson")
Python
# An AOI as a polygon
aoi = {
"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 box
bbox = [
13.382853541948975, # Min longitude
52.512321097987126, # Min latitude
13.39586259650261, # Max longitude
52.5185756711692, # Max latitude
]
# A POI
poi = {
"type": "Point",
"coordinates": (
(
(13.375966, 52.515068),
),
),
}

Last updated: