converting polygons to raster

Michel Wurtz mw at teledetection.fr
Tue Oct 10 04:36:11 EDT 2000


> Stefan.Neumann at agrar.uni-giessen.de a écrit :
> 
> Hi all,
> 
> is there a way to fill polygons with their corresponding attribute? I have a map with soil
> properties in E00-format, which I imported into grass. The map is displayed and
> d.what.vect correctly displays one attribute of the polygon.
> 
> Now I would like to create a rastermap containing datapoints with the attribute of the
> surrounding polygon, that is I want to fill each polygon with its attribute-value. I
> checked the grass-commands, but I could not find any command that does this. v.to.rast
> returns only the edges of the polygon with an empty interior. I cannot interpolate with
> r.surf.* because the attribute-values are not related to each other like for example
> elevation-values. Instead i need the exact attribute-value.

You should run v.support on the vector file generated (m.in.e00 extract the polygon
information, but does not run v.support). Area are basicaly numbered as they were in
the e00 archive. All other attributes are stored in the dig_cat directory, that should
contain as many category files than the number of polygon's attributes.  You can use
them to do a "reclass" on the raster file generated by v.to.rast (cat file are named 
<dig filename>.<attribute name>).  
If you have no areas after v.support, it means that either your arc/info input file
defines only lines and not polygons, either there is some hiden bug in m.in.e00. You
can run m.in.e00 with the option "verbose=5 logfile=xxx" and send me the xxx file, so
I could figure out where things are going wrong.

-- 
Michel WURTZ - DIG - Maison de la télédétection
               500, rue J.F. Breton
               34093 MONTPELLIER Cedex 5




More information about the grass-user mailing list