[GRASS-user] d.rast.edit with multiple maps

I’m not at my GRASS, isn’t there a small dropdown menue to choose the raster?

This wxGUI tool is nice to change pixels or small areas in a raster.

To change larger areas in a raster, there may be other workflows.

E.g. build contour lines, select the appropriate which delineate :+/- your hill, build an area from the contour line to have the footprint of the hill, then rasterize this area with the same heigth and r.patch it back to your DEM or interpolate it with the appropriate tool as you already mentioned.

HTH

Kind regards
Helmut

···

On Sun, Aug 20, 2017 at 1:46 PM, Ken Mankoff <mankoff@gmail.com> wrote:

On Sun, Aug 20, 2017 at 1:23 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

[please keep conversation on the ML, that other can benefit ]

Yes of course. For some reason GMail defaulted to “reply” instead of “reply to all”

I’m using GRASS on the CLI

How will you do visually raster editing on the CLI?

I typically call d.rast and d.vect and etc. from the CLI, and when first trying d.rast.edit did that from CLI too. Yes those commands do bring up a window. Thanks for your advice below, I will look into the larger GRASS wxGUI for the transparency.

Anyway, I expect this will help, but may not be a complete solution… I’d like to be able to examine multiple rasters while editing 1 (or >1). Something like g.gui.mapswipe, but with more linked maps, would be good. It seems this needs to be a custom tool I write, perhaps using the Python API.

Thanks again for the hint about transparency,

-k.

Hi Again,

I apologize in advance for the numerous questions. Is there any documentation I’m missing?

···

On Sun, Aug 20, 2017 at 4:52 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

I’m not at my GRASS, isn’t there a small dropdown menue to choose the raster?

Not on OS X. The toolbar has a lot more going on when I install GRASS in a Linux VM.

