Skip to content

feat(io): add VectorExportTask for exporting vector features from EOPatches - #806

Open
Pranava-Kumar wants to merge 1 commit into
sentinel-hub:developfrom
Pranava-Kumar:feat/vector-export-task
Open

feat(io): add VectorExportTask for exporting vector features from EOPatches#806
Pranava-Kumar wants to merge 1 commit into
sentinel-hub:developfrom
Pranava-Kumar:feat/vector-export-task

Conversation

@Pranava-Kumar

Copy link
Copy Markdown

Summary

Add VectorExportTask to fill a clear API gap: VectorImportTask existed but there was no equivalent export task. This new task allows users to export vector features (VECTOR_TIMELESS, VECTOR) from EOPatches to standard vector file formats.

Changes

  • eolearn/io/geometry_io.py: Add VectorExportTask class + _write_geodataframe helper + _driver_to_extension utility
  • eolearn/io/__init__.py: Export VectorExportTask

Features

  • Export vector features from EOPatches (VECTOR_TIMELESS, VECTOR)
  • Multiple formats: GPKG (default), GeoJSON, Shapefile, and any other format supported by geopandas
  • Filesystem support: optionally write to non-local filesystems via PyFilesystem abstraction (handles pyogrio compat by writing to temp .gpkg first)
  • Round-trip compatible: exported files can be re-imported with VectorImportTask

Testing

All 5 new tests pass:

  • Export to GPKG
  • Export to GeoJSON
  • Empty feature error handling
  • GPKG round-trip (export → re-import → verify)
  • Task returns the same EOPatch instance (no copy)

Related

  • Analogous to ExportToTiffTask for raster features
  • Closes a long-standing API asymmetry

…atches

Add VectorExportTask that exports vector features (VECTOR_TIMELESS,
VECTOR) from EOPatches to common vector formats (GPKG, GeoJSON, etc.)
using geopandas.

Includes a _write_geodataframe helper that handles pyogrio compatibility
for filesystem-based writes and a _driver_to_extension utility.

Closes an API asymmetry: VectorImportTask existed but there was no
equivalent export task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant