#2368: Python version of r.grow does not support shrinking
-------------------------+-------------------------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: | Status: new
enhancement |
Priority: minor | Milestone: 7.2.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.grow, r.grow.distance, r.buffer,
CPU: | r.buffer.lowmem
Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Comment (by hellik):
Replying to [comment:10 neteler]:
> Just tested r.grow with a negative radius and the following error
occurs:
> {{{
> # NC sample dataset
> v.in.region box
> v.to.rast input=box output=box use=val val=1
>
> r.grow input=box output=box_shrink radius=-20.01
> Reading raster map <box>...
> 100%
> Writing output raster maps...
> 100%
> ERROR 1: PredictorSetup:Horizontal differencing "Predictor" not
supported with 64-bit samples
> ERROR 1: PredictorSetup:Horizontal differencing "Predictor" not
supported with 64-bit samples
> ERROR 1: PredictorSetup:Horizontal differencing "Predictor" not
supported with 64-bit samples
> ERROR 1: PredictorSetup:Horizontal differencing "Predictor" not
supported with 64-bit samples
> 100%
> ERROR 1: PredictorSetup:Horizontal differencing "Predictor" not
supported with 64-bit samples
> ERROR 1: PredictorSetup:Horizontal differencing "Predictor" not
supported with 64-bit samples
> Color table for raster map <box_shrink> set to 'box'
> }}}
tested your example by
{{{
System Info
GRASS Version: 7.3.svn
GRASS SVN revision: r69040
Build date: 2016-07-29
Build platform: x86_64-w64-mingw32
GDAL: 2.1.0
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.7.17
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200 (OSGeo4W)
}}}
{{{
r.grow --verbose input=rbox@user1 output=rbox_shrink2 radius=-500.1
Lese Rasterkarte <rbox@user1> ...
Schreibe Ausgabe-Rasterkarten...
Color table for raster map <rbox_shrink2> set to 'rbox@user1'
}}}
result raster is the same as the input raster, but no shrinking
{{{
r.info map=rbox@user1
+----------------------------------------------------------------------------+
| Map: rbox@user1 Date: Sat Aug 06 21:16:35 2016
|
| Mapset: user1 Login of Creator: hkmyr
|
| Location: nc_spm_08_grass7
|
| DataBase: D:\grassdata
|
| Title: Rasterized vector map from values
|
| Timestamp: none
|
|----------------------------------------------------------------------------|
|
|
| Type of Map: raster Number of Categories: 1
|
| Data Type: CELL
|
| Rows: 1350
|
| Columns: 1500
|
| Total Cells: 2025000
|
| Projection: Lambert Conformal Conic
|
| N: 228500 S: 215000 Res: 10
|
| E: 645000 W: 630000 Res: 10
|
| Range of data: min = 1 max = 1
|
|
|
| Data Source:
|
| Vector Map: box@user1
|
| Original scale from vector map: 1:1
|
|
|
| Data Description:
|
| generated by v.to.rast
|
|
|
| Comments:
|
| v.to.rast input="box@user1" layer="1" type="point,line,area"
output=\ |
| "rbox" use="val" value=1 memory=300
|
|
|
+----------------------------------------------------------------------------+
(Sat Aug 06 21:22:58 2016) Befehl ausgeführt (0 Sek)
(Sat Aug 06 21:23:06 2016)
r.info map=rbox_shrink2@user1
+----------------------------------------------------------------------------+
| Map: rbox_shrink2@user1 Date: Sat Aug 06 21:19:58 2016
|
| Mapset: user1 Login of Creator: hkmyr
|
| Location: nc_spm_08_grass7
|
| DataBase: D:\grassdata
|
| Title: rbox_shrink2
|
| Timestamp: none
|
|----------------------------------------------------------------------------|
|
|
| Type of Map: raster Number of Categories: 0
|
| Data Type: DCELL
|
| Rows: 1350
|
| Columns: 1500
|
| Total Cells: 2025000
|
| Projection: Lambert Conformal Conic
|
| N: 228500 S: 215000 Res: 10
|
| E: 645000 W: 630000 Res: 10
|
| Range of data: min = 1 max = 1
|
|
|
| Data Description:
|
| generated by r.mapcalc
|
|
|
| Comments:
|
| if(!isnull(rbox@user1), rbox@user1, if(r.grow.tmp.7272.dist <
|
| 25010001, r.grow.tmp.7272.val, null()))
|
| r.grow.py "--verbose" "input=rbox@user1" "output=rbox_shrink2"
"radius= |
| -500.1"
|
|
|
+----------------------------------------------------------------------------+
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2368#comment:11>
GRASS GIS <https://grass.osgeo.org>