Example for a points file of a linear transformation from XY to UTM coordinates (L: left, R: right, U: upper, L: lower, N, S, W, E):
# Linear transformation from XY to UTM coordinates: # 4 maps corners defined # UL NW # UR NE # LR SW # LL SE -584 585 598000 4920770 580 585 598020 4920770 580 -600 598020 4920750 -584 -600 598000 4920750
The ground control points may be also (ir)regularly distributed and can be more than four points.
Transformation parameters (i.e. xshift, yshift, etc.) can be fetched from attribute table connected to the vector map. In this case vector objects can be transformed with different parameters based on their category number. If the parameter cannot be fetched from the table, default value is used instead.
| x_offset a b | | y_offset d e |
Most DXF/DWG drawings are done within XY coordinate space. To transform them to a national grid, we can use 'v.transform' with a 4 point transformation.
v.transform -t in=watertowerXY out=watertowerUTM points=wt.points zscale=0.04 zshift=1320
# create table containing transformation parameters: echo "create table archsites_t (cat int, zs double)" | db.execute # insert transformation parameters for category 1: echo "insert into archsites_t values (1, 1000)" | db.execute # insert transformation parameters for category 2 (and so forth): echo "insert into archsites_t values (2, 2000)" | db.execute # perform z transformation: v.transform -t input=archsites output=myarchsites3d column="zshift:zs" table="archsites_t" # drop table containing transformation parameters: echo "drop table archsites_t" | db.execute
# work on own map copy: g.copy vect=archsites@PERMANENT,myarchsites # add new 'zs' column to later store height of each site: v.db.addcol myarchsites col="zs double precision" # set region to elevation map and fetch individual heights: g.region rast=elevation.10m -p v.what.rast myarchsites rast=elevation.10m col=zs # verify: v.db.select myarchsites # perform transformation to 3D v.transform -t myarchsites output=myarchsites3d column="zshift:zs" table=myarchsites # drop table containing transformation parameters v.db.dropcol myarchsites3d col=zs
Last changed: $Date$