[GRASSLIST:7569] how does v.to.rast work...

"Zaboj Hrazsky, DAPHNE ČR" zaboj.hrazsky at daphne.cz
Sat Jul 16 12:02:28 EDT 2005


Hi

One can say daily task...

I need to get rasters with cell 100m from large vector file with 
variable area of polygons: from 20 m2 to hectars. I must not lost any 
occurence of small polygons (which often are generalized out in such 
cases). The best result for me is raster with values of "my vector" area 
in each cell, but also the only presence/absence in 100m grid can be 
used for further analysis.

There are more ways:

A) use v.mkgrid and overlay these vectors works well, but in case of 1 
400 000 cells in grid I've found some limits :-(.

    v.mkgrid  map=grid100 grid=2926,4728 position=region
    Creating vector grid ...
    Writing out vector rows ...
    Writing out vector columns ...
    Creating centroids ...
    dbmi: Protocol error (invalid table/column name or unsupported 
column type)
    ERROR: Cannot insert row: insert into gridall values ( 822223, 174, 
4279 )



B) use v.to.rast

B1) plain v.to.rast - see file v.to.rast_centroids.png - leave many 
pieces outside the result raster. What is the algorithm, how does GRASS 
know which cell falls in resultant raster?

B2) to add category to vector boundaries and run  v.to.rast  ...  see  
boundary.png ...  the  result raster eats to much ... empty cells were 
involved, Question is why?

B3) the most complicated, but with best results now: v.to.rast in small 
(5m or less) cell size -> r.to.vect feature=point -> v.to.rast in 100m 
cell size works with points well. I tried to use v.to.points and patch 
these "linepoints" and "rasterpoints" before second v.to.rast, but with 
no better result.

B4) convert raster with small size cell direct to 100m raster, but I 
didn't find any functionality which can simulate the Agregate() function 
known from ESRI  GIS products, which sumarize values from finer raster 
into cell of coarser one. Any mc


There is no C for me (not programator :), but maybe anybody can navigate 
me a bit ...

Thanks for your time

-- 
    Záboj Hrázský
   ___________________________________________
   
    DAPHNE ČR - Institut aplikované ekologie
    Husova 45, 370 05 České Budějovice
    http://www.daphne.cz
    Tel: +420 776053573
    ICQ: 332817882
   ___________________________________________

   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v.to.rast_centroids.png
Type: image/png
Size: 4904 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20050716/edf14be7/v.to.rast_centroids.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boundary.png
Type: image/png
Size: 5710 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20050716/edf14be7/boundary.png


More information about the grass-user mailing list