No, Pyogrio does not support incremental writes or appends to existing data sources. It uses a stateless approach to read or write data, where all data are read or written in a single pass. This means that it does not support adding new records to an existing data source or appending to a file without rewriting the entire file[1][3].
In contrast, Fiona supports incremental writes or appends to existing data sources. While it is a full-featured library for working with OGR vector data sources, Fiona allows for more flexibility and control over data processing, including incremental writes or appends to existing data sources[1][3].
Key Differences
- Fiona: Supports incremental writes or appends to existing data sources.- Pyogrio: Does not support incremental writes or appends to existing data sources. It uses a stateless approach to read or write data, where all data are read or written in a single pass.
Comparison to Fiona
- Fiona: More flexible and robust, with a broader range of supported file formats and more control over data processing.- Pyogrio: Optimized for faster I/O operations, specifically targeting GeoPandas and reducing data transformations required for I/O operations.
Installation and Compatibility
- Fiona: Widely available and supports a broader range of platforms, including Windows.- Pyogrio: Available on Conda-forge for Linux and MacOS but not yet on PyPi due to the complexity of packaging binary dependencies for Windows. It requires compatible versions of GDAL and numpy from Conda-forge for raw I/O support and geopandas, pygeos, and their dependencies for GeoDataFrame I/O support[1][3].
Default Engine in GeoPandas
- Fiona: Currently the default engine used by GeoPandas for reading and writing files.- Pyogrio: Will be the default engine in GeoPandas 1.0 due to its potential for significant speedups[5].
In summary, while both libraries are designed for working with spatial data, Fiona offers more flexibility and control over data processing, including incremental writes or appends to existing data sources. Pyogrio, on the other hand, is optimized for faster I/O operations and is specifically targeted at reducing data transformations required for GeoPandas I/O operations.
Citations:[1] https://pyogrio.readthedocs.io/en/latest/about.html
[2] https://github.com/geopandas/geopandas/issues/2908
[3] https://pypi.org/project/pyogrio/0.2.0/
[4] https://pyogrio.readthedocs.io/en/latest/introduction.html
[5] https://geopandas.org/en/stable/docs/reference/api/geopandas.read_file.html