[gdal-dev] The "Bertin 1953" projection
Nikos Alexandris
nik at nikosalexandris.net
Wed Nov 14 02:52:36 PST 2018
* Nikos Alexandris <nik at nikosalexandris.net> [2018-11-14 02:27:29 +0100]:
>* Even Rouault <even.rouault at spatialys.com> [2018-11-07 12:10:19 +0100]:
>
>>>```
>>>echo 12 55 0 0 | proj "+proj=bertin1953 +wktext"
>>>Rel. 6.0.0, March 1st, 2019
>>><proj>:
>>>projection initialization failure
>>>cause: unknown projection id
>>>program abnormally terminated
>>>```
>>
>>'proj' syntax is without quoting. And you only need +wktext for GDAL, not for
>>PROJ utilities
>>
>>>
>>>or using the following map
>>>```
>>>file TM_WORLD_BORDERS_SIMPL-0.3.shp
>>>TM_WORLD_BORDERS_SIMPL-0.3.shp: ESRI Shapefile version 1000 length 224094
>>>type Polygon ```
>>>`ogr2ogr` segfaults:
>>>```
>>>ogr2ogr -t_srs "+proj=bertin1953 +wktext"
>>>TM_WORLD_BORDERS_SIMPL-0.3_Bertin1953.shp TM_WORLD_BORDERS_SIMPL-0.3.shp
>>>ERROR 6: Failed to initialize PROJ.4 with `+proj=bertin1953 +wktext'.
>>>Segmentation fault
>>>```
>>>
>>
>>It is likely you have an issue with GDAL linking also against your system
>>PROJ. Has it been compiled --with-static-proj / --with-proj or not ? Check
>>with ldd which libproj libgdal links against. You may need to adjust your
>>LD_LIBRARY_PATH and potentially create a symbolic link from the new
>>libproj.so.xxxx to the name of the old libproj.so.yyyyy so that GDAL sees one
>>and one single libproj.
>
>By the way, are there any notes on LD_LIBRARY_PATH? I mean, with respect to
>GDAL/OGR and Proj4.
I still can't make sense of it. While I also posted about this (and some
related stuff) on the forums of the Linux distribution I use [0],
here some overview:
Paths:
```
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
ldconfig
echo $LD_LIBRARY_PATH
/lib:/usr/lib:/usr/local/lib
```
PROJ is there:
```
ldd /usr/local/bin/proj
linux-vdso.so.1 (0x00007ffcf57da000)
libproj.so.13 => /usr/local/lib/libproj.so.13 (0x00007f2f0e5c0000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f2f0e3a0000)
libm.so.6 => /lib/libm.so.6 (0x00007f2f0e05e000)
libc.so.6 => /lib/libc.so.6 (0x00007f2f0dc9a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2f0e836000)
```
Berting is there:
```
proj -l=bertin1953
bertin1953 : Bertin 1953
Misc Sph no inv.
proj -lp |grep bertin
bertin1953 : Bertin 1953
```
OGR sees nothing:
```
ldd /usr/bin/ogrinfo |grep proj
```
So, `ogr2ogr` fails to pick up "Bertin 1953":
```
ogr2ogr -t_srs +proj=bertin1953 TM_WORLD_BORDERS_SIMPL-0.3_Bertin1953.shp TM_WORLD_BORDERS_SIMPL-0.3.shp
ERROR 1: Failed to process SRS definition: +proj=bertin1953
```
How to do you say "hey GDAL/OGR, pick this libproj.so up"? Is this
https://trac.osgeo.org/gdal/wiki/ConfigOptions#PROJSO relevant at
run-time?
I tried to set PROJSO to point to `/usr/local/lib64/libproj.so` but does
not help.
(
I wonder if this wouldn't be just easier to solve with a docker image.
)
Nikos
[0] https://forums.funtoo.org/topic/1844-using-latest-proj-from-its-source-and-some-generic-questions-on-build-logs/?page=0#comment-8757
More information about the gdal-dev
mailing list