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
>>
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ä
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
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.
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
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
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,
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
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
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
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
> 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,
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
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
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()
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
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
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
18 matches
Mail list logo