[GRASS-dev] r.unpack: unhelpful error message when projection info does not match
Markus Neteler
neteler at osgeo.org
Wed Feb 26 09:04:56 PST 2014
On Thu, Oct 10, 2013 at 8:09 AM, Markus Neteler <neteler at osgeo.org> wrote:
> Dear Anna,
>
> thank you, a lot of work for you!
... back to this topic, I would be happy to find a solution for US vs
UK English:
GRASS 7.0.svn (patUTM32):~ > r.unpack x60030_2000.green.histo2000_g.pack
WARNING: Difference between PROJ_INFO file of packed map and of current
location:
- name: Universal Transverse Mercator
? ^^
+ name: Universe Transverse Mercator
? ^
proj: utm
datum: wgs84
ellps: wgs84
zone: 32
no_defs: defined
WARNING: Difference between PROJ_UNITS file of packed map and of current
location:
- unit: metre
? -
+ unit: meter
? +
- units: metres
? -
+ units: meters
? +
meters: 1
ERROR: Projection information does not match. Aborting.
r.unpack calls the Python core function compare_key_value_text_files()
http://grass.osgeo.org/programming7/namespacepython_1_1script_1_1core.html#a3ad1670d5f7b4759935d4b38292fa7af
and then does the comparison key by key (so, it fails here).
I think that we need to polish the language differences in r.unpack
prior to the comparison. Maybe via lookup dictionary which can be
expanded in future when more cases come up?
Universe Transverse Mercator --> Universal Transverse Mercator
metre --> meter
metres --> meters
kilometre --> kilometre
kilometres --> kilometres
See also the corresponding C functions:
http://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/proj3.c?rev=58633#L48
The same fix would then be needed in v.unpack.
?
Markus
More information about the grass-dev
mailing list