pyogrio 0.7.1__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyogrio might be problematic. Click here for more details.
- {pyogrio-0.7.1/pyogrio.egg-info → pyogrio-0.8.0}/PKG-INFO +3 -2
- {pyogrio-0.7.1 → pyogrio-0.8.0}/README.md +1 -1
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/__init__.py +4 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_compat.py +7 -1
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_err.pyx +7 -3
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_io.pyx +900 -242
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_ogr.pxd +65 -12
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_ogr.pyx +8 -24
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_version.py +3 -3
- pyogrio-0.8.0/pyogrio/_vsi.pxd +4 -0
- pyogrio-0.8.0/pyogrio/_vsi.pyx +140 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/core.py +43 -44
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/geopandas.py +131 -30
- pyogrio-0.8.0/pyogrio/raw.py +871 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/conftest.py +75 -6
- pyogrio-0.8.0/pyogrio/tests/test_arrow.py +1041 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/test_core.py +99 -7
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/test_geopandas_io.py +744 -119
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/test_path.py +22 -3
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/test_raw_io.py +276 -50
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/util.py +41 -19
- {pyogrio-0.7.1 → pyogrio-0.8.0/pyogrio.egg-info}/PKG-INFO +3 -2
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio.egg-info/SOURCES.txt +2 -1
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio.egg-info/requires.txt +1 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyproject.toml +7 -5
- pyogrio-0.8.0/setup.cfg +10 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/setup.py +3 -19
- pyogrio-0.7.1/pyogrio/raw.py +0 -549
- pyogrio-0.7.1/pyogrio/tests/test_arrow.py +0 -207
- pyogrio-0.7.1/pyogrio/tests/win32.py +0 -86
- pyogrio-0.7.1/setup.cfg +0 -15
- {pyogrio-0.7.1 → pyogrio-0.8.0}/LICENSE +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/MANIFEST.in +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_env.py +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_err.pxd +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_geometry.pxd +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_geometry.pyx +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/_io.pxd +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/arrow_bridge.h +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/errors.py +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/__init__.py +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/README.md +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/naturalearth_lowres/naturalearth_lowres.cpg +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/naturalearth_lowres/naturalearth_lowres.dbf +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/naturalearth_lowres/naturalearth_lowres.prj +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/naturalearth_lowres/naturalearth_lowres.shp +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/naturalearth_lowres/naturalearth_lowres.shx +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/sample.osm.pbf +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_datetime.geojson +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_datetime_tz.geojson +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_fgdb.gdb.zip +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_gpkg_nulls.gpkg +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_multisurface.gpkg +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_nested.geojson +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio/tests/fixtures/test_ogr_types_list.geojson +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio.egg-info/dependency_links.txt +0 -0
- {pyogrio-0.7.1 → pyogrio-0.8.0}/pyogrio.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyogrio
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Vectorized spatial vector file format I/O using GDAL/OGR
|
|
5
5
|
Home-page: https://github.com/geopandas/pyogrio
|
|
6
6
|
Author: Brendan C. Ward
|
|
@@ -11,6 +11,7 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: certifi
|
|
13
13
|
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: packaging
|
|
14
15
|
Provides-Extra: dev
|
|
15
16
|
Requires-Dist: Cython; extra == "dev"
|
|
16
17
|
Provides-Extra: test
|
|
@@ -55,7 +56,7 @@ substantial change. Please see [CHANGES](CHANGES.md).
|
|
|
55
56
|
|
|
56
57
|
## Requirements
|
|
57
58
|
|
|
58
|
-
Supports Python 3.8 - 3.11 and GDAL 3.4.x - 3.
|
|
59
|
+
Supports Python 3.8 - 3.11 and GDAL 3.4.x - 3.8.x.
|
|
59
60
|
|
|
60
61
|
Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`.
|
|
61
62
|
|
|
@@ -32,7 +32,7 @@ substantial change. Please see [CHANGES](CHANGES.md).
|
|
|
32
32
|
|
|
33
33
|
## Requirements
|
|
34
34
|
|
|
35
|
-
Supports Python 3.8 - 3.11 and GDAL 3.4.x - 3.
|
|
35
|
+
Supports Python 3.8 - 3.11 and GDAL 3.4.x - 3.8.x.
|
|
36
36
|
|
|
37
37
|
Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`.
|
|
38
38
|
|
|
@@ -19,6 +19,7 @@ from pyogrio.core import (
|
|
|
19
19
|
__gdal_version_string__,
|
|
20
20
|
__gdal_geos_version__,
|
|
21
21
|
)
|
|
22
|
+
from pyogrio.raw import read_arrow, open_arrow, write_arrow
|
|
22
23
|
from pyogrio.geopandas import read_dataframe, write_dataframe
|
|
23
24
|
from pyogrio._version import get_versions
|
|
24
25
|
|
|
@@ -35,6 +36,9 @@ __all__ = [
|
|
|
35
36
|
"set_gdal_config_options",
|
|
36
37
|
"get_gdal_config_option",
|
|
37
38
|
"get_gdal_data_path",
|
|
39
|
+
"read_arrow",
|
|
40
|
+
"open_arrow",
|
|
41
|
+
"write_arrow",
|
|
38
42
|
"read_dataframe",
|
|
39
43
|
"write_dataframe",
|
|
40
44
|
"__gdal_version__",
|
|
@@ -24,11 +24,17 @@ except ImportError:
|
|
|
24
24
|
pandas = None
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
HAS_ARROW_API = __gdal_version__ >= (3, 6, 0)
|
|
27
|
+
HAS_ARROW_API = __gdal_version__ >= (3, 6, 0)
|
|
28
|
+
HAS_ARROW_WRITE_API = __gdal_version__ >= (3, 8, 0)
|
|
29
|
+
HAS_PYARROW = pyarrow is not None
|
|
28
30
|
|
|
29
31
|
HAS_GEOPANDAS = geopandas is not None
|
|
30
32
|
|
|
33
|
+
PANDAS_GE_15 = pandas is not None and Version(pandas.__version__) >= Version("1.5.0")
|
|
31
34
|
PANDAS_GE_20 = pandas is not None and Version(pandas.__version__) >= Version("2.0.0")
|
|
35
|
+
PANDAS_GE_22 = pandas is not None and Version(pandas.__version__) >= Version("2.2.0")
|
|
36
|
+
|
|
37
|
+
GDAL_GE_38 = __gdal_version__ >= (3, 8, 0)
|
|
32
38
|
|
|
33
39
|
HAS_GDAL_GEOS = __gdal_geos_version__ is not None
|
|
34
40
|
|
|
@@ -153,9 +153,13 @@ cdef inline object exc_check():
|
|
|
153
153
|
else:
|
|
154
154
|
# Reformat messages.
|
|
155
155
|
msg_b = err_msg
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
|
|
157
|
+
try:
|
|
158
|
+
msg = msg_b.decode('utf-8')
|
|
159
|
+
msg = msg.replace("`", "'")
|
|
160
|
+
msg = msg.replace("\n", " ")
|
|
161
|
+
except UnicodeDecodeError as exc:
|
|
162
|
+
msg = f"Could not decode error message to UTF-8. Raw error: {msg_b}"
|
|
159
163
|
|
|
160
164
|
if err_type == 3:
|
|
161
165
|
CPLErrorReset()
|