Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-10-12 Thread Jonathan Moules via gdal-dev
al-dev Puolesta >> Jonathan Moules via gdal-dev >> Lähetetty: torstai 28. syyskuuta 2023 14.10 >> Vastaanottaja: gdal-dev@lists.osgeo.org; Even Rouault >> >> Aihe: Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles >>

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-10-12 Thread Javier Jimenez Shaw via gdal-dev
add that environment if they do not know that they > >> do not belong to "most users" > >> https://proj.org/en/9.3/usage/environmentvars.html > >> > >> -Jukka Rahkonen- > >> > >> -Alkuperäinen viesti- > >> Lä

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-10-11 Thread Jonathan Moules via gdal-dev
rg/en/9.3/usage/environmentvars.html -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: gdal-dev Puolesta Jonathan Moules via gdal-dev Lähetetty: torstai 28. syyskuuta 2023 14.10 Vastaanottaja: gdal-dev@lists.osgeo.org; Even Rouault Aihe: Re: [gdal-dev] layer.GetSpatialRef() fails on

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-28 Thread Jonathan Moules via gdal-dev
Jonathan Moules via gdal-dev Lähetetty: torstai 28. syyskuuta 2023 14.10 Vastaanottaja: gdal-dev@lists.osgeo.org; Even Rouault Aihe: Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles Hi Even, The colleague doesn't have either a PROJ_LIB or a PROJ_DATA environment variable.

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-28 Thread Rahkonen Jukka via gdal-dev
syyskuuta 2023 14.10 Vastaanottaja: gdal-dev@lists.osgeo.org; Even Rouault Aihe: Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles Hi Even, The colleague doesn't have either a PROJ_LIB or a PROJ_DATA environment variable. I asked another colleague to try it; they're

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-28 Thread Jonathan Moules via gdal-dev
Hi Even, The colleague doesn't have either a PROJ_LIB or a PROJ_DATA environment variable. I asked another colleague to try it; they're on Ubuntu 20.04, and it worked for them. I believe using the same setup instructions. Cheers, Jonathan On 2023-09-24 22:37, Jonathan Moules via gdal-dev

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-24 Thread Jan Heckman via gdal-dev
That's clear. However, environmental means SET in one environment, and EXPORT in the other. Sorry for the pun, but I expect Windows and Linux settings/exports for GDAL should be fairly similar. So the environments might be the next step to communicate, if I'm not mistaken at root. On Sun, Sep 24,

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-24 Thread Jonathan Moules via gdal-dev
This applies to *all* shapefiles for that user. There are about 10 in the sample and they're from a diverse range of UK organisations. Mostly 27700 (British National Grid), but likely one or two WGS84. Hence thinking it may be environmental, but I don't have any real *nix knowledge to use to di

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-24 Thread Jan Heckman via gdal-dev
Sorry to break in, but surely, we would like to see the .prj file in question for a simple try at reproducing? On Sun, Sep 24, 2023 at 11:37 PM Jonathan Moules via gdal-dev < gdal-dev@lists.osgeo.org> wrote: > Thanks Even. I don't have access to the machine either as the colleague > is moving to

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-24 Thread Jonathan Moules via gdal-dev
Thanks Even. I don't have access to the machine either as the colleague is moving to another project. I'll have to see if it fails for another *nix user. On 2023-09-24 22:35, Even Rouault wrote: Le 24/09/2023 à 23:22, Jonathan Moules via gdal-dev a écrit : > Also check if the environment is

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-24 Thread Even Rouault via gdal-dev
Le 24/09/2023 à 23:22, Jonathan Moules via gdal-dev a écrit : > Also check if the environment isn't messed up regarding PROJ and the PROJ_LIB/PROJ_DATA environment variable Thanks Even; sorry, what does this line mean? I'm guessing you're referring to: https://proj.org/en/9.3/usage/environm

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-24 Thread Jonathan Moules via gdal-dev
> Also check if the environment isn't messed up regarding PROJ and the PROJ_LIB/PROJ_DATA environment variable Thanks Even; sorry, what does this line mean? I'm guessing you're referring to: https://proj.org/en/9.3/usage/environmentvars.html - what would a "messed up" one look like? Thanks,

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-22 Thread Jonathan Moules via gdal-dev
Tested against the following data types (OGR and GDAL): GeoJSON, KML, KMZ, Shapefile, ECW, IMG, TIF, GML, ASC, Geopackage, NetCDF. Only the shapefile fails. On 21/09/2023 13:34, Jonathan Moules wrote: Yeah, I'm afraid the error message is pretty much non-existent: Traceback (most recent

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-21 Thread Even Rouault via gdal-dev
Run ogrinfo on one shapefile to see if some more interesting error message is displayed Also check if the environment isn't messed up regarding PROJ and the PROJ_LIB/PROJ_DATA environment variable Le 21/09/2023 à 14:34, Jonathan Moules via gdal-dev a écrit : Yeah, I'm afraid the error messa

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-21 Thread Jonathan Moules via gdal-dev
Yeah, I'm afraid the error message is pretty much non-existent: Traceback (most recent call last):   File "/home/name/Code/DSHub/PoC/Extract-Transform-Load-POC/Metadata/AME/src/info_vector.py", line 119, in get_layer_metadata     tmp_projection = layer.GetSpatialRef()   

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-18 Thread Jonathan Moules
Hi Javier, I don't recall there being any exception message exposed. It was simply a RuntimeError. I guessed it's probably installation/configuration, but surely GDAL should Just Work? Especially if it's coming via Conda? (I don't live in the Linux world; I just used a wheel). Cheers, Jon

Re: [gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-18 Thread Javier Jimenez Shaw
Hi Jonathan Which exact RuntimeError are you getting? It can be for several reasons (probably an installation or configuration issue). Best, Javier On Mon, 18 Sept 2023 at 11:06, Jonathan Moules wrote: > Hi List, > > I'm trying to get vector layer information via OGR and Python: > > ``` > > l

[gdal-dev] layer.GetSpatialRef() fails on linux for shapefiles

2023-09-18 Thread Jonathan Moules
Hi List, I'm trying to get vector layer information via OGR and Python: ``` layer.GetSpatialRef() ``` This works fine for me on Windows with GDAL 3.7.1 on various different types of files (Shapefile, GPKG, GML, KML, GDB). But for my colleague on Ubuntu 22.0.4.3, also on GDAL 3.7.1 (via Con