QuikGrid 5.4

Copyright (C) 1993-2010 by John Coulthard. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; A copy of the license can be obtained from the Free Software Internet site at http://www.fsf.org/licensing/licenses/fdl.txt .

Contents

Introduction
Installation
Reading Scattered Data Points
Saving Scattered Data Points to a file
Reading outline data
Saving the grid to a file
Loading a grid from a file

Export the display as DXF data
Export the grid as a DXF 3DFACE file
Export a VRML file (Virtual Reality Modeling Language)
Grid Generation
Edit... Grid generation options
Printing
Viewing a Contour Map
Viewing a Perspective Representation of the Surface
View options
Copying to the Clipboard
Editing the Title
Editing the colour of features.
Editing the colour map.
Editing the number, values and labels for contour lines
Edit… Angle: Changing the viewpoint for the 3d view of the surface
Changing the number of grid lines
Editing the grid line coordinates
Distance cutoff
Edit... Data Input Options
Edit... Data Output Options
Automatic grid size ratio and Maximum automatic grid size
Edit... View data point options....
Edit... Vertical Scale Factor (shape of the surface)
Edit... Right mouse button options.
Edit... Grid Generation Options... Edge Sensitivity
Edit... Grid Generation Options... Set undefined grid loc'n to:
Window... Pan and Zoom Options:
Grid... Grid Resolution
Grid... Set colour map to grid extents
Grid... crop 2d view
Grid... Template options
Handling unevenly distributed data
Handling large amounts of input data
Viewing and Editing Grid Coordinate and Data Point Information
Handling meteorological data
Using the colour layer
Associating file types with QuikGrid
Processing a command file
    Command file examples
Using QuikGrid under UNIX/LINUX
Using QuikGrid from other programs (Visual Basic)
Copyright, copying and Redistribution Conditions and Disclaimer
Algorithm
Limitations

Questions and Answers

Introduction

QuikGrid will read in a set of scattered data points which represent a surface and will generate a grid which represents the surface defined by these points. The gridded surface may be viewed as a contour map or as a perspective view of the gridded surface, optionally with hidden lines removed. Colour mapping may be used to visualize surface features. The left mouse button may be used to zoom in on the gird. The right mouse button may be used to display information about the generated grid coordinates and data points.

A 125 by 125 grid representing 15,000 data points may be gridded in less than 1 second on a 500Mhz Pentium (actual generation times may vary depending on how the points are distributed). The display may be printed or output as a DXF data file for input into AutoCAD or other programs that support that format. The grid may be output as a series of XYZ triplets or in a variety of other formats (ER Mapper, Surfer, VRML, DXF…).

QUIKGRID will run on modest hardware platforms. It is well suited for situations where it is desired to have a quick look at a set of data points, for example under field conditions where only a portable PC is available. On larger computers it is capable of processing a large number of data points and generating very large grids (e.g. 3 million data points to a 3000x3000 grid).

Installation

If you downloaded QGRID54.EXE simply run the program. If you are installing from a distributed .zip file unzip the file into  any temporary directory and run QGRID54.EXE.
 
See
Using QuikGrid under UNIX/LINUX if you are using Unix or Linux.
 
QuikGrid will install by default into the file  C:/Program Files/Quikgrid.
 
A version with French menus and dialog boxes will be installed as  quikgridf.exe (The help facility is still English).

Reading Scattered Data Points

The options:

File... Input scattered data points… Input metric data points,
File… Input scattered data points… Input Lat/Lon (ddmm.mmmm) data points
,
File… Input scattered data points… Input NOAA/NGS Lat/Lon (ddd mm ss.sssss) data points

File... Input scattered data points… Input NOAA/NOS integer Lat/Lon (dddmmssssss) data points
File... Input scattered data points… Input DCA data points

Will read Scattered Data points from plain text files, typically organized three values to a line in order, the X coordinate, the Y coordinate, the Z coordinate For latitude/longitude data latitude is first and longitude is second. Blanks, tabs or commas should separate the points. In general only one xyz triplet is allowed per line. Anything following the three values will be treated as a comment attached to the data point. The option Edit…, Input options… allows you to select the old style metric input which allowed more than one xyz triplet per line, but no comment. The data may be arranged in fixed format columns.

More than one input file at a time may be selected in the dialog box using the standard Windows features Shift-click and Ctrl-click. The selected files are read in sequence and treated as one input data set.

The options:

File... Input scattered data points… Input DXF data points
File… Input scattered data points… Input Submetrix .sxp data file…

    (The Submetrix .SXP data file is produced by Submetrix sonar surveying equipment.)

will allow you to read the scattered data points from a DXF file or from a binary Submetrix formatted data file.

For all input types the x and y coordinate order may be reversed and the z coordinate may have its sign reversed using Edit…, Input options…

Fixed Format Input points may be input by entering a special first line in the file which indicates which columns the fields begin in. This is done on the first line in the data file by entering an X, Y, Z and optionally C onto the first line at the positions where the corresponding fields will begin. A blank or comma will terminate the fields. Other data on the line will be ignored. If a comment is included it will be terminated by the first blank. For latitude and longitude use LAT and LON instead of X and Y. Here is an example based loosely on a dump from a Garmin 45 GPS.

  C      LAT         LON                             Z
W HOUSE  N2524.18405 W07755.01211 14-JAN-98 21:14:26 35
W DOCK   N2524.23491 W07755.29213 14-JAN-98 21:16:47 0
W STORE  N2528.24985 W07809.79988 14-JAN-98 21:11:55 66
W CORNER N2529.49997 W07825.10006 14-JAN-98 14:28:30 24
W BEACH  N2513.75015 W07908.41988 14-JAN-98 14:15:33 0
W HILL   N2513.65005 W07909.29986 14-JAN-98 14:17:30 234

Data prior to the first defined column will be ignored.

Metric Data Points are points defined in the normal decimal, base 10 number system separated by blanks, commas or tabs. By default the xyz values occupy positions 1, 2 and 3 in the line. (See Edit…, Input options… for changing this order). Anything following the three values will be kept as a comment. The following is a sample set of metric data points:

31.55667 -97.13333 -38.2
31.67167 -97.10000 -37.6
31.80333 -97.10000 -39.9
31.97167 -97.00500 -33.4
- etc. -
31.97000 -97.12167 -40.3
31.98500 -97.12667 -40.1
31.99833 -97.13167 -40.1 This is a comment
31.50000 -97.34667 -58.4

Blank lines will be ignored.

Latitude/Longitude(Lat/Lon) Data Points are points defined as latitude and longitude in the form of degrees, minutes and fractions of minutes. The format is dddmm.mmmm where ddd is the degrees and mm.mmmm is the minutes. The decimal point in the minutes is required if there is a fractional part. The number can be prefixed or suffixed by N/S or E/W. The degree symbol or a ^ may be used to separate the degrees from the minutes and the ' may be used to terminate the minutes. So for example the following are all equivalent ways of expressing West 88 degrees, 23.456 minutes: 8823.456, W88^23.456', 88^23.456'W. Blanks, tabs or commas may separate the numbers. Embedded blanks are not allowed. Anything following the three values is treated as a comment attached to the data point. The following is a sample set of Lat/Lon data points:

(Latitude) (West Longitude)
2513.321 8020.407 -38.2
2513.306 8020.413 -37.6
2513.296 8020.417 -39.9
2513.257 8020.412 -33.4
- etc. -
2513.240 8020.435 -40.3
N2513.257 W8020.413 -40.1 This is a comment
N2513.239 W8020.435 -40.1
2513.240N 8020.442W -58.4

QuikGrid takes the latitude and longitude and converts them to metric form as a degree and fraction of degree. Negative numbers are allowed and assumed as South for Latitude and East for longitude. The points are then treated as being in a rectangular coordinate system. This provides a Mercator map projection with the resultant area distortion near the poles.

See also the format of NOAA/NOS integer Lat/Lon data points and NOAA/NGS Lat/Lon data points

NOAA/NOS integer Lat/Lon Data Points are data points defined in degrees, minutes, seconds and fractions of seconds, in the order latitude, longitude, using the format dddmmssss where ddd is the degrees, mm is the minutes and ssss is the seconds. The last two digits are taken as fractions of a second. Leading zeros for degrees are optional. For example, 81 degrees, 33minutes, 22.22 seconds may be expressed as 081332222 or 81332222. Longitude is taken as positive in the westerly direction. The points are separated by blanks. The following is a sample set of NOS data points:

(Latitude) (West Longitude)
56450769 153301646 -46
56450422 153302280 -47
56450132 153303003 -48
56450859 153305357 -51
-etc. -
56451148 153300923 -45
56451474 153300211 -44
56451852 153302732 -44
56451634 153303348 -44

