File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 33from pathlib import Path
44
55import duckdb
6- import pyarrow as pa
76from vecorel_cli .encoding .geojson import VecorelJSONEncoder
8- from vecorel_cli .parquet .types import get_pyarrow_field
97
108from .fiboa_converter import FiboaBaseConverter
119
@@ -22,6 +20,11 @@ def convert(
2220 original_geometries = False ,
2321 ** kwargs ,
2422 ) -> str :
23+ if geoparquet_version is not None :
24+ self .warning ("geoparquet_version is not supported for DuckDB-based converters and will always write GeoParquet v1.0" )
25+ if not original_geometries :
26+ self .warning ("original_geometries is not supported for DuckDB-based converters and will always write original geometries" )
27+
2528 self .variant = variant
2629 cid = self .id .strip ()
2730 if self .bbox is not None and len (self .bbox ) != 4 :
@@ -40,6 +43,15 @@ def convert(
4043 if urls is None :
4144 raise ValueError ("No input files provided" )
4245
46+ self .info ("Getting file(s) if not cached yet" )
47+ if cache :
48+ request_args = {}
49+ if self .avoid_range_request :
50+ request_args ["block_size" ] = 0
51+ urls = self .download_files (urls , cache , ** request_args )
52+ elif self .avoid_range_request :
53+ self .warning ("avoid_range_request is set, but cache is not used, so this setting has no effect" )
54+
4355 selections = []
4456 geom_column = None
4557 for k , v in self .columns .items ():
You can’t perform that action at this time.
0 commit comments