vibespatial.io.file¶
Classes¶
Functions¶
|
|
|
|
|
|
|
Read a vector file into a GeoDataFrame. |
|
|
Module Contents¶
- class vibespatial.io.file.VectorFilePlan¶
- format: vibespatial.io.support.IOFormat¶
- operation: vibespatial.io.support.IOOperation¶
- selected_path: vibespatial.io.support.IOPathKind¶
- driver: str¶
- implementation: str¶
- reason: str¶
- class vibespatial.io.file.ShapefileIngestPlan¶
- implementation: str¶
- selected_strategy: str¶
- uses_pyogrio_container: bool¶
- uses_arrow_batch: bool¶
- uses_native_wkb_decode: bool¶
- reason: str¶
- class vibespatial.io.file.ShapefileOwnedBatch¶
-
- attributes_table: object¶
- metadata: dict[str, object]¶
- class vibespatial.io.file.ShapefileIngestBenchmark¶
- implementation: str¶
- geometry_type: str¶
- rows: int¶
- elapsed_seconds: float¶
- rows_per_second: float¶
- vibespatial.io.file.plan_shapefile_ingest(*, prefer: str = 'arrow-wkb') ShapefileIngestPlan¶
- vibespatial.io.file.read_shapefile_owned(source: str | pathlib.Path, *, bbox=None, columns=None, rows=None, **kwargs) ShapefileOwnedBatch¶
- vibespatial.io.file.plan_vector_file_io(filename, *, operation: vibespatial.io.support.IOOperation | str, driver: str | None = None) VectorFilePlan¶
- vibespatial.io.file.read_vector_file(filename, bbox=None, mask=None, columns=None, rows=None, engine=None, **kwargs)¶
Read a vector file into a GeoDataFrame.
Supports Shapefile, GeoPackage, GeoJSON, and any format readable by pyogrio/fiona. For GeoJSON and Shapefile inputs the reader attempts a GPU-accelerated owned path first; other formats fall back to pyogrio.
Aliased as
vibespatial.read_file().Parameters¶
- filenamestr or Path
Path to the vector file.
- bboxtuple of (minx, miny, maxx, maxy), optional
Spatial filter bounding box.
- maskGeometry or GeoDataFrame, optional
Spatial filter mask geometry.
- columnslist of str, optional
Subset of columns to read.
- rowsint or slice, optional
Subset of rows to read.
- enginestr, optional
Force a specific I/O engine (
"pyogrio"or"fiona").- **kwargs
Passed through to the underlying engine.
Returns¶
GeoDataFrame
- vibespatial.io.file.write_vector_file(df, filename, driver=None, schema=None, index=None, **kwargs)¶
- vibespatial.io.file.benchmark_shapefile_ingest(*, geometry_type: str = 'point', rows: int = 100000, repeat: int = 5, seed: int = 0) list[ShapefileIngestBenchmark]¶