QuikGrid takes the latitude and longitude and converts them to metric form as a degree and fraction of degree. Negative numbers are allowed and assumed as South for Latitude and East for longitude. The points are then treated as being in a rectangular coordinate system. This provides a Mercator map projection with the resultant area distortion near the poles.

For display purposes, for example in the title bar, the display will read in degrees, minutes and fractions of a minute.

See also the general format of latitude and longitude numbers And the NOAA/NGS Lat/Lon data points

NOAA/NGS Lat/Lon Data Points are data points defined in degrees, minutes, seconds and fractions of seconds, in the order latitude, longitude, using the format ddd mm ss.sssss where ddd is the degrees, mm is the minutes and ss.sssss is the seconds. The fields are separated by blanks or a tab character. Leading zeros are optional. For example, 81 degrees, 33minutes, 22.22222 seconds may be expressed as 081 33 22.. Longitude is taken as positive in the westerly direction. A leading character of N, S, E or W may be used to clarify the input. The following is a sample set of NOAA/NGS data points:

(Latitude) (West Longitude)
56 45 07.69 153 30 16.46 -46
56 45 04.22 153 30 22.80 -47
56 45 01.32 153 30 30.03 -48
56 45 08.59 153 30 53.57 -51
-etc. -
56 45 11.48 153 30 09.23 -45 This is a comment.
56 45 14.74 153 30 02.11 -44
56 45 18.52 153 30 27.32 -44
56 45.16.34 153 30 33.48 -44

QuikGrid takes the latitude and longitude and converts them to metric form as a degree and fraction of degree. Negative numbers are allowed and assumed as South for Latitude and East for longitude. The points are then treated as being in a rectangular coordinate system. This provides a Mercator map projection with the resultant area distortion near the poles.

For display purposes, for example in the title bar, the display will read in degrees, minutes and fractions of a minute.

See also the general format of latitude and longitude numbers and the NOAA/NOS integer Lat/Lon data points

DCA Data Points are metric data points expressed in the format "point#,easting,northing,height, comment". Commas separate the fields. The comment is any ASCII text and is terminated at the end of the line. The point# is a point identifier which is combined with the comment and saved with the data point. The point# and comment is displayed in the dialog box when a data point is selected with the right mouse buttonGridInfo. Easting, northing and height are read as x, y and z. The following is a sample:

127,5037.375169,966.621120,29.507,fence
129,4985.084287,973.404674,32.341,conc.slab
130,4991.246478,980.201984,32.275,conc.slab
134,4994.151539,990.872301,33.314,bldg
135,4973.514075,968.238957,32.475,bldg
136,4972.357301,969.907827,32.569,floor.slab
137,4963.212671,966.917235,32.484,bldg
138,4970.834651,953.643267,32.746,curb.conc

DXF Data Points are metric data points which are loaded from a DXF file. If you take input from a DXF file QuikGrid will scan the DXF file accepting anything that looks like a 3d point. It can be polylines, lines, or positions for text, so it is important to only put out in the DXF file stuff you want to generate a grid from.

Comments

How comments are displayed may be changed at Edit… View data point options… []comments. Comments may also be viewed, edited or added by right mouse clicking on the data point.

Saving Scattered Data Points to a file:

This command will write the scattered data points out to a file. The data will be written out in order X Y Z followed by a comment if one exists for that point. For Lat/Lon data it is written out Lat Lon Z comment. The items are separated by a blank or tab character depending on the setting of the option Edit…,Output options… tab separator option.

If the order of X and Y was reversed when the data was read in it will be written out in the new order. In other words the program will not re-reverse (so to speak) the data points when writing them out again.

Data points which have been ignored for grid generation purposes by using a right mouse button clickGridInfo or cropped will not be written out.

No matter how the data was input to the program (for example as DCA data or DXF data), it will be written out either in metric format or Lat/Lon format. If you input the data from a DXF file, for example, QuikGrid will not write out another DXF file.

Reading outline data

The command File… Input outline data, may be used to load a file containing an outline to be superimposed on the display. It was originally designed to allow the input of a file describing a coastline obtained through the NOAA coastline extractor at http://rimmer.ngdc.noaa.gov/. QuikGrid will handle either the Mapgen or Matlab formats or a normal xyz metric data file. The file suffix ".out" will identify the file as an outline file if you link to QuikGrid with the name of an outline file as the argument. If multiple outline files are read at the same time a move is assumed between separate files.

The outline will always be visible (never hidden by the grid). The options in “Edit… Input options…” do not apply to outline data. Latitude/longitude data must be expressed in degrees in and fractions of a degree. You may use QuikGrid to convert a file in some other format. For example you may File… Input lat/lon data points… to read a file expressed in degrees, minutes and seconds, then uncheck View… as latitude/longitude data, then File… Save data points to a file… to write out the data points in degrees and fractions of a degree.

The outline data and the grid being displayed should occupy the same space. If you display a grid and outline and then wish to display another grid where the x and y coordinates are vastly different from the previous one, it is best to File… Clear outline data first, then load the new set of scattered data points before loading the outline file. One warning message will be displayed if the outline data is not near the grid being displayed.

The Mapgen or Matlab format

The outline file is an ASCII flat file with two columns containing x and y. The MAPGEN format contains one xy pair on each line. The xy pairs are connected by a line with new line segments indicated by a line containing the characters "# -b". The MATLAB format is the same, but with the characters "nan nan" indicating line breaks. When the data represents latitude and longitude the two columns are expressed in decimal degrees (west negative), for example:

# -b
-123.400000 48.896785
-123.396884 48.893670
# -b
-123.400000 48.885162
-123.397178 48.883402
-123.397178 48.882522

For display purposes the z coordinate is assumed to be the minimum z value for the grid being displayed.

The standard Mapgen or Matlab format contains only X and Y values. However QuikGrid will make use of a Z coordinate if it is present. This means you may read in any metric xyz file and use it as outline data. Outline Z values and the scattered data Z values must be in the same Units and range if you wish to view it in 3D successfully. QuikGrid will also accept a blank line as equivalent to a line containing “# -b”. If a comment follows the Z coordinate it will be displayed with a small cross to mark the location. A Z coordinate must be present for a comment to be recognized. Use 0.0 if Z coordinates are not otherwise present.

Saving the grid to a file

Saving the grid to a file in the QuikGrid format

The option File… Save the current grid… Save the grid in the QuikGrid format will output the current grid to a file as a plain text file. This grid may later be used as input to QuikGrid using File… Load QuikGrid grid from file.

Saving the grid to a file as a series of XYZ triplets

The option File… Save the current grid… Save grid as XYZ triplets will output the current grid to a file as a series of x, y and z coordinates, one set of numbers per line, each line representing the x, y, and z values for one grid coordinate. Undefined grid coordinates are not written out unless the Grid Generation option Set undefined grid loc’n to...SetUndefinedTo has been checked, or the output option Output undefined grid z value as…  has been set. The items are separated by a blank or tab character depending on the setting of the Edit…,Output options… tab separator option.

Saving the grid to a file in the Surfer .GRD format

The option File… Save the current grid… Save the grid in the Surfer .GRD format will output the current grid to a file in the Surfer .GRD format. Undefined grid coordinates are output by default as -99999. This may be controlled using the Edit…,Output options… dialog box.

Saving the grid in the ER Mapper format

The option File… Save the current grid… Save the grid in the ER Mapper format will output the grid as an ER Mapper Raster Dataset. This consists of two files, an ER Mapper header file (file extension .ers) and an ER Mapper data file (no file extension). These files may be input to ER Mapper version 5.2 or later.

You will be prompted for the header file name. The binary data file will automatically be created with the same name and no file extension. If either file already exists it will be emptied and reused.

The ER Mapper header file describes the Datum as WGS84, with Projection LOCAL and Coordinate type EN. The DXF output from QuikGrid may be superimposed on an ER Mapper image by converting the DXF file to a Vector Dataset (file extension .erv) using ER Mapper and then overlaying the Vector Dataset on the image. Performing the overlay by creating a dynamic link to the DXF file also works for most data sets.

This grid may be read back into QuikGrid using File… Load ER Mapper Raster file….

Loading a grid from a file

The option File… Input a grid… Load QuikGrid grid from file will load a grid previously saved with File… Save grid in QuikGrid format to a file or a grid provided by yourself that is in the correct format.

The option File… Input a grid… Load 1-Degree USGS DEM from file… will load a grid in the USGS 1-Degree DEM file format. This allows you to use QuikGrid as a viewer for this type of file. Loading a USGS DEM file will also automatically turn on Grid Resolution. Also Function… Set minimum z to undefined leaving a border, will also be applied. This does a nice job of outlining water where the DEM includes ocean shoreline.

The option File… Input a grid… Load ER Mapper Raster file… will load an ER Mapper raster file, of a type similar to that generated by QuikGrid (See Exporting the grid in the ER Mapper format) This allows you to export an ER Mapper raster file, process it in another application and then reload it into QuikGrid.

