Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Name

geo – Geographical coordinates handling

Unknown macro: {alias}

Syntax - Converting between coordinate systems

geo [cvt] [xy] [lla]

Syntax - Displaying geographical lines

geo [dra] [lon | lat] [fra] [col] [set]

Syntax - Annotate geographical axes

geo ann

Description

Handling and display of geographical coordinates.

The geo command has a syntax for coordinate conversion and display of geographical coordinates. The geo command is for instance applied in the menu script geodesy.tcl that comes up from Tools > Geographical Management . In order to learn the command and practical use one can look into the script. (Look in the Geocap installation directory under the Geodesy module).

Geodesywidget

The geo command uses coordinate information from the menu. This is handled through a special widget called geodesywidget which is designed to be used in tcl scripts. One can think of geodesywidget as a complex tcl variable that contains the coordinate and datum information seen in the panel.

The conversion menu in Geodesy.tcl is organized in two parts: 1) upper and 2) lower . The conversion is from upper to lower or the other way. Active data is alway part of the conversion as the input dataset.

Due to the geodesywidget the script code for conversion and display of geographical coordinates is relatively small.

Below is shown how the tcl code reads the upper and lower geodesywidget into two global variables called cu and cl . Those variables will be used in conversion control later on.

        # Setting upper and lower geodesywidget into a tcl variables
	set ::cu [geodesywidget]
	set ::cl [geodesywidget]

Arguments

geo cvt [low] coord

Unknown macro: {indent}

Convert active data from upper to lower. Or the other way if low is used. The result is in active.

Example showing coordinate conversion of a dataset

Active data will be converted from coordinates shown in upper to coordinates shown in lower geodesywidget. For this should work correct it is the users responsibility to secure that the coordinates in the upper geodesywidget is set correct to the coordinate system of active. Be aware that when a conversion command object is activated upon a dataset in the project, that dataset is make active before conversion starts.

proc GcGeodesy::convertActiveDataFromUpperToLower { } {
	geodesywidget setasupper $::cu
	geodesywidget setaslower $::cl
	geo cvt coord
}

geo xy [low] coord

Unknown macro: {indent}

Convert active data from upper to lower. Or the other way if low is used. The result is in active.

See also

axe - Axes display

Unknown macro: {pagebreak}
  • No labels