<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Tested against the following data types (OGR and GDAL):</p>
<p>GeoJSON, KML, KMZ, Shapefile, ECW, IMG, TIF, GML, ASC,
Geopackage, NetCDF.</p>
<p>Only the shapefile fails.</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 21/09/2023 13:34, Jonathan Moules
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:cf918bd7-29bb-2dcf-243b-ff7882f052c0@lightpear.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Yeah, I'm afraid the error message is pretty much non-existent:</p>
<blockquote>Traceback (most recent call last):<br>
File
"/home/name/Code/DSHub/PoC/Extract-Transform-Load-POC/Metadata/AME/src/info_vector.py",
line 119, in get_layer_metadata<br>
tmp_projection = layer.GetSpatialRef()<br>
^^^^^^^^^^^^^^^^^^^^^<br>
File
"/home/name/anaconda3/envs/AME_env/lib/python3.11/site-packages/osgeo/ogr.py",
line 1990, in GetSpatialRef<br>
return _ogr.Layer_GetSpatialRef(self, *args)<br>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
RuntimeError</blockquote>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal">Suggestions welcome.</p>
<p class="MsoNormal"><br>
</p>
<div class="moz-cite-prefix">On 18/09/2023 12:51, Javier Jimenez
Shaw wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKsLXou+m5mU3wOPm68C==bXKoC5N9vbBXvRGMGZdu=e1w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div>Hi Jonathan</div>
<div><br>
</div>
<div>Which exact RuntimeError are you getting? It can be for
several reasons (probably an installation or configuration
issue).</div>
<div><br>
</div>
<div>Best,</div>
<div>Javier<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, 18 Sept 2023 at
11:06, Jonathan Moules <<a
href="mailto:jonathan-lists@lightpear.com"
moz-do-not-send="true" class="moz-txt-link-freetext">jonathan-lists@lightpear.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi List,<br>
<br>
I'm trying to get vector layer information via OGR and
Python:<br>
<br>
```<br>
<br>
layer.GetSpatialRef()<br>
<br>
```<br>
<br>
This works fine for me on Windows with GDAL 3.7.1 on various
different <br>
types of files (Shapefile, GPKG, GML, KML, GDB).<br>
<br>
But for my colleague on Ubuntu 22.0.4.3, also on GDAL 3.7.1
(via Conda), <br>
they get a Python RuntimeError for all shapefiles (the exact
same <br>
shapefiles that work fine for me). It works for Geopackages
for them.<br>
<br>
Anyone have any thoughts?<br>
Thanks,<br>
Jonathan<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
</blockquote>
</blockquote>
</body>
</html>