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
___________________________________________
(attachments)