[GRASS-dev] nad grids storage

Dear grass devs and users,
sorry for digging up this pretty old topic. It was about the end of my
initial message, see bellow (perhaps should I have opened a ticket for
it)

The question was : is it possible to add the french nad grid to grids
provided by default in grass directories ?
Everytime I completely rebuild grass (after a make distclean) I have to
manually copy the ntf_r93.gsb file
into /usr/local/grass-XX.svn/etc/proj/nad/

It would be nice that grass sources included this nad grid ; here in
France it is fundamental whenever you need to switch between various
geodetic systems (ntf and rgf93).

Bye,
Vincent.

Le jeudi 21 février 2013 à 18:28 +0100, Vincent Bain a écrit :

Hi,
while discussing with S. Turek about r.in.wms coping with french
projection systems, I tested a dataset within grass70. Used to working
with grass64 I store the french nadgrid (ntf_r93.gsb)
in /usr/share/proj/ directory, making a symlink
here: /usr/lib/grass64/etc/nad/
On my local system I noticed for grass70 the grid is taken into account
if stored here:
/usr/local/grass-7.0.svn/etc/proj/nad/

I am wondering :
- if these multiple locations for a single file are necessary;
- if they are correct for each version of grass I use;
- if it is worth adding the french grid to grids provided by default in
grass.

Vincent.

On Sun, Aug 18, 2013 at 10:55 AM, Vincent Bain <bain@toraval.fr> wrote:

Dear grass devs and users,
sorry for digging up this pretty old topic. It was about the end of my
initial message, see bellow (perhaps should I have opened a ticket for
it)

Yes, perhaps that's needed.

The question was : is it possible to add the french nad grid to grids
provided by default in grass directories ?
Everytime I completely rebuild grass (after a make distclean) I have to
manually copy the ntf_r93.gsb file
into /usr/local/grass-XX.svn/etc/proj/nad/

The file comes with PROJ.4 - on my Fedora box here:

/usr/share/proj/ntf_r93.gsb

We should figure out why it isn't used in your case.

I observe that we still have the unsolved issue of using our "private"
copy of these files:

[neteler@oboe proj]$ ls -la WO*
-rw-r--r--. 1 neteler gis 14111 Nov 25 2008 WO.lla

[neteler@oboe proj]$ ls -la /usr/share/proj/WO*
-rw-r--r--. 1 root root 11112 Feb 17 18:27 /usr/share/proj/WO

[neteler@oboe proj]$ file WO*
WO.lla: ASCII text

[neteler@oboe proj]$ file /usr/share/proj/WO*
/usr/share/proj/WO: data

... but with the date of 2008 and no more updates since then. I
remember discussions about this some years ago.

Due to changes in PROJ.4 we could no longer simply copy over the files.
Now, it is time to revisit the mechanism and get rid of these copied
files in favour of using those from PROJ.4.

Thoughts?

Markus

Hello Markus,
thank you for the information,

all in all, IIUC this is basically a question of integrity of register
files. It sounds better that grass relies on PROJ.4 updates to handle
the correct files.

In my case PROJ.4 also provides the grid in /usr/share/proj, but it
seems not to be enough. When a projection is supposed to use the grid
(i.e. between two distinct geodetic systems), it is simply ignored if
absent from /usr/local/grass-XX.svn/etc/proj/nad/

This happens on correctly defined projection systems, for example I have
a location named L2e (Lambert II étendu), whith this PROJ_INFO file :
        
        name: Lambert Conformal Conic
        proj: lcc
        ellps: clark80IGN
        lat_1: 46.8
        lat_0: 46.8
        lon_0: 0
        k_0: 0.99987742
        x_0: 600000
        y_0: 2200000
        towgs84: -168,-60,320,0,0,0,0
        pm: paris
        no_defs: defined
        nadgrids:ntf_r93.gsb,null

On the other hand, I use a custom script to retrieve raster data from
the IGN wmts server. It is based on cs2cs and gdal_translate commands :
I noticed the issue is the same.

Bye,
Vincent

Le dimanche 18 août 2013 à 23:59 +0200, Markus Neteler a écrit :

On Sun, Aug 18, 2013 at 10:55 AM, Vincent Bain <bain@toraval.fr> wrote:
> Dear grass devs and users,
> sorry for digging up this pretty old topic. It was about the end of my
> initial message, see bellow (perhaps should I have opened a ticket for
> it)

Yes, perhaps that's needed.

> The question was : is it possible to add the french nad grid to grids
> provided by default in grass directories ?
> Everytime I completely rebuild grass (after a make distclean) I have to
> manually copy the ntf_r93.gsb file
> into /usr/local/grass-XX.svn/etc/proj/nad/

The file comes with PROJ.4 - on my Fedora box here:

/usr/share/proj/ntf_r93.gsb

We should figure out why it isn't used in your case.

I observe that we still have the unsolved issue of using our "private"
copy of these files:

[neteler@oboe proj]$ ls -la WO*
-rw-r--r--. 1 neteler gis 14111 Nov 25 2008 WO.lla

[neteler@oboe proj]$ ls -la /usr/share/proj/WO*
-rw-r--r--. 1 root root 11112 Feb 17 18:27 /usr/share/proj/WO

[neteler@oboe proj]$ file WO*
WO.lla: ASCII text

[neteler@oboe proj]$ file /usr/share/proj/WO*
/usr/share/proj/WO: data

... but with the date of 2008 and no more updates since then. I
remember discussions about this some years ago.

Due to changes in PROJ.4 we could no longer simply copy over the files.
Now, it is time to revisit the mechanism and get rid of these copied
files in favour of using those from PROJ.4.

Thoughts?

Markus