Format of a QuikGrid grid in a file

The following is the format that will be used by File… Save grid in QuikGrid format to a file. It is also the format you must use in order to input gridded data to QuikGrid from some other source using File… Load QuikGrid grid from file.

The first line of the file contains three numbers, the number of grid lines in the x direction, the number of grid lines in the y direction and optionally an offset to be applied to the z values in the grid. A negative number flags undefined z coordinates so all valid z values must be positive. The offset is subtracted from the z values for the grid data to yield the true value at any given position. QuikGrid will output all floating point numbers using scientific notation. For grids provided from other sources scientific notation need not be used for input. Grids generated from Latitude longitude data points have grid coordinates represented by degrees and fractions of a degree. The word LatLonData will be on the first line if the grid represents latitude/longitude data.

The following lines in the file will contain, in order:

  1. The values of the coordinates of the x grid lines.
  2. The values of the coordinates of the y grid lines.
  3. The values for the z values for the grid. These numbers are output with the y coordinate varying fastest. Undefined intersections are indicated by a z value of -99999.

Except for the first line QuikGrid is not sensitive to line breaks so the data after the first line may be spread across as many lines as desired, but must be supplied in the given order. For example.

Example of the format of a QuikGrid grid saved to a file

The following is the file created as a result of using File… Save the grid in QuikGrid format to a file for a trivial five by five grid generated from the internal test data.

5 5 0e+00
1e+00 3.25e+00 5.5e+00 7.75e+00 1e+01
1e+00 3.25e+00 5.5e+00 7.75e+00 1e+01
1e+00 3.527506e+00 2e+00 2.175612e+00 -9.9999e+04 2.61706e+00 7e+00 3.45895e+00 3.312072e+00 4e+00
2.144419e+00 3.600058e+00 3.149526e+00 4.524836e+00 4.626828e+00 -9.9999e+04 2.397182e+00 3.000304e+00 9e+00 5.930425e+00
-9.9999e+04 2.295494e+00 3.398936e+00 4.832572e+00 3e+00

A third number (z offset) on the first line is optional, and if missing defaults to zero. A fourth value LatLonData will be on the first line if the grid represents latitude/longitude data. Except for the first line QuikGrid is not sensitive to the ends of lines. The data following the first line may be split across as many lines as desired but must be supplied in the correct order.

Export the display as DXF data

WARNING: COLOUR data is not output to DXF files.

WARNING: DXF files can become extremely large - especially for large grids.

The option File… Export a DXF file will optionally write the grid, contour lines, data points and outline to a file in the AutoCAD DXF format. This file may then be used as input to AutoCAD or other programs that support this format. All data is output using full 3D x, y, and z representation with no rotation applied. (AutoCad may be used to rotate the image). Latitude/Longitude data is output as degrees and fractions of a degree. Twelve digits of precision are used. This may be reduced to 6. See Edit…,Output options… for details. By default the GRID, CONTOUR and OUTLINE data is output using the DXF LINE primitive. If you wish these may be output using the DXF POLYLINE primitive. See Edit…,Output options… to select it.

The grid data is written out on the layer with the name “GRID”.

All contours of a given value are put out in a single layer with the name "CONTOURnnnnn", where 'nnnnn' represents the contour line value. Periods and + are changed to underscores for compatibility with layer naming conventions. Similarly – (minus) is changed to 'm'. Scientific notation may be used. For example the contour lines for the 1.5 contour would be put in the layer named "CONTOUR1_5". The lines for the 18.92326 contours would be put in the layer named "CONTOUR18_92326". Bold contour lines are output as thick DXF polylines if polylines have been selected in Edit…,Output options…. If contour labels are included on the display the contour lines will be gapped and labeled in a fashion similar to that seen on the QuikGrid display. If labeling is not desired in the DXF file use Edit… Output Options… [ ] Never label DXF contour lines. The size of the text may be controlled under Edit…,Output options…. The default size is 2% of the image height.

The scattered data points are output as POINT primitives on the layer “SCATDATA”. If the option Output scattered points on named DXF layers has been checked, the data points are assigned to different layer names according to the following rule. The name is chosen by determining which two contour lines the point lies between and assigning the same name as the smaller contour line, except that the characters CONTOUR in the layer are replaced by SCATDATA. For example, a scattered data point may be assigned to the layer SCATDATA1_4, which means it lies between the 1.4 contour line and the next higher contour line.

If text data for the points (xyz coordinates or comments) are displayed they are also output on the SCATDATA layer using the TEXT primitive. By default the size of the text is 2% of the image height. The size of the text may be set under Edit…,Output options….

Outline data are output as LINE or POLYLINE primitives on the layer OUTLINE.

What is displayed controls what will be output to the DXF file. For example if you don't want the grid information uncheck the View… Grid options so the grid is no longer displayed

The DXF file does not define a world coordinate system. If the display is blank after loading the DXF file it is probably necessary to redefine the receiving program's coordinate system to enclose the data. For example under AutoCAD Lite the command is View... zoom... extents.

Export a DXF 3DFACE file

WARNING: COLOUR data is not output to DXF 3D FACE files.

WARNING: DXF files can become extremely large - especially for large grids.

The option File… Export a DXF 3D Face file... will triangulate the grid and write it out to a file in the DXF 3D Face format. The grid is output using full 3D x, y, and z representation with no rotation applied. Latitude/Longitude data is output as degrees and fractions of a degree. Note that the z units will be scaled according to the vertical scale factor unless output option DXF3DFACE or VRLM output: Scale z coordinate has been unchecked.

Export a VRML file (Virtual Reality Modeling Language)

The option File... Export a VRML file... will output the grid in the Virtual Reality Modeling Language (VRML Version 1.0). If the grid is displayed as a "... hidden coloured grid", the grid will be coloured in a fashion similar to the display. Otherwise the grid will be assigned the colour of the grid lines (default blue). If the axes are displayed they will also be output as a simple display of three lines. Also the outline data, if present, will be output.

By default QuikGrid will triangulate the grid squares for output. You may uncheck this feature under Edit… Output options… [ ] Triangulate VRML output. This will result in an output file that is approximately half the size and complexity and, depending on your viewer, may allow the viewing of a larger grid. You also may prefer the rendering that shows the grid squares as squares.

VRML output generates a file with the suffix .WRL .  More information about VRML may be found by doing an internet search.

Grid Generation

By default grid generation occurs automatically whenever necessary. The options Grid... Generate grid now! and Grid... ...generate grid automatically allow you to take manual control of grid generation. This will typically be desirable if you are reading in a large number of data points and it takes a long time to generate a new grid. See also Handing large amounts of data.

Grid 2d view will generate a new grid on the area defined by the current 2d display. This feature may be useful for examining very large numbers of scattered data points, for example where you would like to generate a fine detail grid over a densely clustered area of the data.

Grid full dataset will generate the original grid again, the same one that would be generated after the data had been read.

Grid Generation can take some time - depending on the size of the grid being generated and the number of data points. A dialog box is displayed which shows the progress of the grid generation.

The options controlling grid generation may be controlled. See Editing grid generation options.

Grid Generation Dialog Box

The grid generation dialog box provides you with information about the generation of the grid as it proceeds. The Status: is either "Presorting Data Points", which is done to increase the efficiency of the grid generation, or "Generating...". See the Algorithm for more information.

Average Scan Bandwidth:
This value shows the average number of data points that are being examined in order to evaluate a grid intersection. This statistic is most heavily impacted by the Grid Generation Options items Scan bandwidth cutoff  and Distance cutoff.

Average Search Shell
In order to evaluate a grid intersection this program shells outwards from the grid intersection looking for scattered data points. This item displays the average number of shells examined around each grid intersection.




Grid Generation Dialog Box

Clicking on the Cancel button will cancel grid generation. The portion of the grid generated up until it was canceled will be displayed.

Edit... Grid generation options

The Edit... Grid generation options allows you to change some of the internal assumptions used by the program during grid generation. These are:

Sample every n'th point
Scan bandwidth cutoff

Distance cutoff

Edge Sensitivity

Set undefined grid loc'ns to

All of the grid generation options except setting the value for undefined grid coordinates, may be saved as your personal preference using the Set above as preference button. Your preferences will be the default values assumed whenever you start QuikGrid.

Sampling data points during grid generation

The grid generation option Sample every nth point allows you to instruct the QuikGrid to use a subset of the data read in during grid generation. By default n is equal to 1 and every data point read in is used. For n=4 only every fourth point will be used. See also, selecting data points during data input.

Scan bandwidth cutoff

In order to evaluate a grid intersection the program scans outwards from the grid intersection examining scattered data points. The number of points examined impacts heavily on the performance of the program. The grid generation option Scan bandwidth cutoff number along with the Distance Cutoff number tells the program when to stop looking. When any new points will not contributed more than 1/(scan bandwidth cutoff) towards the value of a grid intersection scanning will cease in that direction.

