[R-sig-Geo] saga grid_gridding problem

Francisco Alonso Sarria alonsarp at um.es
Fri Apr 2 11:22:12 CEST 2010


Hi:

I'm begining to work with rsaga and saga compiled on ubuntu linux and  
I have  problems when I want to generate a grid from a point file (by  
the way is the example  of section 6.3.1 in Hengl's book "A practical  
guide to geoestatistical mapping")

I have a seg. fault when I try to take the grid properties from a sgrd  
file and if I try to define the grid in command line it doesn't work  
properly. In detail:


$ saga_cmd libgrid_gridding.so 0 -INPUT AS_ICP40 -GRID AS_ICP40_5  
-LINE_TYPE 0 -FIELD 0 -TARGET 1 -GRID_GRID geomap_sapa.sgrd

_____________________________________________
   #####   ##   #####    ##
  ###     ###  ##       ###
   ###   # ## ##  #### # ##
    ### ##### ##    # #####
##### #   ##  ##### #   ##

SAGA CMD 2.0.4
_____________________________________________
library path:	/usr/local/lib/saga/
library name:	libgrid_gridding.so
module name :	Shapes to Grid
author      :	O.Conrad (c) 2003
_____________________________________________
go...

Load shapes: AS_ICP40...
100%
ready

okay




Parameters




Grid: [not set]
Shapes: AS_ICP40
Attribute: AS_ICP40
Method for Lines: thin
Preferred Target Grid Type: Floating Point (4 byte)
Target Grid: grid

Fallo de segmentación   (spanish for seg.fault ;-)

On the other hand:

$ saga_cmd libgrid_gridding.so 0 -INPUT AS_ICP40 -GRID AS_ICP40_5  
-LINE_TYPE 0 -FIELD 1 -TARGET 1 -USER_YMAX 3217500 -USER_YMIN 262500  
-USER_XMIN -2402500 -USER_XMAX 2292500 -USER_SIZE 5000

____________________________________________
   #####   ##   #####    ##
  ###     ###  ##       ###
   ###   # ## ##  #### # ##
    ### ##### ##    # #####
##### #   ##  ##### #   ##

SAGA CMD 2.0.4
_____________________________________________
library path:	/usr/local/lib/saga/
library name:	libgrid_gridding.so
module name :	Shapes to Grid
author      :	O.Conrad (c) 2003
_____________________________________________
go...

Load shapes: AS_ICP40...
100%
ready

okay




Parameters




Grid: [not set]
Shapes: AS_ICP40
Attribute: AS_ICP40
Method for Lines: thin
Preferred Target Grid Type: Floating Point (4 byte)
Target Grid: user defined

100%
Save grid: AS_ICP40_5...
100%
ready

okay


all ok but:

$ cat AS_ICP40_5.sgrd

NAME	= AS_ICP40 [AS_ICP40]
DESCRIPTION	=
UNIT	=
DATAFILE_OFFSET	= 0
DATAFORMAT	= FLOAT
BYTEORDER_BIG	= FALSE
POSITION_XMIN	= -2402500.0000000000
POSITION_YMIN	= 262500.0000000000
CELLCOUNT_X	= 203
CELLCOUNT_Y	= 101
CELLSIZE	= 5000.0000000000
Z_FACTOR	= 1.000000
NODATA_VALUE	= -99999.000000
TOPTOBOTTOM	= FALSE

As you can see CELLCOUNT_* don't fit with the USER_* parameters passed  
and the resulting map has no data because there are no points in that  
particular subgrid. If I change CELLSIZE to 50000 the CELLCOUNT_* are  
the same but now all the points are in the grid and I have a map.

Is it a bug in the linux version of SAGA?

Thanks in advance for any help

Paco

=========================
Francisco Alonso Sarría
Departamento de Geografía
Universidad de Murcia
=========================



More information about the R-sig-Geo mailing list