[GRASS-user] NULL cells

Sandile Gumede akasandile at gmail.com
Tue Jul 27 06:23:48 EDT 2010


output of v.info catchments, see below:


Type of Map:  vector (level: 2)


    Number of points:       0               Number of areas:      2273

    Number of lines:        0               Number of islands:    1

    Number of boundaries:   4928            Number of faces:      0

    Number of centroids:    2273            Number of kernels:    0



    Map is 3D:              No

    Number of dblinks:      1



          Projection: Latitude-Longitude

                N:  33:40:46.499215S    S:  34:00:52.499215S

                E:  19:10:16.500436E    W:  18:17:55.500436E



    Digitization threshold: 0
    Comments:


output of r.info, see below:

Type of Map:  raster               Number of Categories: 232
    Data Type:    CELL

    Rows:         1

    Columns:      3

    Total Cells:  3

         Projection: Latitude-Longitude

             N:     33:30S    S:     33:45S   Res:  0:15

             E:        19E    W:     18:15E   Res:  0:15

    Range of data:    min = 0  max = 232



    Data Description:
     generated by r.in.gdal


GRASS 6.4.0RC6 (SRTMDEM):~ > v.extract catchments out=catch_691
where="cat=691"
1 categories loaded from table <catchments>
Extracting features...
Building topology for vector map <catch_691>...
Registering primitives...
237 primitives registered
804 vertices registered
Building areas...
 100%
1 areas built
1 isles built
Attaching islands...
 100%
Attaching centroids...
 100%
Number of nodes: 237
Number of primitives: 237
Number of points: 0
Number of lines: 0
Number of boundaries: 236
Number of centroids: 1
Number of areas: 1
Number of isles: 1
Writing attributes...
v.extract complete.

GRASS 6.4.0RC6 (SRTMDEM):~ > g.region rast=rainfall

GRASS 6.4.0RC6 (SRTMDEM):~ > d.rast rainfall
 100%
GRASS 6.4.0RC6 (SRTMDEM):~ > d.vect catch_691
The bounding box of the map is outside the current region, nothing drawn.


Now, do you think this would ever work out?

Can the Aster_Dem work with this rainfall (TRMM ) data? Can also the
resolution of raster (Aster and TRMM) maps be a problem? If yes, I know how
to download it, I would only need the projection steps








On Thu, Jul 22, 2010 at 9:42 PM, Micha Silver <micha at arava.co.il> wrote:

>  On 07/22/2010 10:55 AM, Sandile Gumede wrote:
>
> Hi
> How do you remove null cells, I guess that is what's causing the problem.
>
> Sandile:
> If I remember your project details, I think that the problem is not the
> null cells in your rainfall data, but rather the very small catchment
> polygons, some of which fall *totally* within a single rainfall cell which
> has a null value.
>
>
> r.to.vect complete.
>
> I guess this step is your conversion of basins to a polygon vector map? How
> many polygons are you getting? Check with v.info. What size are they?
> v.db.addcol catchments col="area_sqm double precision"
> v.to.db catchments opt=area col=area_sqm units=me
>
> And please remind us of the resolution of the rainfall raster with:
> r.info rainfall
>
> GRASS 6.4.0svn (SRTMDEM):~ > r.univar rainfall 100%
>
> total null and non-null cells: 12967201
> total null cells: 7202
>
> Of the non-null cells:
> ----------------------
> n: 12959999
> minimum: 0
> maximum: 36
> range: 36
> mean: 4.99965
> mean of absolute values: 4.99965
> standard deviation: 9.57207
> variance: 91.6246
> variation coefficient: 191.455 %
> sum: 64795464
>
> GRASS 6.4.0svn (SRTMDEM):~ > v.rast.stats vect=catchments rast=rainfall
> colprefix=precip
> Processing data (16 categories)...
> Updating the database ...
> DBMI-DBF driver error:
> SQL parser error: syntax error processing 'NULL'
> in statement:
> UPDATE catchments SET precip_cf_=-NULL WHERE cat=10728
> Error in db_execute_immediate()
>
> ERROR: Error while executing: 'UPDATE catchments SET precip_cf_=-NULL WHERE
>        cat=10728'
>
>
>  Another suggestion: One of the catchment polygons that is failing above
> has cat value 10728. How about extracting just that single polygon, then
> display it on a map together with the rainfall raster to see where it falls?
>
> # extract
> v.extract catchments out=catch_10728 where="cat=10728"
> # Display
> g.region rast=rainfall
> d.rast rainfall
> d.vect catch_10728
>
> --
> cheers,
> Micha
>
> --
> Kind Regards
> TS Gumede
> CSIR, Meraka Institute
> 072 258 1650
>
>
> This mail was received via Mail-SeCure System.
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/grass-user
>
>
> This mail was received via Mail-SeCure System.
>
>
>
>
>
>
> --
> Micha Silver
> Arava Development Co. +972-52-3665918http://surfaces.co.il
>
>


-- 
Kind Regards
TS Gumede
CSIR, Meraka Institute
072 258 1650
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100727/ca092393/attachment-0001.html


More information about the grass-user mailing list