This value may be changed with the Edit..., Grid Generation Options.

Printing

Selecting File… Print... will print the current display.

Viewing a Contour Map

The option View..., …2d from above displays the surface directly from above as an orthographic projection (as viewed from infinity). The title bar will display the current location of the mouse and the height of the closest grid intersection. It will also display the “speed”, “direction” and “colour” layer values if they are present.

Viewing a Perspective Representation of the Surface

The option View..., 3d Surface will display the surface as a perspective projection from an arbitrary viewpoint. The perspective projection is set up to show a surface for a viewpoint at a distance approximately 5 times the length of the x-axis. These options may be changed with the Edit..., Angle menu. The display may be rotated using the scroll bars or by using the Shift-arrow (10 degree) or Ctrl-arrow(1-degree) keys. (plain arrow keys shift the image up and down or left and right).

If displayed, data points are never hidden. By default contour lines will be hidden but not labeled. If the option View… Edit all view options… never hide contour lines is selected the contour lines will be labeled but not hidden.

View options

The View… menu controls what will be included in both the 2d Contours or 3d Surface displays. A subset of these options is available directly in the View… pull down menu and all options are available under View… Edit all view options… Use the Edit all view options dialog box if you wish to change several options without waiting for screen redraws.

The transparent grid option will display most rapidly. The hidden coloured grid option will display the slowest. For very large grids you may prefer to use the transparent grid to select a good viewing angle and zoom depth, and then switch to a hidden, coloured view. You can also use Grid… Automatic grid resolution to speed up the display of very large grids.

Most options are self explanatory.

View… Size of Speed Arrow

allows you to set the length of the speed arrow for meteorological displays. The number supplied is the average size of a grid rectangle.

View… Edit all view options… View text size[size]

You may specify the size in pixels for the text on the screen here. In a command file this may be set using the command:

View text size [n]

The size must be between 60 and 200.

View… Edit all view options…View Z axis labels [minimum] [ maximum]

Normally the minimum and maximum values for the Z data are used for the labeling of the Zaxis. The labeling and position for the maximum and minimum values on the Z Axis may be over-ridden here. In a command file this is set using the command:

View Z axis labels [minimum] [maximum]

If the Z values in the grid are not near the specified values the label values are ignored. If the labels are both set to zero they are ignored (this is the default condition).

View… as latitude/longitude data

