Changes between Initial Version and Version 1 of Processing/VecToRast


Ignore:
Timestamp:
Nov 30, 2007 3:36:21 PM (12 years ago)
Author:
benj
Comment:

Created

Legend:

Unmodified
Added
Removed
Modified
  • Processing/VecToRast

    v1 v1  
     1= Conversion of Vector maps to Raster maps and GeoTiff images using GRASS =
     2
     3
     41. Ensure vector maps are in appropriate directory
     5eg. /tmp/vectors/
     6
     72. Check table names present using db.tables
     8{{{
     9db.tables driver=ogr database=/tmp/vectors/
     10
     11outputs (table names in specified directory):
     12mny98build
     13mny98lines
     14mny98roade
     15mny98water
     16}}}
     17
     183. For each table, check column names present using db.columns
     19{{{
     20db.columns table=mny98build driver=ogr database=/tmp/vectors
     21
     22outputs (columns in specified table, note duplicate column name):
     23FNODE_
     24TNODE_
     25LPOLY_
     26RPOLY_
     27LENGTH
     28MNY98BUILD
     29MNY98BUILD
     30}}}
     31
     324. Import vector map using v.in.ogr. Note that if your table has duplicate column names as this example, you will need to rename your columns using the cnames option, the first argument to which is always an extra category field. Note also that for vector maps without a specified projection you must use the -o flag to override the projection check
     33{{{
     34v.in.ogr -o dsn=/tmp/vectors/ output=vector_map_name layer=mny98build \
     35cnames=CAT,FNODE_,TNODE_,LPOLY_,RPOLY_,LENGTH_,MNY98BUILD,MNY98BUILD2 --overwrite
     36}}}
     37
     385. Patch imported vector layers together into one map using v.patch
     39{{{
     40v.patch input=mny98build,mny98lines,mny98roade,mny98water output=patched_map_name --overwrite
     41}}}
     42
     435. Convert to raster map using v.to.rast. Note this converts for the current region only at the current resolution, so be sure that region and resolution are set as desired
     44{{{
     45v.to.rast input=patched_map_name output=raster_map_name use=val value=100 --overwrite
     46}}}
     47
     486. Convert to 8-bit GeoTiff using r.out.gdal
     49{{{
     50r.out.gdal input=raster_map_name type=Byte output=Geotiff_file_name.tif
     51}}}