geofileops 0.10.0.dev1__tar.gz → 0.10.1.dev1__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.
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/LICENSE.txt +1 -1
- {geofileops-0.10.0.dev1/geofileops.egg-info → geofileops-0.10.1.dev1}/PKG-INFO +9 -8
- geofileops-0.10.0.dev1/geofileops/_compat.py → geofileops-0.10.1.dev1/geofileops/__init__.py +30 -28
- geofileops-0.10.1.dev1/geofileops/_compat.py +26 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/fileops.py +776 -642
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/geoops.py +155 -153
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/helpers/_general_helper.py +2 -5
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/helpers/_parameter_helper.py +1 -1
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/helpers/layerstyles.py +5 -6
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_general_util.py +6 -6
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_geofileinfo.py +12 -9
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_geoops_gpd.py +113 -103
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_geoops_ogr.py +26 -27
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_geoops_sql.py +499 -437
- geofileops-0.10.1.dev1/geofileops/util/_geopath_util.py +105 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_geoseries_util.py +1 -2
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_io_util.py +7 -13
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_ogr_sql_util.py +2 -3
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_ogr_util.py +69 -76
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_processing_util.py +22 -5
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_sqlite_userdefined.py +3 -4
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_sqlite_util.py +21 -18
- geofileops-0.10.1.dev1/geofileops/version.txt +1 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1/geofileops.egg-info}/PKG-INFO +9 -8
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops.egg-info/SOURCES.txt +1 -0
- geofileops-0.10.1.dev1/geofileops.egg-info/requires.txt +14 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/pyproject.toml +2 -1
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/setup.py +6 -6
- geofileops-0.10.0.dev1/geofileops/__init__.py +0 -29
- geofileops-0.10.0.dev1/geofileops/version.txt +0 -1
- geofileops-0.10.0.dev1/geofileops.egg-info/requires.txt +0 -14
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/MANIFEST.in +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/README.md +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/helpers/__init__.py +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/helpers/_configoptions_helper.py +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/py.typed +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/__init__.py +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/_geometry_util.py +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/geodataframe_util.py +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/geofiletypes.csv +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops/util/test.gpkg +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops.egg-info/dependency_links.txt +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/geofileops.egg-info/top_level.txt +0 -0
- {geofileops-0.10.0.dev1 → geofileops-0.10.1.dev1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: geofileops
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.1.dev1
|
|
4
4
|
Summary: Python toolbox to process large vector files faster.
|
|
5
5
|
Home-page: https://github.com/geofileops/geofileops
|
|
6
6
|
Author: Pieter Roggemans
|
|
@@ -11,20 +11,20 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
13
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
17
|
Requires-Dist: cloudpickle
|
|
18
|
-
Requires-Dist: gdal
|
|
19
|
-
Requires-Dist: geopandas
|
|
18
|
+
Requires-Dist: gdal>=3.6
|
|
19
|
+
Requires-Dist: geopandas>=0.12
|
|
20
20
|
Requires-Dist: numpy
|
|
21
21
|
Requires-Dist: packaging
|
|
22
22
|
Requires-Dist: pandas>=1.5
|
|
23
23
|
Requires-Dist: psutil
|
|
24
|
-
Requires-Dist: pygeoops
|
|
25
|
-
Requires-Dist: pyogrio
|
|
24
|
+
Requires-Dist: pygeoops>=0.4
|
|
25
|
+
Requires-Dist: pyogrio>=0.7
|
|
26
26
|
Requires-Dist: pyproj
|
|
27
|
-
Requires-Dist: shapely
|
|
27
|
+
Requires-Dist: shapely>=2
|
|
28
28
|
Provides-Extra: full
|
|
29
29
|
Requires-Dist: simplification; extra == "full"
|
|
30
30
|
Dynamic: author
|
|
@@ -33,6 +33,7 @@ Dynamic: classifier
|
|
|
33
33
|
Dynamic: description
|
|
34
34
|
Dynamic: description-content-type
|
|
35
35
|
Dynamic: home-page
|
|
36
|
+
Dynamic: license-file
|
|
36
37
|
Dynamic: provides-extra
|
|
37
38
|
Dynamic: requires-dist
|
|
38
39
|
Dynamic: requires-python
|
geofileops-0.10.0.dev1/geofileops/_compat.py → geofileops-0.10.1.dev1/geofileops/__init__.py
RENAMED
|
@@ -1,19 +1,38 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Library to make spatial operations on large geo files fast(er) and easy."""
|
|
2
2
|
|
|
3
3
|
import multiprocessing
|
|
4
|
+
import os
|
|
4
5
|
import warnings
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
# Import geopandas here so the warning about pygeos <> shapely2 is given, but set
|
|
9
|
+
# USE_PYGEOS to avoid further warnings
|
|
10
|
+
import geopandas._compat as gpd_compat
|
|
9
11
|
import pyogrio
|
|
10
|
-
import shapely
|
|
11
|
-
from osgeo import gdal
|
|
12
|
-
from packaging import version
|
|
13
12
|
|
|
14
|
-
from geofileops
|
|
13
|
+
from geofileops import _compat
|
|
14
|
+
from geofileops.util import _ogr_util
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
if hasattr(gpd_compat, "USE_PYGEOS"):
|
|
17
|
+
if gpd_compat.USE_PYGEOS:
|
|
18
|
+
os.environ["USE_PYGEOS"] = "1"
|
|
19
|
+
else:
|
|
20
|
+
os.environ["USE_PYGEOS"] = "0"
|
|
21
|
+
|
|
22
|
+
from geofileops.fileops import * # noqa: F403
|
|
23
|
+
from geofileops.geoops import * # noqa: F403
|
|
24
|
+
from geofileops.helpers.layerstyles import * # noqa: F403
|
|
25
|
+
from geofileops.util._general_util import TempEnv # noqa: F401
|
|
26
|
+
from geofileops.util._geofileinfo import get_driver # noqa: F401
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _get_version():
|
|
30
|
+
version_path = Path(__file__).resolve().parent / "version.txt"
|
|
31
|
+
with open(version_path) as file:
|
|
32
|
+
return file.readline()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
__version__ = _get_version()
|
|
17
36
|
|
|
18
37
|
|
|
19
38
|
# Do some pre-flight checks to ensure mandatory runtime dependencies are available.
|
|
@@ -47,24 +66,7 @@ def _pyogrio_spatialite_version_info() -> dict[str, str]:
|
|
|
47
66
|
return versions
|
|
48
67
|
|
|
49
68
|
|
|
50
|
-
#
|
|
51
|
-
# gdal.__version__ includes a "dev-..." suffix for master/development versions. This
|
|
52
|
-
# must be dropped for the version checks here.
|
|
53
|
-
GDAL_BASE_VERSION = version.parse(gdal.__version__.split("-")[0]).base_version
|
|
54
|
-
GDAL_GTE_38 = version.parse(GDAL_BASE_VERSION) >= version.parse("3.8")
|
|
55
|
-
GDAL_ST_311 = version.parse(GDAL_BASE_VERSION) < version.parse("3.11")
|
|
56
|
-
|
|
57
|
-
GEOPANDAS_GTE_10 = version.parse(gpd.__version__) >= version.parse("1.0")
|
|
58
|
-
PANDAS_GTE_22 = version.parse(pd.__version__) >= version.parse("2.2")
|
|
59
|
-
PYOGRIO_GTE_07 = version.parse(pyogrio.__version__) >= version.parse("0.7")
|
|
60
|
-
SHAPELY_GTE_20 = version.parse(shapely.__version__) >= version.parse("2")
|
|
61
|
-
|
|
62
|
-
sqlite3_spatialite_version_info = _sqlite_util.spatialite_version_info()
|
|
63
|
-
sqlite3_spatialite_version = sqlite3_spatialite_version_info["spatialite_version"]
|
|
64
|
-
SPATIALITE_GTE_51 = version.parse(sqlite3_spatialite_version) >= version.parse("5.1")
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
# If running in the main process, check the spatialite versions of the dependencies
|
|
69
|
+
# Check the spatialite versions of the dependencies only in the main process
|
|
68
70
|
if multiprocessing.parent_process() is None:
|
|
69
71
|
pyogrio_spatialite_version_info = _pyogrio_spatialite_version_info()
|
|
70
72
|
|
|
@@ -75,11 +77,11 @@ if multiprocessing.parent_process() is None:
|
|
|
75
77
|
|
|
76
78
|
gdal_spatialite_version = gdal_spatialite_version_info["spatialite_version"]
|
|
77
79
|
if (
|
|
78
|
-
pyogrio_spatialite_version != sqlite3_spatialite_version
|
|
80
|
+
pyogrio_spatialite_version != _compat.sqlite3_spatialite_version
|
|
79
81
|
or pyogrio_spatialite_version != gdal_spatialite_version
|
|
80
82
|
): # pragma: no cover
|
|
81
83
|
warnings.warn(
|
|
82
84
|
f"different spatialite versions loaded: {pyogrio_spatialite_version=} vs "
|
|
83
|
-
f"{sqlite3_spatialite_version=} vs {gdal_spatialite_version=}",
|
|
85
|
+
f"{_compat.sqlite3_spatialite_version=} vs {gdal_spatialite_version=}",
|
|
84
86
|
stacklevel=1,
|
|
85
87
|
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Module with compatibility and dependency availability checks."""
|
|
2
|
+
|
|
3
|
+
import geopandas as gpd
|
|
4
|
+
import pandas as pd
|
|
5
|
+
import shapely
|
|
6
|
+
from osgeo import gdal
|
|
7
|
+
from packaging import version
|
|
8
|
+
|
|
9
|
+
from geofileops.util import _sqlite_util
|
|
10
|
+
|
|
11
|
+
gdal.UseExceptions()
|
|
12
|
+
|
|
13
|
+
# Determine the versions of the runtime dependencies
|
|
14
|
+
# gdal.__version__ includes a "dev-..." suffix for master/development versions. This
|
|
15
|
+
# must be dropped for the version checks here.
|
|
16
|
+
GDAL_BASE_VERSION = version.parse(gdal.__version__.split("-")[0]).base_version
|
|
17
|
+
GDAL_GTE_38 = version.parse(GDAL_BASE_VERSION) >= version.parse("3.8")
|
|
18
|
+
GDAL_ST_311 = version.parse(GDAL_BASE_VERSION) < version.parse("3.11")
|
|
19
|
+
|
|
20
|
+
GEOPANDAS_GTE_10 = version.parse(gpd.__version__) >= version.parse("1.0")
|
|
21
|
+
PANDAS_GTE_22 = version.parse(pd.__version__) >= version.parse("2.2")
|
|
22
|
+
SHAPELY_GTE_20 = version.parse(shapely.__version__) >= version.parse("2")
|
|
23
|
+
|
|
24
|
+
sqlite3_spatialite_version_info = _sqlite_util.spatialite_version_info()
|
|
25
|
+
sqlite3_spatialite_version = sqlite3_spatialite_version_info["spatialite_version"]
|
|
26
|
+
SPATIALITE_GTE_51 = version.parse(sqlite3_spatialite_version) >= version.parse("5.1")
|