allows you to specify whether QuikGrid is to treat the data as latitude longitude data or not. This is always reset when a data set is loaded, so if you want to override the default action do it after the data set has been loaded. Internally latitude/longitude data is always carried as degrees and fractions of a degree. This option only affects how the x and y coordinates are displayed. If it is not checked the numbers are shown as degrees and fractions of a degree( e.g. Y=“61.2”). If checked the values will be displayed in Degrees, minutes and fractions of a minute(e.g. Y=“N61°12.0'”.

View… Edit all view options… Black and white

will mainly be useful for printing to non-color printers. Such devices typically map colors into some level of grey tone. Choosing this option may improve the quality of the print.

View… Edit all view options... Volume difference

will display the volume difference between the colour layer and the current grid in the lower right corner of the window. It shows as three totals, positive difference, negative difference and total difference. The positive difference is the volume for the areas where the colour layer is greater than the grid. The negative difference is the volume for the areas where the colour layer is less than the grid. The three figures are shown to give you a better idea about total material moved in a dredging operation (material moved from one location and dumped in another in the same image).

This will only show, if a colour layer exists. The calculation of the volume difference will be performed any time the colour layer or the current grid is replaced, with the exception of the Function... Colour layer = colour layer - grid command.

View… View… Edit all view options… Use fast screen update

will cause QuikGrid to build the screen image in memory and then transfer it to the display screen in one fast operation. QuikGrid will also use the memory image to update the screen when other windows are moved from over top of the QuikGrid window. This can greatly speed up the redisplay when the image has not changed and the window has not been resized. It produces quite a nice effect for rotating 3d images. You may not like the lack of feedback as the image is being built. For large grids the cursor will simply change to an hourglass for the time it normally takes to build the image, then the new image suddenly appears.

Copying to the Clipboard

The image may be copied to the clipboard by using the standard Windows features Print Screen (for the entire screen) and Alt Print Screen (which will copy only the active Window). The menu command Window… Copy to clipboard as bitmap will copy only the QuikGrid window without the Title and Menu bars.

Window… Copy to clipboard as metafile will copy the image to the clip board as a Windows Metafile. As a metafile the image may be freely scaled without losing resolution. Unfortunately few programs seem to do a good job of importing the text part of the image (Microsoft Excel does a good job).

Editing the Title

Choosing Edit..., Title... will allow you to specify a title that will be placed in the upper left corner of the display. By default the title is blank.

Editing the colour of features.

The command Edit… Colour of features allows you to assign custom colours to the grid, contour lines, and other features.

Use Edit.. Colour map to change the z value colour mapping for continuously coloured contour lines or grid squares. .

The colour for the contour lines will be ignored if continuously coloured contour lines are selected. Continuously coloured contour lines are selected by using Edit… Contour intervals and labels and checking the “use coloured contours” option.

Editing the colour map.

Edit… Colour map allows you to change the mapping between z values and the colours assigned to them for the drawing of continuously coloured contours and grid squares.

When continuously coloured contours or grid squares are selected QuikGrid uses the z value for the contour line or grid square to assign a colour to the contour or grid square. (The average of the four corners of the grid square is used to define a colour for the grid square.). The colour may be blended from a mix of red, green and blue or be a monochrome colour that goes to white. The colour map defines how the z value is used to determine the colour. By default, for blended red, green and blue colours, quikgrid assigns the minimum z value to blue, the midpoint z value to green and the maximum z value to red.

RED Maximum z value to be assigned asRed (Max)
GREEN Midpoint z value to be assigned as Green (Mid)
BLUE Minimum z value to be assigned as Blue (Min)

If your data ranges from 0 to 10 values for 0 will be assigned blue, 5 to green and 10 to red. For values in between the colours are blended. For example for values from 0 to 5 the colours blue and green are blended, and for the top half the colours green and red are blended.

When you assign a Colour Map the values for Min, Mid and Max must be ascending in value but do not have to define the entire data range. Z values below Min will be assigned to Min. Z values higher than Max will be defined to Max. If you leave the midpoint box blank QuikGrid will calculate the midpoint from the minimum and maximum values.

For example if you assign a colour map of (Min: 0; Mid; 0, Max; 1000), all values of 0 and below will be assigned to the value blue. The values from 0 to 1000 will be blended from green to red and values above 1000 will be assigned the red colour.

You may reverse the colour mapping. For blended colours that means Red is low and Blue is high. For monochrome it means white is low not high.

You may choose blended red/green/blue colours for the colour mapping or a single colour which will vary in shading from the chosen colour to white. The default monochrome colour is black which results in a black to white display with black being the low values and white the high values. For other colours the shading will vary between the colour chosen and white.

Editing the number, values and labels for contour lines

The Edit..., Contour Intervals and Labels dialog box allows you to control the number, values, labeling and colours for the contour lines. There are two types of contour lines, boldfaced (or highlighted) lines which may be labeled and secondary contour lines which are placed between the highlighted lines and are neither bold nor labeled. You may control the distance between the highlighted contour lines and how many secondary lines you would like between the highlighted lines. By default QuikGrid attempts to determine a "nice" round number for the distance between the highlighted lines and will place four secondary lines between them.

If you would like to have only unlabelled secondary contour lines on the surface set the distance between the highlighted lines to zero and set the number of secondary lines to the total number of contour lines you would like displayed on the surface.

You may specify the number of digits from the contour value to be used in the label. The scroll bar controls how closely QuikGrid will attempt to place labels together on the contour line. QuikGrid will also attempt to not place one contour label very close to any other contour label. If two labeled contour lines are quite close to each other and the spacing of the labels is quite small, the first contour line to be labeled may tend to dominate the labeling in that vicinity. In this situation increasing the contour line spacing may improve the labeling on the other line.

Edit… Angle: Changing the viewpoint for the 3d view of the surface

The Edit… Angle menu allows you to change the viewpoint for the perspective 3d view. Above specifies the angle of the viewpoint above the surface. About specifies how much the surface is to be rotated about the z axis. The Perspective Projection specifies a number that represents the distance the viewpoint is from the surface expressed as multiples of the length of the x axis. If the Perspective Projection is set to zero an orthographic view is presented (the view point is assumed to be at infinity).

About and Above may also be changed using the scroll bars on the 3d view or by using the Shift-arrow keys to rotate the view by 10 degree increments or the Ctrl-arrow keys to rotate the view by 1 degree

Changing the number of grid lines

The option Edit..., Number of grid lines… may be used to change the number of x and y grid lines. QuikGrid will calculate a new spacing value for the grid lines and, if Grid… Generate grid automatically is set, will generate a new grid.

Editing the grid line coordinates

The option Edit..., Grid Line Coordinates may be used to change the values for the x and y grid coordinates. Various buttons allow you to test the effect of different combinations of starting value, increment and end value.

Clicking on OK results in the program using the values shown for Start, Increment and End to determine both the number of grid lines and the values for them.

The other buttons have the following effect:

Show # lines required for Start, Increment, End:  Press this button if you have changed one or all of Start, End and Increment and want to find out how many grid lines will result from those changes.

Set grid lines to enclose all input data: Press this button if you wish to change Start, End and Increment so they enclose all the input data. See also Grid… Grid full dataset.

Set grid lines to enclose current 2d view: Press this button if you would like the program to calculate a Start, End and Increment based on the current, probably zoomed, 2d view of the data. See also Grid… Grid zoomed 2d view.

When the data is initially loaded QuikGrid will select a grid size that will contain approximately 4 times as many grid intersections as there are grid points (This multiplier may be changed - see Automatic Grid Size Ratio).

Distance cutoff

Some grid intersections are so isolated from any data points they should not be evaluated. The grid generation option Distance cutoff specifies a number that allows the program to flag a grid intersection as unevaluated if there are no data points in the neighborhood. It is also used along with the Scan bandwidth cutoff to limit the number of scattered data points examined during the evaluation of a grid intersection. The Distance cutoff specifies a percent of the Density Distance. If no points are found within this distance the grid intersection is flagged as being unevaluated.

If the data points tend to be clustered the area between the clusters may be set us unevaluated and not be contoured or displayed as a 3d surface. To force QuikGrid to evaluate these areas increase the value of the Distance Cutoff parameter. A value of 900 will normally be sufficient to fill in most areas. Higher values will slow down the speed of the grid generation. Note the Average Scan Bandwidth statistic during grid generation time. If this statistic is higher than 15 the Distance cutoff is probably set needlessly high. The time taken to generate the grid is also highly dependent on the average search shell statistic. When this number gets beyond 10 grid generation times increase rapidly.

This value may be changed with the Edit..., Grid Generation Options.

Edit... Data Input Options

Input data in the background: By default this is checked. This option exists to make the input of very large data files (typically greater than 100,000 data points) more user friendly. QuikGrid will display the progress as data is loaded and give you the opportunity to cancel data input.

Ignore lines in error or with blank fields: When this option is checked QuikGrid will not terminate with an error message if it encounters invalid data. If you have data files that have some coordinate information missing, for example, the z coordinate, this option allows QuikGrid to skip those data points. Use this option with caution.

Use old style metric or NOS input enables the same input format as accepted by version 3.4 and earlier versions of QuikGrid. During metric input line boundaries are ignored (More than one triplet may be put on a line). Numbers may only be separated by blanks.

Ignore comments during input: If your data lines contain extra information QuikGrid will, by default, collect this information as a comment to be attached to the data point. If you are loading a large number of data points this can generate an objectionable amount of overhead. Use this option to defeat collection of comments under any circumstances.

Reverse X and Y on data input, reverses the order of X and Y (or Latitude and Longitude) for data input.

Reverse sign of z on input has been added to handle depths, which have been recorded as positive numbers.

Ignore points with z value equal zero... is effective only for DCA data input and only takes effect when the data is read. The default is to ignore these points. If you don't want to ignore them deselect this option before reading in the data. Ignored data points will appear on the display and may be selected with the right mouse button. They will be ignored only during grid generation.

Automatic grid size ratio and Maximum automatic grid size  allow you to control the default size of grid assumed by QuikGrid immediately after data has been input.

Calculatate nice xy coordinates for metric style data causes QuikGrid to attempt to determine default values for the x and y coordinates that are pleasing to look at. Specifically it attempts to determine an increment that is a single digit number and a starting point that is an multiple of the increment. This option may cause the actual size of grid determined to be somewhat larger than the Maximum automatic grid size specified above. This option will not work for latitude/longitude data.

Input Field Positions: (Affects metric, general lat/lon and NOAA/NOS data points). Normal input reads the data in free format – the numbers may be separated from each other using blanks, commas or tab characters. This parameter allows you to specify which relative position the X, Y and Z parameters occupy. By default X, Y and Z occupy positions 1, 2 and 3 on the input line and everything following the 3rd number is treated as a comment. This option allows you to change this positioning. For example the values “2 1 3 4” would accomplish the same thing as checking “reverse x and y on data input”. Up to 10 positions may be accommodated so if the Z coordinate is in position 4 and the 3rd position is to be skipped specify “1 2 4 5”. If the comment is the last field everything to the end of the line is taken as a comment. If the comment is not last it will be terminated by the first blank, comma or tab character. If the position of the comment field is set to zero, comments will not be collected (an alternate way of “ignoring comments during data input”). The positional information is ignored if fixed format input is specified using a header line.

NOAA/NGS Field Positions: Because the lat and lon values are actually made up of three fields (ddd mm ss.ssss) the default positions are 1, 4, 7 and 8.

Sample only every nth data point instructs the program to only select every nth data point while reading the input file. By default n is equal to 1 so every data point will be read. If n is equal to 5 only a fifth of the data points will be read. See also sampling data points during grid generations.

Edit... Data Output Options

Output XYZ or GRD undefined values as … allows you to fill in the Z value you would like QuikGrid to use when writing undefined grid intersections to a file for XYZ or GRD output.

Use tab for xyz output data causes QuikGrid to use the tab character as a separator for File… Save data points to a file and File… Save grid as xyz triplets. If this is not checked a blank or space is used as the separator.

XYZ: Output undefined z values specifies that undefined grid intersections are to be output when the command File… Save grid as xyz triplets is used.

DXF3DFACE or VRML output - scale z coordinate: This option specifies that the Z coordinates in the DXF 3DFACE output or the VRML output are to be scaled according to the display screen vertical scale factor . Uncheck it if your x, y and z coordinates use the same units and you want to preserve the scaling.

Never label DXF contour polylines: By default QuikGrid will break up DXF contour lines to insert labels. This will cause problems for users who wish to select one entire contour line at a time in another application. This option will ensure that the contour lines will be defined by continuous DXF polylines.

Use Polylines for DXF output. If you prefer to have QuikGrid output the grid and contour line data using the DXF POLYLINE primitive check this box. Some applications allow you to manipulate a series of connected lines as a single entity if they are output using the POLYLINE primitive.

Output scattered data points on named DXF layers: Scattered data points may be placed on named DXF layers. The name is chosen by determining which two contour lines the point lies between and assigning the same name as the smaller contour line except that the characters CONTOUR in the label are replaced by SCATDATA. For example, a scattered data point may be assigned to the layer SCATDATA1_4, which means it lies between the 1.4 contour line and the next higher contour line.

Use high precision for DXF output: The default precision for DXF output is set to 12 digits. This precision works fine with AutoCAD but may adversely affect other programs that read the DXF format. Uncheck this option to use 6 digits of precision.

Edit... Input Options... Automatic grid size ratio and Maximum automatic grid size

These parameters control the size of grid QuikGrid will, by default, define after reading in a set of data points. An Automatic grid size ratio of 3 specifies that the grid should have approximately 3 times as many grid intersections as there are scattered data points. The dimensions of the grid are defined initially as sqrt(n*ratio) where n is the number of scattered data points and ratio is the value of this option. If Calculate nice xy coordinates for metric style data is enabled the grid dimensions may be increased further in order to accommodate a starting point and increment that is a pleasing number. This may cause the grid to be somewhat larger than the Maxmum automatic grid size. See also Edit..., Grid Line Coordinates.

These values may be changed using Edit..., Input Output Options. It does not take effect until the next data set is read in.

The number of grid lines may be later changed through the use of Edit…Number of grid lines… or Edit… Grid line coordinates. You may also take manual control of when a grid will be generated through Grid… …Generate grid automatically.

Edit... View data point options....

The Edit.... View data point options dialog box allows you to select what information will be displayed when View... with data points is checked. The following options are available:

Display Marks: A small cross is displayed at the exact position of the data point.
Point Number
: A point number indicating input order (The 5th point read is point number 5).
X,Y coordinates
: The x, y coordinate is displayed next to the point.
Z coordinates
: The z coordinate is displayed next to the point.
Comments
: Any comments associated with the point are displayed.
Connect points
: The points are connected by lines in the order they were input.
Points inside the grid only
: Only data points that are within the grid boundaries will be displayed.

For the comments only, if Display Marks is not checked and a comment is attached to a data point, a mark will be displayed next to the comment for that data point only.

Edit... Vertical Scale Factor (shape of the surface)

Typically the units used for the x and y axis are quite different from the units used for the z axis. For example x and y may specify latitude and longitude and z may specify magnetometer measurements. For a perspective view of the surface it is often not practical to use the raw unscaled data as the resulting surface may look too flat to show relief detail or too "mountainous". The Vertical Scale Factor specifies that the z axis range should be scaled independently to be n% of the range of the x-axis. This parameter defaults to 60%.

If the Vertical Scale Factor is set to zero the z axis will not be scaled. In this case the x, y and z coordinates should all be in the same units.

Edit... Right mouse button options.

Edit... Right mouse button options... allows you to customize the title shown on the top of the dialog box produced when you right click on a data point and also to choose a much terser version of the dialog box that shows only the x and y location and comment associated with a data point.

Edit... Grid Generation Options... Edge Sensitivity

The algorithm QuikGrid uses to generate the grid is not good at extrapolation (evaluating grid intersections that have data points only on one side of it). This parameter specifies a percentage of the Density Distance. If the closest point to a grid intersection is farther away than this distance, the program examines the number of consecutive empty octants around the grid intersection. If there are 4 or more consecutive empty octants the grid intersection is not evaluated.

This value may be changed with the Edit..., Grid Generation Options .

Edit... Grid Generation Options... Set undefined grid loc'n to:

The grid generation option "Set undefined grid loc'n to:" controls how QuikGrid will handle undefined data points. If checked undefined data points will be assigned the specified value. For all purposes, undefined grid locations are treated as assigned that value. They will be displayed, contoured, etc.

Undefined grid locations may also be set to a value after grid generation is finished using Function… Set undefined grid intersections…. However, it can not be set to a specific value, only to either the minimum or maximum z value in the grid.

Window... Pan and Zoom Options:

The image may be magnified, shrunk or moved (panned) through use of the Window… menu, the left mouse button and use of the Page Up, Page Down, Home, End and arrow keys.

The amount of magnification, shrinkage or panning which will be performed is expressed as a percentage of the size (for magnify) or a percentage of the display window size for panning. The default is 150% for zooming and 10% for panning. A value of 200%, for example, would double (or half) the size of the image while zooming. A value of 10% for panning will move the image approximately 10% of the distance spanned in the x direction by the window.

Zooming (Window… operations)

Click anywhere with the left mouse button on the display of a 2d contour map or 3d surface to magnify that particular part of the picture. The Page Up and Page Down buttons may also be used to zoom in and out based on the centre of the display. The arrow keys may be used to move the image up, down, left or right. This is called panning. The amount of panning or zooming to be done is controlled by Edit… Zoom and pan options… .

Window..., Fit to screen(unzoom)
will restore the picture to its original size.

Window..., Freeze zoom level(Pan)
will defeat further zooming. In this state left clicking anywhere on the display will move the point under the cursor towards the middle of the display but not change the size of the picture. This allows you to "pan" about the map. Clicking on Zoom..., Freeze zoom again will enable zooming again.

Window..., Previous zoom
will back up to the previous picture.

Window..., Negative zoom
will result in the display shrinking when the cursor is clicked anywhere in the display. Clicking on it again will resume normal magnification.

Grid... Grid Resolution

When extremely large grids are displayed the image can often look like a dark blob on the screen. The grid lines are too close together to be distinguished. This will typically happen when much more than a few hundreds of lines are displayed.

The Grid Resolution menu is an attempt to alleviate this problem. It allows you to only display every nth (2nd, 3rd, 4th, 5th) grid line. So a 500 by 500 grid, with only every 5th line displayed would allow you to view the broad features of the surface. As you zoom in on the surface you would like to display more grid lines to resolve more features.

Grid... Set colour map to grid extents

The colour map is defined when the scattered data points, or original grid, is read in and is not changed automatically after that. As you zoom into and redefine a new grid on a data set the colour mapping may be come flat and uninteresting. Grid… Set colour map to grid extents will remap the colour gradient to the current grid.

Grid... crop 2d view

The menu item Grid… Crop 2d view allows you to select a subset of a grid, and data points (if any). This will speed up viewing of a small area of data when the grid is very large. Data points that are not inside the new view are discarded. It is necessary to input the data points again to return to the original view. This feature makes use of the already defined grid and is very fast. The subset of the data points selected may be written out to a file.

Grid... Template options

The Grid Template menu items allow you to lock a given set of grid coordinates into use so they will be used for future data input.

Handling unevenly distributed data

QuikGrid is designed to be straightforward to use for data which is reasonably distributed over the area to be contoured. In this situation it will generate a grid over the areas containing data points and leave blank areas which do not contain data points. If the data is not evenly distributed the default grid generation parameters may result in unwanted blank spaces (undefined grid coordinates) in the display. The menu selection Edit..., Grid Generation Options may be used to alter the default parameters to fill in these areas.

In particular the Distance cutoff parameter is most often used to force QuikGrid to fill in grid coordinates further away from the input data points. Increasing this parameter will increase the amount of time it takes QuikGrid to generate the grid.

See also under Questions and Answers, 5. Can QuikGrid be configured to define "undefined grid locations" to remove gaps in the contours?

Handling large amounts of input data

The viewing of large numbers of data points may benefit from special planning and handling. The use of data sampling  can greatly speed up the initial look at a set of data, particularly if the final intention is to generate a dense grid on a zoomed view.

For example, when I am handling data points that number in the hundred's of thousands I might:

1. Turn off automatic grid generation. (turn off by clicking Grid... generate grid automatically so it is "unchecked").

2. Load in all the data points. (File... Load...InputScatteredData)

3. Set the sampling rate during grid generation to 5 or more. (Edit..., Grid Generation Options)

4. Generate a grid. (Grid... Generate grid now).

5. Zoom in on an area of interest in 2d mode.

6. Define a new set of grid lines to enclose the zoomed view (Grid… grid 2d view)

7. Set the sampling rate during grid generation to 1. (Edit..., Grid Generation Options).

8. Generate a new grid. (Grid... Generate grid now)

My final display is a high resolution view of the area of interest.

It is important, for performance reasons, that enough real memory is present to allow QuikGrid to operate efficiently. If a large amount of disk activity occurs during grid generation you may not have enough memory available to do the job in a reasonable length of time.

Viewing and Editing Grid Coordinate and Data Point Information

WARNING: This function is not enabled for a 3d hidden grid or 3d hidden coloured grid. Use the transparent grid option if you want to use the right mouse button in 3d mode.

Click anywhere with the right mouse button on the display of a 2d contour map or 3d surface to display a dialog box that shows the x, y and z data and the closest contour value for the nearest grid coordinate or data point. If a data point is selected the dialog box will also show whether the point was used for grid generation purposes and display any comments associated with the point.

If a data point is selected the "Do not use for grid generation" box may be checked to exclude (or include) the point for grid generation purposes. Also the comments and the z coordinate may be edited. Including or excluding a data point will trigger re-generation of the grid unless grid generation has been put under manual control.

If a grid intersection is selected the z coordinate may be changed. If you change one of these settings click on OK for it to take effect. The z coordinate may not be set to a smaller value then the minimum z value in the grid.

The edited data points may be saved to a file using File… Save data points to a file . Ignored data points will not be written out.

Use caution when interpreting the value of the closest contour line!

The contour line is the one closest to the selected data point or grid coordinate not the mouse position. The contour line is the nearest in the "z" direction only. The shape of the surface and how it is being viewed may make the contour line not appear visually closest on the display. The indicated contour line may not be visible at all if the grid coordinate or data point is at the top of a hill or bottom of a valley.

Changing grid intersections to other values

The Function… menu allows you to perform the following operations on a grid:

You may also edit grid intersections by clicking on one using the right mouse button.

Handling meteorological data

Two functions make QuikGrid more useful for viewing meteorological data. Wind speed and direction may be displayed as wind arrows. The length of the arrow indicates the magnitude of the wind. The direction of the arrow indicates where the wind is coming from (like a weather vane). The speed and direction arrows can be viewed along with one other variable, for example, pressure as a contour map.

The speed and direction data is stored in the speed Layer, and the direction layer. When these two special areas have data in them, and the view is a 2d view, QuikGrid will display the information as wind arrows, superimposed on top of the standard grid. .

The creation of these grids is done through the following steps:

When both steps are complete the 2d from above.. view will show the speed and direction layers as arrows, the length of the arrow representing the magnitude of the speed.

The wind arrows will not be displayed in the 3d view. Turning off Grid... ... lock current grid as template will delete the speed and direction layers and return QuikGrid to the normal display.

Command files may be used to automate the generation of the three grids. Here is an example.

Using the colour layer

Function... Copy grid as colour grid and lock template will save the current grid in a special area called a "colour layer". In 2D view, if the colour layer exists, and View… with hidden coloured grid is selected the colour layer will be used to colour the grid squares. You may then input another set of data, generate a new grid and overlay it on the colour layer as a contour map. Both sets of data must be generated against the same grid layout, which is why the grid template is locked.

For the 3d view the actual surface shape is derived from the current grid. The colour of the grid squares is derived from the colour layer. Only the intersection of the colour layer and the current grid will be coloured.

To remove the colour layer display simply uncheck Grid... lock current grid as template. The colour Layer will be removed and the colour mapping for the current grid will be displayed.

If you use Edit... Colour of features to change the colour mapping it will affect only the colour layer, while it exists. When you uncheck Grid... lock current grid as template the colour map for the current grid will be restored.

Function... Colour layer = colour layer - grid will replace the values in the colour layer with the difference between the previous values in the colour layer and the values in the current grid. In effect the colour layer will show the difference in z values between the current grid and the previous colour layer. This allows you to visualize what parts of the grid contribute to the "Volume Difference". Although the colour layer is replaced the Volume Difference is not recalculated. (In all other cases replacing the colour layer results in recalculation of the Volume Difference).

Associating file types with QuikGrid

You may drag a data file and drop it on top of a QuikGrid Icon and it will load and display that file.

QuikGrid may be associated with files with specific extensions using the View… Options feature of the Windows File Explorer. For example you may make an association between files with the extension .xyz and QuikGrid, so you can double click on a file with that extension and QuikGrid will automatically load the file, generate a grid and display it.

QuikGrid recognizes what kind of data is in the file through means of its suffix. For example if you drag and drop a file named input.xyz QuikGrid will assume it is a metric data set because the file suffix is “xyz”. QuikGrid may be run from a command line or .bat file or Shelled to from another to automatically generate a grid, and optionally save it to a file. If an output file is specified QuikGrid will terminate execution after generating the output file. For example the Visual Basic command Shell("c:\quikgrid\quikgrid.exe c:\mydata\input.xyz c:\mydata\output.qg ", 3) will load the file input.xyz, generate a grid from it, output the file output.qg in the QuikGrid format and then terminate. The file extensions recognized by QuikGrid are:

For input: .

.QCF (or .cmd - obsolete) is a command file.
.DCA - is a DCA surveyors formatted file.
.DEM - is a 1 degree USGS DEM file.
.DXF or .3DF - is a dxf file of some sort.
.LL - is a standard formatted lat/lon file.
.NOS - is a NOS formatted lat/lon file.
.OUT - is an outline file.
.QG - is a QuikGrid formatted DEM file.
.XYZ - is a metric formatted scattered data set.

All others are assumed to be metric XYZ files. For example if you drag and drop a file called mydata.txt QuikGrid will assume it is a metric scattered data set.

For output:

.QG - will output the grid in the QuikGrid format
.ERS - will output the grid in the ER Mapper format.
.DXF - will output the display in the DXF format.
.3DF - will output the grid in the 3D DXFACE format.
.XYZ - will output the grid in the XYZ scattered data format.
.GRD – will output the grid in the Surfer .GRD data format.
.WRL - will output the grid in the VRML format.

For all others QuikGrid will output the grid in the XYZ scattered data format
.

Processing a command file

QuikGrid is capable of processing series of commands from a file. For example you could put commands in a file to set a predesigned grid layout, then input a set of scattered data points, then set custom contour values for the grid. It is also possible to simply shell to QuikGrid from a Visual Basic program specifying an input file and output file on the command line. See File Associations for more details.

Most commands implement what can be accomplished with a QuikGrid pull down menu or dialog box, so a sequence of commands can be tested ahead of time by stepping through the process. Printing this section may make the task of creating command files easier. Not all menu functions are implemented as commands.

Command files cannot be interrupted during the reading of data points or grid generation (other than using ctrl-alt-del).

The following commands are implemented. Case is not important. Words enclosed in {…} are optional. Words enclosed in […] are required values you must supply.

The following bold faced words are “noise” words that may be included at any time to improve readability: a, and, as, current, cutoff, data, every, format, from, in, layer, minus, options, point, points, sensitivity, sign, surface, to, and with. Color and Colour are equivalent and may be interchanged freely. QuikGrid will not accept a file name which is the same as a “noise” word or a command word unless it is enclosed in quotes. Thus File Input Metric data will not work as expected if the file name is “data” but File Input Metric “data” will.

The File… Menu

The View… Menu

The choice of "on" or "off", {on|off}, can be omitted in which case "on" is assumed. Thus "View Hidden Coloured Grid on" is the same as "View Hidden Coloured Grid".

The Edit… Menu

You may delete the final two numbers in the ContourLines command. For example the command Edit Contour Lines 10 will result in a spacing of 10 units between labeled lines, zero unlabelled lines between them and the LabelPrecision will be left unchanged.

The Grid… Menu

The Function… Commands

No equivalent Menu action

Each command must be on one line. Including the full path description for filenames will avoid confusion about where the default directory is. Embedded blanks may be included in file names, but do not enclose file names in quotes. QuikGrid displays the progress in the Title bar. Blank lines may be interspersed to improve readability.

If the commands are placed in a file with the suffix , you may link (or Shell) to QuikGrid using the name of the command file as the only argument and QuikGrid will automatically process the command file on startup. If you set a file association between the suffix and QuikGrid you may place a command file on your desktop and simply double click it to automatically bring up a version of QuikGrid which processes the that command file . File associations are created under Windows using Folder Options and adding to the registered file types and associating it with QuikGrid. Using this technique QuikGrid can be customized to handle your own particular situation.

1. Command File Example: Read metric data and set contour lines

File Input Metric
Edit Contour Lines 10 3

The above commands will result in QuikGrid prompting you for a data file, read it, generate a grid, set the contour lines so that there is a bold labeled line every 10 units with 3 normal unlabelled contour lines between them.

2. Command File Example:- Viewing differences between two surfaces.

edit input reverse z
edit input sample 3
file input metric before.xyz
function copy grid to colour
file input metric after.xyz
view volume difference
function colour layer = colour layer – grid
Edit vertical scale factor 0

The above sequence is intended to read in data representing depth’s. The first command reverses the sign of the z coordinate so they are negative. Because the x, y and z coordinates all use the same units, the last command disables artificial scaling of the vertical (z) axes for 3d viewing.

3. Command File Example: Generating a meteorological display

Edit Grid Template -35 1 15 30 1 65
File Input Outline c: \coastlines\EastAtlantic.out
File Input Metric c:\data\direction.xyz
Function Copy Grid To Direction
File Input Metric c:\data\speed.xyz
Function Copy Grid To Speed
File Input Metric c:\data\pressure.xyz
Edit Contour Lines 10 3
View LatLon ON

The above sequence of commands are designed to produce a meteorological display of the East Atlantic. The Grid Template command defines the area to be covered. In this case the latitude is from 35 west to 15 east in steps of 1. Similarly the longitude is from 30 north to 65 north in steps of 1. The File Input Outline command reads in coastline data for the area. The File Input Metric command reads in the data describing wind direction. It is followed by the command to copy the generated grid to the direction layer. Similarly the next two commands input the data describing the wind speed and copy it to the speed layer. Finally the data describing the pressure is input and the contour lines are set. The View LatLon command forces QuikGrid to display the grid in degrees, minutes, seconds form instead of degrees and fractions of a degree.

The resultant display, assuming the data files are set up properly, would show wind arrows for the East Atlantic and contour lines showing the barometric pressure in the same area.

4. Command File Example: View XYZ data points that represent a grid

Edit Grid Template 0 1 708 0 1 764
File Input Metric data points
Grid Automatic grid resolution ON

If your data points already define a grid you can use a command file to define a grid that uses exactly the same grid coordinates as the data points. This will greatly speed up grid generation.

The above commands will result in QuikGrid defining a 708 by 764 grid and then prompt for a file containing metric data points in the XYZ format. Because the size of the grid is quite large it can take quite a while to display the image in full color. Turning on Grid ResolutionGridResolution will result in only about 200 grid lines being displayed initially. As you zoom in more grid lines will be displayed until you have full resolution.

Using QuikGrid under UNIX/LINUX

Use WINE to run QuikGrid under Linux/Unix. See http://www.winehq.com/ for more information about WINE. I have tested QuikGrid using WINE release 0.9.46 using Ubuntu (Debian) Linux (Nov./07), and more recently using release 1.2.1 (Nov/10). To install QuikGrid simply install it the same way you would under MS Windows using WINE to run the installer. Access to the help file is limited.

Using QuikGrid from other programs (Visual Basic)

QuikGrid can be used from other programs, for example Visual Basic. This may be useful if the input data needs to be manipulated in some special way in advance. It may also facilitate the processing of a series of similar data sets in a sequence.

The simplest way to use QuikGrid in this fashion is to simply shell to QuikGrid specifying an input file to process and, optionally, an output file to place the results. For example the Visual Basic statement Shell("c:\Program Files\QuikGrid\quikgrid.exe c:\mydata\test.xyz", 3) will read in the file text.xyz as a set of metric scattered data points, generate a grid and then leave you in QuikGrid to view the result. The statement Shell("c:\Program Files\QuikGrid\quikgrid.exe c:\mydata\test.xyz c:\mydata\result.qg", 3) will cause QuikGrid to read in test.xyz, generate a grid, generate the file result.qg in the QuikGrid format and then terminate. The recognition that test.xyz is a metric data set and that result.qg is to be a QuikGrid formatted file is done through an association between the file extension, “xyz”, and metric data points. See File Associations for full details. If the file name contains blanks it should be enclosed in quotes as well, for example: Shell("c:\Program Files\QuikGrid\quikgrid.exe c:\mydata\test.xyz c:\mydata\""name with blanks.qg"" ", 3).

More complicated situations can be handled by using QuikGrid Command Files . In this situation what happens is controlled by the series of commands present in an input file. An example might be Shell("c:\quikgrid\ quikgrid.exe c:\mydata\test.qcf", 3) . The extension “.qcf” identifies the file to QuikGrid as a QuikGrid Command File.

Copyright, copying and Redistribution Conditions and Disclaimer

QuikGrid Version 5.4
Copyright Ó
1993 - 2010 by John Coulthard

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the QuikGrid program as the file gpl.txt;

You may get a copy at the Free Software Foundation web site at http://www.fsf.org/licensing/licenses/gpl.txt. Or you may write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Persons who are unfamiliar with machine contouring and grid generation techniques may find articles in the June, 1992 issue of Geobyte interesting. A quote from the conclusion of the article "Contouring: Art or Science?" by Daniel J. Tearpock, p 43, reads "...contour maps are interpretations - they are not absolutely correct. "

Algorithm

Grid generation:

Each grid intersection is divided into octants. The closest data point in each octant is found. The intersection is set to the average of these points weighted by 1/(distance from grid intersection)**2.

Algorithm

Any given grid intersection may be flagged as unevaluated. This may happen because there are no data points nearby (controlled by the Distance Cutoff parameter), or because the grid intersections are on the edge of a region that does not contain data points (controlled by the Edge Sensitivity).

It can probably also be described as a Nearest Neighbour algorithm, with 8 sectors. QuikGrid is fast because the algorithm lends itself to an efficient implementation on the computer.

Contouring:

The grid squares are triangulated by taking the midpoint of each grid as the average of the four corners. This yields only one way a contour line can traverse the grid square. Linear interpolation is used to determine the contour crossings.

Hidden Surface Drawing:

The hidden surface is displayed by drawing the grid squares from the back to the front (as viewed) using polygon fill. Only the grid and axes will be hidden. All other, features, for example the contour lines or outline data are always displayed.

Metafile

A metafile is a representation of a picture that consists of descriptions of the individual elements that make up the picture( the lines, rectangles, text and so forth). With an appropriate drawing package, for example Microsoft Draw that comes with Word for Windows, it is possible to edit (scale, delete, move...) each individual element in the image. The individual elements are the grid lines, each contour line, the title and so forth. Packages like Microsoft Paint will automatically convert the metafile to a bit map.

Density Distance

The Density Distance can be thought of as approximately the average distance between points if the points were evenly distributed throughout the grid. It is the diameter of a circle that has an area equal to the total area of the grid divided by the total number of scattered data points.

Unevaluated Intersections

Unevaluated intersections, unless you specify they be defaulted to a given value (see Set undefined grid loc'ns ) will not be contoured, nor will they be displayed as part of the gridded surface.

Limitations

The following limitations exist:

Number of Data Points: QuikGrid is configured to handle up to 128 million data points. Currently the largest data set I am aware of that has been used was about 40 million points. The number of data points that can be handled will be limited by the amount of memory available. If there is a lot of disk activity while the grid is being generated your machine may not have enough memory to allow the calculations to be done in a realistic time frame. Roughly speaking you must allow for a minimum of 25meg of memory for every million data points plus memory for the grid(X grid size * Y grid size * 4). A 4000x4000 grid will take 64meg.

Grid size: 8000 by 8000 lines.

Contour lines: 1000 contour lines.

Artifacts (unexpected results).

QuikGrid suffers from the same artifacts that all grid generation schemes share. For example the contour lines may not "honour" the scattered data points (i.e. the contour line may go on the wrong side of the data point - this is because it is the generated grid being contoured, not the original data points).

The algorithm works best with scattered data points that are more or less evenly distributed. The most common artifact is typically a "ripple" in the generated grid that is oriented at a 45 or 90 degree angle. This may become pronounced if your scattered data points tend to be oriented in rows or columns. The effect is generated as a column or row of data points moves from one octant to another as grid intersections are evaluated.

The algorithm is interpolative, not extrapolative. If you ask it to extrapolate to the edges when there are no points "out there" the results may be quite strange (play with the Edge Sensitivity and Distance cutoff to experiment with this - different data sets will behave in different ways).

If the data points are clustered, leaving large areas of the grid with no data points nearby, the grid generation times will suffer. By default these grid intersections may be left unevaluated but you may over-ride this by used the Distance cutoff parameter (and increasing the grid generation time). If the scattered data points are very sparse in comparison to the grid (a dense grid), grid generation times will suffer. Basically anything that causes QuikGrid to shell out a long way to find data points will cause the grid generation time to suffer.

Questions and Answers

1. How do I get started?

Just start to use it! Simply reading in a data set, or loading the test data File... Load test data that comes with the program, will result in the display of a contour map. Then clicking on View... 3d Surface will result in the display of a grid with hidden lines removed that represents the surface. There is no need to understand or set any special parameters ahead of time. Then try "playing" with the options. QuikGrid is documented through its help facility.


2. How do I prepare my input data?

Unless your data is in a special format (like Submetrix) it should be available in an ordinary character or ASCII text file (the kind that can be edited with Notepad) as a bunch of x, y, and z coordinates, typically arranged one set per line. The numbers should be separated by blanks, commas or tabs.


3. What units should I use?

QuikGrid doesn't care what units you use. It will automatically scale the data so you get a reasonable display, except that it will assume the x and y axis use the same units. Often the units used for the x and y axis will be different from the units used for the z axis. For example x and y may be in feet and z represent a magnetometer reading. The z axis is scaled so that by default its range will be 60% of the range of the x axis. This factor may be changed through the use of the Vertical Scale Factor... If your x, y and z coordinates are all in the same units you can set the Vertical Scale Factor to zero to see the true undistorted representation of the surface.


4. The DXF output file doesn't produce the results I expected when I load it into .....

The DXF output is not designed as an alternative to copying the display to the clipboard. The data is output in the DXF 3D format (full x, y, and z coordinates for each item) with no rotation applied, regardless of how you may be viewing it. The expectation is that any desired rotations will be applied in the target software.

If the display is blank after loading the DXF file into AutoCAD (or other program) it is probably necessary to redefine the program's coordinate system to enclose the data. For example under AutoCAD Lite the command is View... zoom... extents.

If you want to copy the display over to a drawing package in order to "fix it up for publication" or overlay it on some other map, consider copying the display to the clipboard then pasting it into the target package.


5. Can QuikGrid be configured to define "undefined grid locations" to remove gaps in the contours?

The parameter to change to increase the "fill" between clusters of data points is the Distance Cutoff parameter under Edit... Grid generation options. Increasing this parameter to a large number, for example 1000, may cause a dramatic increase in grid generation time. This is to be expected and you will just have to decide if the wait is worth it for your particular situation. Manipulating the Edge Sensitivity, also under Edit... Grid generation options, will also improve the amount of fill.

You may also default undefined grid coordinates to a specific value under Edit... Grid generation options.


6. My XYZ data already represents a grid - any suggestions?

Many people are using QuikGrid to view xyz data which already represents a grid, for example DEM files which have been converted into the xyz format. The following trick greatly speeds up the grid generation. After you load the data go into Edit... Grid line coordinates and change the grid start and increment so it corresponds exactly to the grid layout of the input data. (You can display the marks and use the right mouse button to figure out what they are if you don't know). The surface presentation will map the input data precisely. If you tend to want to view a similar sized DEM very frequently consider setting up the commands to define the grid and prompt for an XYZ data file in a QuikGrid Command file. Here is an example command file to do this.


7. The DXF file will not load into....

The DXF file output has been tested with AutoCAD and I have had many reports that it works well with CorelDraw. But my mail also indicates that other packages may not accept the DXF output format produced by QuikGrid. I suspect this may be due to the fact that QuikGrid outputs the data using full 3D representation, which some packages may not accept. I also suspect it may be caused by the use of alphanumeric layer names.