I nowe select a map from the dropdown, set the “Cell value:” to 9999, “Width:” to 30 (the resolution of the map), and select the point option, click 3x (3 green “+”'s appear), and then save the raster. If I then inspect it with “r.info”, it appears to be a new raster created by this tool (based on the “Comments” section), but the max is not 9999:

r.info DEM
±---------------------------------------------------------------------------+
| Range of data: min = 341 max = 589 |
| |
| Data Description: |
| generated by r.patch |
| |
| Comments: |
| r.patch --overwrite --quiet input=“xceebb34b,DEM_backupcopy_10405” o\ |
| utput=“DEM@DEM” |
±---------------------------------------------------------------------------+

If I repeat with the area tool instead of the point tool, and select ~10x10 area on a small raster (the region is only 80x50), when I save it it says “rasterizing…” for ~10 minutes and nothing appears to be happening.

-k.

Not on OS X. The toolbar has a lot more going on when I install >GRASS in a

Linux VM.

Please report it as a ticket if needed.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/d-rast-edit-with-multiple-maps-tp5331874p5331932.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hi Helmut,

I will report a bug.

I have had some success digitizing a vector. That tool is documented and appears to work. I think I will make a vector area around the hill and use that to remove it.

Thanks for the help today,

-k.

···

On Sun, Aug 20, 2017 at 5:42 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Not on OS X. The toolbar has a lot more going on when I install >GRASS in a
Linux VM.

Please report it as a ticket if needed.


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabble.com/d-rast-edit-with-multiple-maps-tp5331874p5331932.html

Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Ken Mankoff wrote

I nowe select a map from the dropdown, set the "Cell value:" to 9999,
"Width:" to 30 (the resolution of the map), and select the point option,
click 3x (3 green "+"'s appear), and then save the raster. If I then
inspect it with "r.info", it appears to be a new raster created by this
tool (based on the "Comments" section), but the max is not 9999:

r.info DEM

+----------------------------------------------------------------------------+
| Range of data: min = 341 max = 589
  |
|
   |
| Data Description:
   |
| generated by r.patch
   |
|
   |
| Comments:
   |
| r.patch --overwrite --quiet input="xceebb34b,DEM_backupcopy_10405"
o\
  |
| utput="DEM@DEM"
  |

+----------------------------------------------------------------------------+

If I repeat with the area tool instead of the point tool, and select
~10x10
area on a small raster (the region is only 80x50), when I save it it says
"rasterizing..." for ~10 minutes and nothing appears to be happening.

now tested it with

System Info
GRASS version: 7.3.svn
GRASS SVN revision: r71404
Build date: 2017-08-15
Build platform: i386-w64-mingw32
GDAL: 2.2.1
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.17.0
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)

on a very old windows box with the NC sample data set

g.region -p -a raster=elevation@PERMANENT align=elevation@PERMANENT
r.surf.random output=rrandom

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 99.9999642372131

after editing with cell value 9999 in the wxGUI

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 99.9999642372131
r.patch --overwrite --quiet input="x6cd2d029,rrandom_backupcopy_2220"
output="rrandom@user1"

I've experienced the same behaviour like you at the first step.

but in a second test:

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 888888888
r.patch --overwrite --quiet input="x0738b000,rrandom_backupcopy_2220\"
output="rrandom@user1"

it seems to be a chronological matter of when you enter the cell value and
press the area/line/point button.

it works, at least here, when I enter first the cell value, than choose
area/line/point button, and then beginn to edit.

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/d-rast-edit-with-multiple-maps-tp5331874p5331935.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Sun, Aug 20, 2017 at 12:32 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Ken Mankoff wrote

I nowe select a map from the dropdown, set the "Cell value:" to 9999,
"Width:" to 30 (the resolution of the map), and select the point option,
click 3x (3 green "+"'s appear), and then save the raster. If I then
inspect it with "r.info", it appears to be a new raster created by this
tool (based on the "Comments" section), but the max is not 9999:

r.info DEM

+----------------------------------------------------------------------------+
| Range of data: min = 341 max = 589
  |
|
   |
| Data Description:
   |
| generated by r.patch
   |
|
   |
| Comments:
   |
| r.patch --overwrite --quiet input="xceebb34b,DEM_backupcopy_10405"
o\
  |
| utput="DEM@DEM"
  |

+----------------------------------------------------------------------------+

If I repeat with the area tool instead of the point tool, and select
~10x10
area on a small raster (the region is only 80x50), when I save it it says
"rasterizing..." for ~10 minutes and nothing appears to be happening.

now tested it with

System Info
GRASS version: 7.3.svn
GRASS SVN revision: r71404
Build date: 2017-08-15
Build platform: i386-w64-mingw32
GDAL: 2.2.1
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.17.0
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)

on a very old windows box with the NC sample data set

g.region -p -a raster=elevation@PERMANENT align=elevation@PERMANENT
r.surf.random output=rrandom

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 99.9999642372131

after editing with cell value 9999 in the wxGUI

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 99.9999642372131
r.patch --overwrite --quiet input="x6cd2d029,rrandom_backupcopy_2220"
output="rrandom@user1"

I've experienced the same behaviour like you at the first step.

but in a second test:

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 888888888
r.patch --overwrite --quiet input="x0738b000,rrandom_backupcopy_2220\"
output="rrandom@user1"

it seems to be a chronological matter of when you enter the cell value and
press the area/line/point button.

it works, at least here, when I enter first the cell value, than choose
area/line/point button, and then beginn to edit.

Hi,

yes, you first select the value you want to change and then draw
polygons/lines/points and right click to confirm. The width is useful
mostly for drawing lines and points. The rasterization process can
take little bit more time than one would expect, because it calls
r.in.poly several times, but at least it should be more stable than
the vector digitizer (not crashing the gui), because it doesn't use
ctypes. It works actually quite well if you know how to use it but I
unfortunately haven't added the manual yet... Will try to fix that.
It should work on Linux and Windows, I know about the problem on Mac,
but it was not super easy to fix when I looked at it some time ago.

Anna

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/d-rast-edit-with-multiple-maps-tp5331874p5331935.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Hi,

My solution was to export the relevant image and stream network to Google Earth, draw lines there, import the KML of the lines, and use them to raise/lower the raster.
GE is a fairly good interface for drawing vector lines.

I’m switching to Linux soon so in the future I may do this entirely in GRASS.

Thanks,

-k.

···

On Sun, Aug 20, 2017 at 10:48 PM, Anna Petrášová <kratochanna@gmail.com> wrote:

On Sun, Aug 20, 2017 at 12:32 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Ken Mankoff wrote

I nowe select a map from the dropdown, set the “Cell value:” to 9999,
“Width:” to 30 (the resolution of the map), and select the point option,
click 3x (3 green “+”'s appear), and then save the raster. If I then
inspect it with “r.info”, it appears to be a new raster created by this
tool (based on the “Comments” section), but the max is not 9999:

r.info DEM

±---------------------------------------------------------------------------+
| Range of data: min = 341 max = 589
|
|
|
| Data Description:
|
| generated by r.patch
|
|
|
| Comments:
|
| r.patch --overwrite --quiet input=“xceebb34b,DEM_backupcopy_10405”
o
|
| utput=“DEM@DEM”
|

±---------------------------------------------------------------------------+

If I repeat with the area tool instead of the point tool, and select
~10x10
area on a small raster (the region is only 80x50), when I save it it says
“rasterizing…” for ~10 minutes and nothing appears to be happening.

now tested it with

System Info
GRASS version: 7.3.svn
GRASS SVN revision: r71404
Build date: 2017-08-15
Build platform: i386-w64-mingw32
GDAL: 2.2.1
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.17.0
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)

on a very old windows box with the NC sample data set

g.region -p -a raster=elevation@PERMANENT align=elevation@PERMANENT
r.surf.random output=rrandom

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 99.9999642372131

after editing with cell value 9999 in the wxGUI

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 99.9999642372131
r.patch --overwrite --quiet input=“x6cd2d029,rrandom_backupcopy_2220”
output=“rrandom@user1”

I’ve experienced the same behaviour like you at the first step.

but in a second test:

r.info map=rrandom@user1
Range of data: min = 1.65429668186334e-005 max = 888888888
r.patch --overwrite --quiet input="x0738b000,rrandom_backupcopy_2220"
output=“rrandom@user1”

it seems to be a chronological matter of when you enter the cell value and
press the area/line/point button.

it works, at least here, when I enter first the cell value, than choose
area/line/point button, and then beginn to edit.

Hi,

yes, you first select the value you want to change and then draw
polygons/lines/points and right click to confirm. The width is useful
mostly for drawing lines and points. The rasterization process can
take little bit more time than one would expect, because it calls
r.in.poly several times, but at least it should be more stable than
the vector digitizer (not crashing the gui), because it doesn’t use
ctypes. It works actually quite well if you know how to use it but I
unfortunately haven’t added the manual yet… Will try to fix that.
It should work on Linux and Windows, I know about the problem on Mac,
but it was not super easy to fix when I looked at it some time ago.

Anna


best regards
Helmut

View this message in context: http://osgeo-org.1560.x6.nabble.com/d-rast-edit-with-multiple-maps-tp5331874p5331935.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user