[GRASS-dev] [GRASS GIS] #2490: EPSG code not saved in PROJ_EPSG

#2490: EPSG code not saved in PROJ_EPSG
---------------------+------------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: unspecified
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
---------------------+------------------------------------------------------
from the ML

http://lists.osgeo.org/pipermail/grass-dev/2014-November/071807.html

{{{
> It is sometimes stored in the PROJ_INFO file.

in the recent versions of GRASS 7 it should be stored in PROJ_EPSG
file. If not than it's a bug.
}}}

tested here with

{{{
GRASS Version: 7.1.svn
GRASS SVN Revision: 62754
Erstellungsdatum: 2014-11-16
Build Platform: i686-pc-mingw32
GDAL/OGR: 1.11.0
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.7.17
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

location wizard -> create location by epsg code (e.g. 4326)

EPSG code is not saved in PROJ_EPSG

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
---------------------+------------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: unspecified
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hellik):

Changeset 49298:

Message:

     Retain EPSG code, if available, into a metadata file.

https://trac.osgeo.org/grass/changeset/49298

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------
Changes (by neteler):

  * priority: normal => major
  * version: unspecified => svn-releasebranch70
  * component: Default => Projections/Datums

Comment:

While at it, perhaps also generate a file "PROJ_TOWGS84" since the EPSG
number does not necessarily reflect that (e.g. in Italy with multiple
TOWGS84 parameters for a single code)?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------
Changes (by neteler):

  * keywords: => g.proj

Comment:

Replying to [comment:1 hellik]:
> r49298: Retain EPSG code, if available, into a metadata file.

This doesn't seem to work yet or the if() conditions are not fulfilled.

It would also cover the case of creating the Location from the startup
script as well as the location wizard since in Python g.proj is called
from there:

http://grass.osgeo.org/grass71/manuals/libpython/_modules/script/core.html#create_location

Yet the bug in g.proj is to be understood:
{{{
g.proj epsg=4326 location=mylatlong
}}}

--> no PROJ_EPSG generated as expected

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------

Comment(by martinl):

Replying to [comment:3 neteler]:

> Yet the bug in g.proj is to be understood:
{{{
> g.proj epsg=4326 location=mylatlong
}}}
>
> --> no PROJ_EPSG generated as expected

Please could you try r64258 (trunk)?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2490#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------

Comment(by martinl):

Replying to [comment:2 neteler]:
> While at it, perhaps also generate a file "PROJ_TOWGS84" since the EPSG
number does not necessarily reflect that (e.g. in Italy with multiple
TOWGS84 parameters for a single code)?

I think it's not needed since PROJ_INFO (which includes +towgs84) is
generated always.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: martinl
     Type: defect | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * owner: grass-dev@… => martinl
  * status: new => assigned

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: martinl
     Type: defect | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------

Comment(by neteler):

Replying to [comment:4 martinl]:
> Please could you try r64258 (trunk)?

Excellent, now it works. Please backport it.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2490#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: martinl
     Type: defect | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------

Comment(by martinl):

Replying to [comment:7 neteler]:

> Excellent, now it works. Please backport it.

Done in r64273. Testing welcomed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2490#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
--------------------------------+-------------------------------------------
Reporter: hellik | Owner: martinl
     Type: defect | Status: assigned
Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Keywords: g.proj | Platform: MSWindows 7
      Cpu: x86-64 |
--------------------------------+-------------------------------------------

Comment(by martinl):

Time to close this ticket?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2490#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#2490: EPSG code not saved in PROJ_EPSG
---------------------------------+------------------------------------------
  Reporter: hellik | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 7.0.0
Component: Projections/Datums | Version: svn-releasebranch70
Resolution: fixed | Keywords: g.proj
  Platform: MSWindows 7 | Cpu: x86-64
---------------------------------+------------------------------------------
Changes (by hellik):

  * status: assigned => closed
  * resolution: => fixed

Comment:

Replying to [comment:9 martinl]:
> Time to close this ticket?

tested here; it works.

thanks for fixing!

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2490#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>