GRW Plug-in

The GEO RAW (GRW) plug-in enables the loading of XYZ ASCII and Z ASCII elevation files into TerraBuilder. GRW is a simple, internal, TerraBuilder format that represents elevation information as a binary file of IEEE 32-bit Float with a small header.

TerraBuilder uses the GRW format to translate files, created by the Convert XYZ ASCII Elevation and Convert Z ASCII Elevation tools, into source files. SeeConvert XYZ ASCII Elevation” and “Convert Z ASCII Elevation” in the “TerraBuilder Tools” chapter for more information.

Advanced users that need to enter elevation information to TerraBuilder can easily export data to this format.

As an example, consider the following "C" Style header format for a GRW file:

        struct FLOAT_GRW

        {

                DWORD  header;

                DWORD  type;

                DWORD  nWidth;

                DWORD  nHeight;

                double x1;

                double y1;

                double x2;

                double y2;

                double mppx;

                double mppy;

        } hData; //(header size=64 BYTE)

 

hData.header='WARG'; // GRAW

hData.type=4;   // float

hData.nWidth=(DWORD)Width; // pixels

hData.nHeight=(DWORD)Height;      // pixels

 

hData.x1=GeoX1;

hData.y1=GeoY1;

hData.x2=-1;

hData.y2=-1;

hData.mppx=GeoMPP;

hData.mppy=GeoMPP;

 

///  GRW FILE FORMAT

//

//    Header+Data(IEEE - 32-bit Float)

//

//    Header=FLOAT_GRW

//   

//    line_0- x0...xn    |

//    line_1- x0...xn    |

//    .       |  The elevation values

//    .       |

//    line_q- x0...xn   |

 

Width - Width in Pixels

Height - Height in Pixels

GeoX1 - Left Geo Coordinate

GeoY1   - Upper Geo Coordinate

GeoMPP - Units Per Pixel