[GRASS-dev] [GRASS GIS] #3037: r.import - output name should not be required with -e flag

#3037: r.import - output name should not be required with -e flag
-------------------------+-------------------------
Reporter: guano | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Keywords: import | CPU: Unspecified
Platform: All |
-------------------------+-------------------------
In r.import (import with reprojection), the -e flag should ignore if there
is an output name defined, much like the 'remove mask' option.

Also, the output name could be set to be the same as the input by default,
like in r.in.gdal.

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by annakrat):

Try r68466.

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by martinl):

Backport candidate?

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by annakrat):

Replying to [comment:2 martinl]:
> Backport candidate?

Yes, but someone please confirm it works first.

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by martinl):

Tested, seems to work.

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.3.0
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by martinl):

There is probably still a bug, when I run

{{{
r.import
in=/opt/geodata/piemont/landsat_4_5_7_8/LE71940292015195NSG00_sr_band5_piemont.tif
-e
}}}

in the location which match the input data, the resolution is not printed
and moreover output map (rimport_tmp) is not deleted.

{{{
r.import
in=/opt/geodata/piemont/landsat_4_5_7_8/LE71940292015195NSG00_sr_band5_piemont.tif
-e
Proceeding with import of 1 raster bands...
Importing raster map <rimport_tmp>...
0..3..100
}}}

{{{
g.list raster pat=rimport_tmp
rimport_tmp
}}}

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------
Changes (by martinl):

* milestone: 7.3.0 => 7.0.5

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.5
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by annakrat):

The question is what should the r.import do when no reprojection is needed
and user uses -e flag. Should the raster be imported, then we print its
resolution and delete it? That's probably consistent, but seems weird.

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.7
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by martinl):

Still relevant?

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

#3037: r.import - output name should not be required with -e flag
--------------------------+-------------------------
  Reporter: guano | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.6.2
Component: wxGUI | Version: 7.0.3
Resolution: | Keywords: import
       CPU: Unspecified | Platform: All
--------------------------+-------------------------
Changes (by martinl):

* milestone: 7.0.7 => 7.6.2

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