Opened 6 years ago

Closed 6 years ago

#2490 closed defect (fixed)

EPSG code not saved in PROJ_EPSG

Reported by: hellik Owned by: martinl
Priority: major Milestone: 7.0.0
Component: Projections/Datums Version: svn-releasebranch70
Keywords: g.proj Cc: grass-dev@…
CPU: x86-64 Platform: MSWindows 7

Description

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

Change History (10)

comment:1 Changed 6 years ago by hellik

Changeset 49298:

Message:

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

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

comment:2 Changed 6 years ago by neteler

Component: DefaultProjections/Datums
Priority: normalmajor
Version: unspecifiedsvn-releasebranch70

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)?

comment:3 in reply to:  1 ; Changed 6 years ago by neteler

Keywords: g.proj added

Replying to 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

comment:4 in reply to:  3 ; Changed 6 years ago by martinl

Replying to 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)?

comment:5 in reply to:  2 Changed 6 years ago by martinl

Replying to 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.

comment:6 Changed 6 years ago by martinl

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:7 in reply to:  4 ; Changed 6 years ago by neteler

Replying to martinl:

Please could you try r64258 (trunk)?

Excellent, now it works. Please backport it.

comment:8 in reply to:  7 Changed 6 years ago by martinl

Replying to neteler:

Excellent, now it works. Please backport it.

Done in r64273. Testing welcomed.

comment:9 Changed 6 years ago by martinl

Time to close this ticket?

comment:10 in reply to:  9 Changed 6 years ago by hellik

Resolution: fixed
Status: assignedclosed

Replying to martinl:

Time to close this ticket?

tested here; it works.

thanks for fixing!

Note: See TracTickets for help on using tickets.