API Docs¶
Main Functions¶
Parse a GeoJSON or KML AOI into a normalized FeatureCollection of Polygons.
Non-Polygon geometries are skipped with a UserWarning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db
|
str | Connection
|
Existing db connection, or connection string. |
required |
geojson_raw
|
str | bytes | dict
|
GeoJSON or KML file path, string or file bytes, or a GeoJSON dict. |
required |
merge
|
bool
|
Merge all Polygons into a single Polygon, without holes. Disjoint Polygons are joined by their convex hull. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
a FeatureCollection of Polygons. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input is invalid or contains no Polygons. |
Parse a GeoJSON or KML AOI into a normalized FeatureCollection of Polygons.
Non-Polygon geometries are skipped with a UserWarning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db
|
str | AsyncConnection
|
Existing db connection, or connection string. |
required |
geojson_raw
|
str | bytes | dict
|
GeoJSON or KML file path, string or file bytes, or a GeoJSON dict. |
required |
merge
|
bool
|
Merge all Polygons into a single Polygon, without holes. Disjoint Polygons are joined by their convex hull. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
FeatureCollection |
FeatureCollection
|
a FeatureCollection of Polygons. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input is invalid or contains no Polygons. |