[GRASS-dev] [GRASS GIS] #3145: v.unpack: too sensitive to difference of names in projections

#3145: v.unpack: too sensitive to difference of names in projections
---------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.2.1
Component: Vector | Version: svn-trunk
Keywords: v.unpack projection | CPU: Unspecified
Platform: Unspecified |
---------------------------------+-------------------------
Trying to use v.unpack I got the following error:

{{{
ATTENTION: Difference between PROJ_INFO file of packed map and of current
            location:
            - name: Belge 1972 / Belgian Lambert 72
            + name: Lambert Conformal Conic
            + proj: lcc
            datum: bel72
            ellps: international
            - proj: lcc
            lat_1: 51.16666723333333
            lat_2: 49.8333339
            lat_0: 90
            lon_0: 4.367486666666666
            x_0: 150000.013
            y_0: 5400088.438
            no_defs: defined
}}}

AFAIU, the difference in position of "proj: lcc" is not the problem, it is
only the difference in projection names. Maybe v.unpack could/should
ignore a difference of names if all the other parameters are the same ?

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

#3145: v.unpack: too sensitive to difference of names in projections
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.1
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.unpack projection
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

Can you please attach the PROJ_INFO file? And, if known, the EPSG code?

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

#3145: v.unpack: too sensitive to difference of names in projections
--------------------------+---------------------------------
  Reporter: mlennert | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.2.1
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.unpack projection
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

Replying to [comment:1 neteler]:
> Can you please attach the PROJ_INFO file? And, if known, the EPSG code?

Sure, but I think the issue is a generic one, not specifically linked to
this case.

The PROJ_INFO of the .pack file corresponds to EPSG31370:

{{{
name: Belge 1972 / Belgian Lambert 72
datum: bel72
ellps: international
proj: lcc
lat_1: 51.16666723333333
lat_2: 49.8333339
lat_0: 90
lon_0: 4.367486666666666
x_0: 150000.013
y_0: 5400088.438
no_defs: defined
}}}

And here's the PROJ_INFO file of the location:

{{{
name: Lambert Conformal Conic
proj: lcc
datum: bel72
ellps: international
lat_1: 51.16666723333333
lat_2: 49.8333339
lat_0: 90
lon_0: 4.367486666666666
x_0: 150000.013
y_0: 5400088.438
no_defs: defined
}}}

I don't remember how this location was created (based on a file, perhaps),
but as you can see the parameters are strictly identical, it's just the
name that differs.

v.unpack uses compare_key_value_text_files from lib/python/script/core.py.
Maybe a solution would be to add to that function a list of keys to skip
and then v.unpack could add 'name' as a key to skip. Thus, if all other
parameters are equal the projection test wouldn't fail.

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