You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by pa...@apache.org on 2025/11/26 22:06:20 UTC
(sedona-db) branch main updated: fix(python/sedonadb): Fix GDAL/OGR read on Windows (#371)
This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/main by this push:
new 90f29892 fix(python/sedonadb): Fix GDAL/OGR read on Windows (#371)
90f29892 is described below
commit 90f29892315b593dc4b6efd98e6b337ce5a271a4
Author: Dewey Dunnington <de...@dunnington.ca>
AuthorDate: Wed Nov 26 16:06:16 2025 -0600
fix(python/sedonadb): Fix GDAL/OGR read on Windows (#371)
---
python/sedonadb/python/sedonadb/datasource.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/python/sedonadb/python/sedonadb/datasource.py b/python/sedonadb/python/sedonadb/datasource.py
index ea9bdded..2171bedf 100644
--- a/python/sedonadb/python/sedonadb/datasource.py
+++ b/python/sedonadb/python/sedonadb/datasource.py
@@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
+import sys
from typing import Any, Mapping
from sedonadb._lib import PyExternalFormat, PyProjectedRecordBatchReader
@@ -133,8 +134,10 @@ class PyogrioFormatSpec(ExternalFormatSpec):
if url.startswith("http://") or url.startswith("https://"):
ogr_src = f"/vsicurl/{url}"
- elif url.startswith("file://"):
+ elif url.startswith("file://") and sys.platform != "win32":
ogr_src = url.removeprefix("file://")
+ elif url.startswith("file:///"):
+ ogr_src = url.removeprefix("file:///")
else:
raise ValueError(f"Can't open {url} with OGR")