vector2dggs 0.8.0__py3-none-any.whl → 0.9.0__py3-none-any.whl
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.
- vector2dggs/__init__.py +1 -1
- vector2dggs/common.py +17 -15
- vector2dggs/constants.py +5 -3
- vector2dggs/geohash.py +7 -7
- vector2dggs/h3.py +7 -7
- vector2dggs/katana.py +25 -19
- vector2dggs/rHP.py +17 -16
- vector2dggs/s2.py +7 -7
- {vector2dggs-0.8.0.dist-info → vector2dggs-0.9.0.dist-info}/METADATA +8 -9
- vector2dggs-0.9.0.dist-info/RECORD +15 -0
- vector2dggs-0.8.0.dist-info/RECORD +0 -15
- {vector2dggs-0.8.0.dist-info → vector2dggs-0.9.0.dist-info}/COPYING +0 -0
- {vector2dggs-0.8.0.dist-info → vector2dggs-0.9.0.dist-info}/COPYING.LESSER +0 -0
- {vector2dggs-0.8.0.dist-info → vector2dggs-0.9.0.dist-info}/WHEEL +0 -0
- {vector2dggs-0.8.0.dist-info → vector2dggs-0.9.0.dist-info}/entry_points.txt +0 -0
vector2dggs/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__: str = "0.
|
1
|
+
__version__: str = "0.9.0"
|
vector2dggs/common.py
CHANGED
@@ -112,7 +112,7 @@ def drop_condition(
|
|
112
112
|
return df
|
113
113
|
|
114
114
|
|
115
|
-
def get_parent_res(dggs: str, parent_res: Union[None,
|
115
|
+
def get_parent_res(dggs: str, parent_res: Union[None, str], resolution: int) -> int:
|
116
116
|
"""
|
117
117
|
Uses a parent resolution,
|
118
118
|
OR,
|
@@ -127,7 +127,7 @@ def get_parent_res(dggs: str, parent_res: Union[None, int], resolution: int):
|
|
127
127
|
)
|
128
128
|
)
|
129
129
|
return (
|
130
|
-
parent_res
|
130
|
+
int(parent_res)
|
131
131
|
if parent_res is not None
|
132
132
|
else const.DEFAULT_DGGS_PARENT_RES[dggs](resolution)
|
133
133
|
)
|
@@ -138,10 +138,9 @@ def parent_partitioning(
|
|
138
138
|
input_dir: Path,
|
139
139
|
output_dir: Path,
|
140
140
|
resolution: int,
|
141
|
-
parent_res:
|
141
|
+
parent_res: int,
|
142
142
|
**kwargs,
|
143
143
|
) -> None:
|
144
|
-
parent_res: int = get_parent_res(dggs, parent_res, resolution)
|
145
144
|
partition_col = f"{dggs}_{parent_res:02}"
|
146
145
|
|
147
146
|
with TqdmCallback(desc="Repartitioning"):
|
@@ -171,7 +170,7 @@ def polyfill(
|
|
171
170
|
pq_in: Path,
|
172
171
|
spatial_sort_col: str,
|
173
172
|
resolution: int,
|
174
|
-
parent_res:
|
173
|
+
parent_res: int,
|
175
174
|
output_directory: str,
|
176
175
|
) -> None:
|
177
176
|
"""
|
@@ -179,7 +178,9 @@ def polyfill(
|
|
179
178
|
linetracing (for LineString), or indexing (for Point),
|
180
179
|
and writes out to parquet.
|
181
180
|
"""
|
182
|
-
df = gpd.read_parquet(pq_in).reset_index()
|
181
|
+
df = gpd.read_parquet(pq_in).reset_index()
|
182
|
+
if spatial_sort_col != "none":
|
183
|
+
df = df.drop(columns=[spatial_sort_col])
|
183
184
|
if len(df.index) == 0:
|
184
185
|
# Input is empty, nothing to convert
|
185
186
|
return None
|
@@ -192,7 +193,6 @@ def polyfill(
|
|
192
193
|
return None
|
193
194
|
|
194
195
|
df.index.rename(f"{dggs}_{resolution:02}", inplace=True)
|
195
|
-
parent_res: int = get_parent_res(dggs, parent_res, resolution)
|
196
196
|
|
197
197
|
# Secondary (parent) index, used later for partitioning
|
198
198
|
df = secondary_index_func(df, parent_res)
|
@@ -223,22 +223,23 @@ def index(
|
|
223
223
|
id_field: str = None,
|
224
224
|
cut_crs: pyproj.CRS = None,
|
225
225
|
con: SQLConnectionType = None,
|
226
|
-
|
226
|
+
layer: str = None,
|
227
227
|
geom_col: str = "geom",
|
228
228
|
overwrite: bool = False,
|
229
229
|
) -> Path:
|
230
230
|
"""
|
231
231
|
Performs multi-threaded DGGS indexing on geometries (including multipart and collections).
|
232
232
|
"""
|
233
|
+
parent_res = get_parent_res(dggs, parent_res, resolution)
|
233
234
|
|
234
|
-
if
|
235
|
+
if layer and con:
|
235
236
|
# Database connection
|
236
237
|
if keep_attributes:
|
237
|
-
q = sqlalchemy.text(f"SELECT * FROM {
|
238
|
+
q = sqlalchemy.text(f"SELECT * FROM {layer}")
|
238
239
|
elif id_field and not keep_attributes:
|
239
|
-
q = sqlalchemy.text(f"SELECT {id_field}, {geom_col} FROM {
|
240
|
+
q = sqlalchemy.text(f"SELECT {id_field}, {geom_col} FROM {layer}")
|
240
241
|
else:
|
241
|
-
q = sqlalchemy.text(f"SELECT {geom_col} FROM {
|
242
|
+
q = sqlalchemy.text(f"SELECT {geom_col} FROM {layer}")
|
242
243
|
df = gpd.read_postgis(q, con.connect(), geom_col=geom_col).rename_geometry(
|
243
244
|
"geometry"
|
244
245
|
)
|
@@ -296,11 +297,12 @@ def index(
|
|
296
297
|
|
297
298
|
ddf = dgpd.from_geopandas(df, chunksize=max(1, chunksize), sort=True)
|
298
299
|
|
299
|
-
|
300
|
-
|
300
|
+
if spatial_sorting != "none":
|
301
|
+
LOGGER.debug("Spatially sorting and partitioning (%s)", spatial_sorting)
|
302
|
+
ddf = ddf.spatial_shuffle(by=spatial_sorting)
|
301
303
|
spatial_sort_col = (
|
302
304
|
spatial_sorting
|
303
|
-
if spatial_sorting == "geohash"
|
305
|
+
if (spatial_sorting == "geohash" or spatial_sorting == "none")
|
304
306
|
else f"{spatial_sorting}_distance"
|
305
307
|
)
|
306
308
|
|
vector2dggs/constants.py
CHANGED
@@ -6,21 +6,23 @@ import tempfile
|
|
6
6
|
MIN_H3, MAX_H3 = 0, 15
|
7
7
|
MIN_RHP, MAX_RHP = 0, 15
|
8
8
|
MIN_S2, MAX_S2 = 0, 30
|
9
|
-
MIN_GEOHASH, MAX_GEOHASH =
|
9
|
+
MIN_GEOHASH, MAX_GEOHASH = 1, 12
|
10
10
|
|
11
11
|
DEFAULTS = {
|
12
12
|
"id": None,
|
13
13
|
"k": False,
|
14
14
|
"ch": 50,
|
15
|
-
"s": "
|
15
|
+
"s": "none",
|
16
16
|
"crs": None,
|
17
17
|
"c": 5000,
|
18
18
|
"t": (multiprocessing.cpu_count() - 1),
|
19
|
-
"
|
19
|
+
"lyr": None,
|
20
20
|
"g": "geom",
|
21
21
|
"tempdir": tempfile.tempdir,
|
22
22
|
}
|
23
23
|
|
24
|
+
SPATIAL_SORTING_METHODS = ["hilbert", "morton", "geohash", "none"]
|
25
|
+
|
24
26
|
DEFAULT_DGGS_PARENT_RES = {
|
25
27
|
"h3": lambda resolution: max(MIN_H3, (resolution - DEFAULT_PARENT_OFFSET)),
|
26
28
|
"rhp": lambda resolution: max(MIN_RHP, (resolution - DEFAULT_PARENT_OFFSET)),
|
vector2dggs/geohash.py
CHANGED
@@ -123,7 +123,7 @@ def gh_polyfill(df: gpd.GeoDataFrame, level: int) -> pd.DataFrame:
|
|
123
123
|
@click.option(
|
124
124
|
"-s",
|
125
125
|
"--spatial_sorting",
|
126
|
-
type=click.Choice(
|
126
|
+
type=click.Choice(const.SPATIAL_SORTING_METHODS),
|
127
127
|
default=const.DEFAULTS["s"],
|
128
128
|
help="Spatial sorting method when perfoming spatial partitioning.",
|
129
129
|
)
|
@@ -155,12 +155,12 @@ def gh_polyfill(df: gpd.GeoDataFrame, level: int) -> pd.DataFrame:
|
|
155
155
|
nargs=1,
|
156
156
|
)
|
157
157
|
@click.option(
|
158
|
-
"-
|
159
|
-
"--
|
158
|
+
"-lyr",
|
159
|
+
"--layer",
|
160
160
|
required=False,
|
161
|
-
default=const.DEFAULTS["
|
161
|
+
default=const.DEFAULTS["lyr"],
|
162
162
|
type=str,
|
163
|
-
help="Name of the table to read when using
|
163
|
+
help="Name of the layer or table to read when using an input that supports layers or tables",
|
164
164
|
nargs=1,
|
165
165
|
)
|
166
166
|
@click.option(
|
@@ -192,7 +192,7 @@ def geohash(
|
|
192
192
|
cut_crs: int,
|
193
193
|
cut_threshold: int,
|
194
194
|
threads: int,
|
195
|
-
|
195
|
+
layer: str,
|
196
196
|
geom_col: str,
|
197
197
|
tempdir: Union[str, Path],
|
198
198
|
overwrite: bool,
|
@@ -230,7 +230,7 @@ def geohash(
|
|
230
230
|
cut_crs=cut_crs,
|
231
231
|
id_field=id_field,
|
232
232
|
con=con,
|
233
|
-
|
233
|
+
layer=layer,
|
234
234
|
geom_col=geom_col,
|
235
235
|
overwrite=overwrite,
|
236
236
|
)
|
vector2dggs/h3.py
CHANGED
@@ -98,7 +98,7 @@ def h3polyfill(df: gpd.GeoDataFrame, resolution: int) -> pd.DataFrame:
|
|
98
98
|
@click.option(
|
99
99
|
"-s",
|
100
100
|
"--spatial_sorting",
|
101
|
-
type=click.Choice(
|
101
|
+
type=click.Choice(const.SPATIAL_SORTING_METHODS),
|
102
102
|
default=const.DEFAULTS["s"],
|
103
103
|
help="Spatial sorting method when perfoming spatial partitioning.",
|
104
104
|
)
|
@@ -130,12 +130,12 @@ def h3polyfill(df: gpd.GeoDataFrame, resolution: int) -> pd.DataFrame:
|
|
130
130
|
nargs=1,
|
131
131
|
)
|
132
132
|
@click.option(
|
133
|
-
"-
|
134
|
-
"--
|
133
|
+
"-lyr",
|
134
|
+
"--layer",
|
135
135
|
required=False,
|
136
|
-
default=const.DEFAULTS["
|
136
|
+
default=const.DEFAULTS["lyr"],
|
137
137
|
type=str,
|
138
|
-
help="Name of the table to read when using
|
138
|
+
help="Name of the layer or table to read when using an input that supports layers or tables",
|
139
139
|
nargs=1,
|
140
140
|
)
|
141
141
|
@click.option(
|
@@ -167,7 +167,7 @@ def h3(
|
|
167
167
|
cut_crs: int,
|
168
168
|
cut_threshold: int,
|
169
169
|
threads: int,
|
170
|
-
|
170
|
+
layer: str,
|
171
171
|
geom_col: str,
|
172
172
|
tempdir: Union[str, Path],
|
173
173
|
overwrite: bool,
|
@@ -205,7 +205,7 @@ def h3(
|
|
205
205
|
cut_crs=cut_crs,
|
206
206
|
id_field=id_field,
|
207
207
|
con=con,
|
208
|
-
|
208
|
+
layer=layer,
|
209
209
|
geom_col=geom_col,
|
210
210
|
overwrite=overwrite,
|
211
211
|
)
|
vector2dggs/katana.py
CHANGED
@@ -11,6 +11,7 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
11
11
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
12
12
|
"""
|
13
13
|
|
14
|
+
from shapely import force_2d, has_z, has_m
|
14
15
|
from shapely.geometry import (
|
15
16
|
box,
|
16
17
|
Polygon,
|
@@ -18,20 +19,32 @@ from shapely.geometry import (
|
|
18
19
|
LineString,
|
19
20
|
MultiLineString,
|
20
21
|
GeometryCollection,
|
22
|
+
LinearRing,
|
21
23
|
)
|
22
|
-
from shapely.
|
24
|
+
from shapely.geometry.base import BaseGeometry
|
25
|
+
from shapely.validation import make_valid
|
26
|
+
from typing import Union, List
|
23
27
|
|
24
28
|
|
25
|
-
def katana(
|
29
|
+
def katana(
|
30
|
+
geometry: Union[BaseGeometry, None],
|
31
|
+
threshold: float,
|
32
|
+
count: int = 0,
|
33
|
+
check_2D: bool = True,
|
34
|
+
) -> List[BaseGeometry]:
|
26
35
|
"""
|
27
|
-
|
36
|
+
Recursively split a geometry into two parts across its shortest dimension.
|
28
37
|
Invalid input `geometry` will silently be made valid (if possible).
|
38
|
+
Any LinearRings will be converted to Polygons.
|
29
39
|
"""
|
30
40
|
if geometry is None:
|
31
|
-
|
32
|
-
|
41
|
+
return []
|
42
|
+
if isinstance(geometry, LinearRing):
|
43
|
+
geometry = Polygon(geometry)
|
44
|
+
if check_2D and (has_z(geometry) or has_m(geometry)):
|
45
|
+
geometry = force_2d(geometry)
|
46
|
+
check_2D = False # No further 2D check needed
|
33
47
|
if not geometry.is_valid:
|
34
|
-
# print(explain_validity(geometry))
|
35
48
|
geometry = make_valid(geometry)
|
36
49
|
if geometry.geom_type == "GeometryCollection":
|
37
50
|
geometry.normalize()
|
@@ -60,16 +73,9 @@ def katana(geometry, threshold, count=0) -> GeometryCollection:
|
|
60
73
|
if not isinstance(c, GeometryCollection):
|
61
74
|
c = GeometryCollection([c])
|
62
75
|
for e in c.geoms:
|
63
|
-
if isinstance(
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
for g in result:
|
70
|
-
# if isinstance(g, MultiPolygon):
|
71
|
-
# final_result.extend(g)
|
72
|
-
# else:
|
73
|
-
# final_result.append(g)
|
74
|
-
final_result.append(g)
|
75
|
-
return final_result
|
76
|
+
if isinstance(
|
77
|
+
e, (Polygon, MultiPolygon, LineString, MultiLineString, LinearRing)
|
78
|
+
):
|
79
|
+
result.extend(katana(e, threshold, count + 1, check_2D))
|
80
|
+
|
81
|
+
return result
|
vector2dggs/rHP.py
CHANGED
@@ -11,6 +11,7 @@ import geopandas as gpd
|
|
11
11
|
|
12
12
|
from typing import Union
|
13
13
|
from pathlib import Path
|
14
|
+
from rhppandas.util.const import COLUMNS
|
14
15
|
|
15
16
|
import vector2dggs.constants as const
|
16
17
|
import vector2dggs.common as common
|
@@ -29,14 +30,14 @@ def rhppolyfill(df: gpd.GeoDataFrame, resolution: int) -> pd.DataFrame:
|
|
29
30
|
resolution, return_geometry=False
|
30
31
|
).drop(columns=["index"])
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
df_linestring = df[df.geom_type == "LineString"]
|
34
|
+
if len(df_linestring.index) > 0:
|
35
|
+
df_linestring = (
|
36
|
+
df_linestring.rhp.linetrace(resolution)
|
37
|
+
.explode(COLUMNS["linetrace"])
|
38
|
+
.set_index(COLUMNS["linetrace"])
|
39
|
+
)
|
40
|
+
df_linestring = df_linestring[~df_linestring.index.duplicated(keep="first")]
|
40
41
|
|
41
42
|
df_point = df[df.geom_type == "Point"]
|
42
43
|
if len(df_point.index) > 0:
|
@@ -45,7 +46,7 @@ def rhppolyfill(df: gpd.GeoDataFrame, resolution: int) -> pd.DataFrame:
|
|
45
46
|
return pd.concat(
|
46
47
|
map(
|
47
48
|
lambda _df: pd.DataFrame(_df.drop(columns=[_df.geometry.name])),
|
48
|
-
[df_polygon, df_point],
|
49
|
+
[df_polygon, df_linestring, df_point],
|
49
50
|
)
|
50
51
|
)
|
51
52
|
|
@@ -98,7 +99,7 @@ def rhppolyfill(df: gpd.GeoDataFrame, resolution: int) -> pd.DataFrame:
|
|
98
99
|
@click.option(
|
99
100
|
"-s",
|
100
101
|
"--spatial_sorting",
|
101
|
-
type=click.Choice(
|
102
|
+
type=click.Choice(const.SPATIAL_SORTING_METHODS),
|
102
103
|
default=const.DEFAULTS["s"],
|
103
104
|
help="Spatial sorting method when perfoming spatial partitioning.",
|
104
105
|
)
|
@@ -130,12 +131,12 @@ def rhppolyfill(df: gpd.GeoDataFrame, resolution: int) -> pd.DataFrame:
|
|
130
131
|
nargs=1,
|
131
132
|
)
|
132
133
|
@click.option(
|
133
|
-
"-
|
134
|
-
"--
|
134
|
+
"-lyr",
|
135
|
+
"--layer",
|
135
136
|
required=False,
|
136
|
-
default=const.DEFAULTS["
|
137
|
+
default=const.DEFAULTS["lyr"],
|
137
138
|
type=str,
|
138
|
-
help="Name of the table to read when using
|
139
|
+
help="Name of the layer or table to read when using an input that supports layers or tables",
|
139
140
|
nargs=1,
|
140
141
|
)
|
141
142
|
@click.option(
|
@@ -167,7 +168,7 @@ def rhp(
|
|
167
168
|
cut_crs: int,
|
168
169
|
cut_threshold: int,
|
169
170
|
threads: int,
|
170
|
-
|
171
|
+
layer: str,
|
171
172
|
geom_col: str,
|
172
173
|
tempdir: Union[str, Path],
|
173
174
|
overwrite: bool,
|
@@ -205,7 +206,7 @@ def rhp(
|
|
205
206
|
cut_crs=cut_crs,
|
206
207
|
id_field=id_field,
|
207
208
|
con=con,
|
208
|
-
|
209
|
+
layer=layer,
|
209
210
|
geom_col=geom_col,
|
210
211
|
overwrite=overwrite,
|
211
212
|
)
|
vector2dggs/s2.py
CHANGED
@@ -232,7 +232,7 @@ def s2_polyfill(df: gpd.GeoDataFrame, level: int) -> pd.DataFrame:
|
|
232
232
|
@click.option(
|
233
233
|
"-s",
|
234
234
|
"--spatial_sorting",
|
235
|
-
type=click.Choice(
|
235
|
+
type=click.Choice(const.SPATIAL_SORTING_METHODS),
|
236
236
|
default=const.DEFAULTS["s"],
|
237
237
|
help="Spatial sorting method when perfoming spatial partitioning.",
|
238
238
|
)
|
@@ -264,12 +264,12 @@ def s2_polyfill(df: gpd.GeoDataFrame, level: int) -> pd.DataFrame:
|
|
264
264
|
nargs=1,
|
265
265
|
)
|
266
266
|
@click.option(
|
267
|
-
"-
|
268
|
-
"--
|
267
|
+
"-lyr",
|
268
|
+
"--layer",
|
269
269
|
required=False,
|
270
|
-
default=const.DEFAULTS["
|
270
|
+
default=const.DEFAULTS["lyr"],
|
271
271
|
type=str,
|
272
|
-
help="Name of the table to read when using
|
272
|
+
help="Name of the layer or table to read when using an input that supports layers or tables",
|
273
273
|
nargs=1,
|
274
274
|
)
|
275
275
|
@click.option(
|
@@ -301,7 +301,7 @@ def s2(
|
|
301
301
|
cut_crs: int,
|
302
302
|
cut_threshold: int,
|
303
303
|
threads: int,
|
304
|
-
|
304
|
+
layer: str,
|
305
305
|
geom_col: str,
|
306
306
|
tempdir: Union[str, Path],
|
307
307
|
overwrite: bool,
|
@@ -339,7 +339,7 @@ def s2(
|
|
339
339
|
cut_crs=cut_crs,
|
340
340
|
id_field=id_field,
|
341
341
|
con=con,
|
342
|
-
|
342
|
+
layer=layer,
|
343
343
|
geom_col=geom_col,
|
344
344
|
overwrite=overwrite,
|
345
345
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: vector2dggs
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.9.0
|
4
4
|
Summary: CLI DGGS indexer for vector geospatial data
|
5
5
|
Home-page: https://github.com/manaakiwhenua/vector2dggs
|
6
6
|
License: LGPL-3.0-or-later
|
@@ -30,8 +30,7 @@ Requires-Dist: psycopg2 (>=2.9.9,<3.0.0)
|
|
30
30
|
Requires-Dist: pyarrow (>=20.0,<21.0)
|
31
31
|
Requires-Dist: pyproj (>=3.7,<4.0)
|
32
32
|
Requires-Dist: python-geohash (>=0.8.5,<0.9.0)
|
33
|
-
Requires-Dist:
|
34
|
-
Requires-Dist: rhppandas (>=0.1.2,<0.2.0)
|
33
|
+
Requires-Dist: rhppandas (>=0.2.0,<0.3.0)
|
35
34
|
Requires-Dist: rusty-polygon-geohasher (>=0.2.3,<0.3.0)
|
36
35
|
Requires-Dist: s2geometry (>=0.9.0,<0.10.0)
|
37
36
|
Requires-Dist: shapely (>=2.1,<3.0)
|
@@ -51,7 +50,7 @@ This is the vector equivalent of [raster2dggs](https://github.com/manaakiwhenua/
|
|
51
50
|
Currently this tool supports the following DGGSs:
|
52
51
|
|
53
52
|
- [H3](https://h3geo.org/)
|
54
|
-
- [rHEALPix](https://datastore.landcareresearch.co.nz/dataset/rhealpix-discrete-global-grid-system)
|
53
|
+
- [rHEALPix](https://datastore.landcareresearch.co.nz/dataset/rhealpix-discrete-global-grid-system)
|
55
54
|
- [S2](https://s2geometry.io/)
|
56
55
|
|
57
56
|
... and the following geocode systems:
|
@@ -130,8 +129,8 @@ Options:
|
|
130
129
|
[default: 5000; required]
|
131
130
|
-t, --threads INTEGER Amount of threads used for operation
|
132
131
|
[default: 7]
|
133
|
-
-
|
134
|
-
|
132
|
+
-lyr, --layer TEXT Name of the layer or table to read when using a
|
133
|
+
an input that supports layers or tables
|
135
134
|
-g, --geom_col TEXT Column name to use when using a spatial
|
136
135
|
database connection as input [default:
|
137
136
|
geom]
|
@@ -239,7 +238,7 @@ vector2dggs h3 -v DEBUG -id title_no -r 12 -o ~/Downloads/nz-property-titles.gpk
|
|
239
238
|
With a PostgreSQL/PostGIS connection:
|
240
239
|
|
241
240
|
```bash
|
242
|
-
vector2dggs h3 -v DEBUG -id ogc_fid -r 9 -p 5 -t 4 --overwrite -
|
241
|
+
vector2dggs h3 -v DEBUG -id ogc_fid -r 9 -p 5 -t 4 --overwrite -lyr topo50_lake postgresql://user:password@host:port/db ./topo50_lake.parquet
|
243
242
|
```
|
244
243
|
|
245
244
|
## Citation
|
@@ -249,14 +248,14 @@ vector2dggs h3 -v DEBUG -id ogc_fid -r 9 -p 5 -t 4 --overwrite -tbl topo50_lake
|
|
249
248
|
title={{vector2dggs}},
|
250
249
|
author={Ardo, James and Law, Richard},
|
251
250
|
url={https://github.com/manaakiwhenua/vector2dggs},
|
252
|
-
version={0.
|
251
|
+
version={0.9.0},
|
253
252
|
date={2023-04-20}
|
254
253
|
}
|
255
254
|
```
|
256
255
|
|
257
256
|
APA/Harvard
|
258
257
|
|
259
|
-
> Ardo, J., & Law, R. (2023). vector2dggs (0.
|
258
|
+
> Ardo, J., & Law, R. (2023). vector2dggs (0.9.0) [Computer software]. https://github.com/manaakiwhenua/vector2dggs
|
260
259
|
|
261
260
|
[](https://github.com/manaakiwhenua/manaakiwhenua-standards)
|
262
261
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
vector2dggs/__init__.py,sha256=L8qKCe-XFylNfRXefZ1yGESlLF24qwQQ87szPZJO6Zg,27
|
2
|
+
vector2dggs/cli.py,sha256=d_4skD62k6pXUWgDdVHbDwpe4A4yo62ZFx8Cp_6GpBA,767
|
3
|
+
vector2dggs/common.py,sha256=l5koOX1Ps0v5D7MgzHtK1t99hXnGA7b6I82n2rBOldE,10496
|
4
|
+
vector2dggs/constants.py,sha256=_cj3Pf52gsXfWwvpsbekE8h1yD_1jS9xqzRg2mRCq3w,1759
|
5
|
+
vector2dggs/geohash.py,sha256=t90FlZRQCH8lmtTHe2kPMcLTIf1nrrf2j-m95xk4xPc,7534
|
6
|
+
vector2dggs/h3.py,sha256=Bu_4T1WIDuTv_tJWTS8BgPmHRiCozfUUh2CxBwk98Gw,6310
|
7
|
+
vector2dggs/katana.py,sha256=v4BRzVCsroC6RzIYdxLfrr9eFOdmXb5S9jXBMs5tgSo,3571
|
8
|
+
vector2dggs/rHP.py,sha256=tC4LvqRPMmgUd36BppkvYeq94pPBhO1vBDQ-aaiHUg4,6410
|
9
|
+
vector2dggs/s2.py,sha256=HEpFTEL4UaZLjybKZ_q06QFjPuQ48MDLeg_qGc0NMEw,10835
|
10
|
+
vector2dggs-0.9.0.dist-info/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
11
|
+
vector2dggs-0.9.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
12
|
+
vector2dggs-0.9.0.dist-info/METADATA,sha256=7y97ZXmDNqUQ-n8M-BgOE2XLG-pJ6f_aNGjzVlCUFzc,11534
|
13
|
+
vector2dggs-0.9.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
14
|
+
vector2dggs-0.9.0.dist-info/entry_points.txt,sha256=5h8LB9L2oOE5u_N7FRGtu4JDwa553iPs4u0XhcLeLZU,52
|
15
|
+
vector2dggs-0.9.0.dist-info/RECORD,,
|
@@ -1,15 +0,0 @@
|
|
1
|
-
vector2dggs/__init__.py,sha256=MBs_zNH91Wn_gMAiPSI9xF7r-us5pgElKJBoafyySfc,27
|
2
|
-
vector2dggs/cli.py,sha256=d_4skD62k6pXUWgDdVHbDwpe4A4yo62ZFx8Cp_6GpBA,767
|
3
|
-
vector2dggs/common.py,sha256=yLYIWAbvlgY_tcTCRIzeqDjkT95LbIUqpHhrvm6TREE,10458
|
4
|
-
vector2dggs/constants.py,sha256=I89XzsKO5vQlMkVFwDnVS2nO5MtLGRYeCOSunLU9Dfg,1694
|
5
|
-
vector2dggs/geohash.py,sha256=BfBpgMYpZqH0j7hGf00qo0Q484DeRt7Afil5QJO8ZGI,7527
|
6
|
-
vector2dggs/h3.py,sha256=LYZe4GgGjp0kBoqm_L14yYtgLLBS3lnkHi_pEbd7tYM,6303
|
7
|
-
vector2dggs/katana.py,sha256=Z3RFB92DsIZ069Bz0mKyYBKtOxd2dPxYvRy6M-MyRsM,3412
|
8
|
-
vector2dggs/rHP.py,sha256=oURBnbVTR5vZtcxN1LVI67A0vNbzPicogaYB_9Hwdvg,6353
|
9
|
-
vector2dggs/s2.py,sha256=cyhvdXZjYKPCIgLJMG2ZChrbvsMKzLJcIa3bdwMdmVc,10828
|
10
|
-
vector2dggs-0.8.0.dist-info/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
11
|
-
vector2dggs-0.8.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
12
|
-
vector2dggs-0.8.0.dist-info/METADATA,sha256=Dq8-j2-IeQZa92xRRmN7RC8-OJTTIKjZTv7WZL7Noz8,11586
|
13
|
-
vector2dggs-0.8.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
14
|
-
vector2dggs-0.8.0.dist-info/entry_points.txt,sha256=5h8LB9L2oOE5u_N7FRGtu4JDwa553iPs4u0XhcLeLZU,52
|
15
|
-
vector2dggs-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|