[gdal-dev] The "Bertin 1953" projection
Nikos Alexandris
nik at nikosalexandris.net
Tue Nov 6 22:49:48 PST 2018
Nikos wrote:
>> the projection "Bertin 1953" was recently added in Proj4 [0]
>>
>> [0] https://github.com/OSGeo/proj.4/blob/master/src/PJ_bertin1953.c
>>
>> What would be the fastest way to try this out, except of compiling all
>> Proj4 and GDAL from source, then re-compile whatever tool uses GDAL
>> again?
Even:
>You just need to recompile PROJ.
>You can then use it in your existing GDAL (providing it links to the
>recompiled PROJ) with
>"+proj=bertin1953 +wktext"
>(the key is to add +wktext to the PROJ string)
Merci Even,
I compiled Proj.4 sourced from https://github.com/OSGeo/proj.4.git
(including wget
https://github.com/OSGeo/proj-datumgrid/archive/1.8.tar.gz in a
subdirectory, placed under the root directory of the above, named 'nad')
Confirming I do use "my" proj version (also, I removed the one available
in "my" distro's repository):
```
whereis proj
proj: /usr/local/bin/proj /usr/share/proj
```
and
```
proj --version
Rel. 6.0.0, March 1st, 2019
<proj>:
invalid option: --
program abnormally terminated
```
I can then list it:
```
proj -lp |grep bertin
bertin1953 : Bertin 1953
```
And query further:
```
proj -l=bertin1953
bertin1953 : Bertin 1953
Misc Sph no inv.
```
Then some tests to confirm(?) the definition is usable:
```
echo 12 55 0 0 | cct "+proj=bertin1953 +wktext"
-242763.3626 1451842.4684 0.0000 0.0000
```
and
```
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
```
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
```
Thank you, Nikos
--
Note, in https://trac.osgeo.org/gdal/wiki/FAQCoordinateSystemsAndProjections#WhatareWellKnownTextprojectionsandhowdoIusethem
there is a broken link (to): https://www.gdal.org/ogr/osr_tutorial.html
More information about the gdal-dev
mailing list