Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

geo – Geographical coordinates handling Wiki Markup

{alias:geo}

Syntax - Converting between coordinate systems

...

Panel
bgColor#ffffaa
borderWidth1
borderStylesolid

geo line point

  • Will add a Field data column called Point Distance to active data and the content will be the distance to the previous point.

Description

Handling and display of geographical coordinates.

...

No Format
bgColor#eeeeee
borderWidth1

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

...

Arguments

geo cvt [low] coord

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

geo xy xcoordinate ycoordinate

Convert a coordinate pair from xy to Lon Lat or from Lon Lat to xy.

geo xy | lla coord

Convert active data from xy to Lon Lat or from Lon Lat to xy.

geo dra [lon | lat] [inc] [cut] [fra] [col]

Draw geographical coordinates for longitude (lon) or latitude (lat) direction.

lon | lat inc start stop increment - specify the start, stop and increment values for geographical lines.

cut - specify is the geographical lines is to be cut against the grid frame.

fra - specify is the grid frame is to be drawn.

col whi | red | yel ... - specify col of the geographical lines.

geo ann updown annofreq

Draw geographical annotation

updown - may contain NE | SE | NESW to describe where annotation is placed.

annofreq - is a number from 1 to 6 to describe the annotation frequency.

 

To see how to draw geographical annotation look into the procedure GcGeodesy::annotateGeoGrid in geodesy.tcl .

geo set [oldgeo | sticky | geolev]

Set options for drawing geographical lines.

oldgeo [off] - use old (previous) position for geographical lines.

sticky [off] - specify that the geographical lines will be glued to sticky_surface.

geolev value - specify that the geographical lines will be displayed at height level value.


Examples

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 ofactive. 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
}

Example showing coordinate conversion of one single point (coordinate pair)

proc GcGeodesy::convertSinglePoint { } {
	geodesywidget setasupper $::cu
	if {$GcGeodesy::convertOptionSingle == "From XY to LongLat"} {
		set x $GcGeodesy::easting
		set y $GcGeodesy::northing
		geo xy $x $y
		set GcGeodesy::longitude [gvar gen longitude]
		set GcGeodesy::latitude [gvar gen latitude]
	} elseif {$GcGeodesy::convertOptionSingle == "From LongLat to XY"} {
		set x $GcGeodesy::longitude
		set y $GcGeodesy::latitude
		geo lla $x $y
        # the result is saved in tcl variables
		set GcGeodesy::easting [gvar gen xcoord]
		set GcGeodesy::northing [gvar gen ycoord]
	}
}

Example showing coordinate conversion of active data

proc GcGeodesy::convertCoordinates { } {
	geodesywidget setasupper $::cu
	if {$GcGeodesy::convertOptionCoord == "From XY to LongLat"} {
		geo xy coord
	} elseif {$GcGeodesy::convertOptionCoord == "From LongLat to XY"} {
		geo lla coord
	}
}

Example from geodesy.tcl showing how to draw geographical coordinate lines

proc GcGeodesy::detailedGeoDisplay { } {
	geodesywidget setasupper $::cu
	set cut " "
	if {$GcGeodesy::framecut == 1} {set cut cut}
	if {$GcGeodesy::applevelGrid == 1} {geo set geolev $GcGeodesy::levelGrid}
	if {$GcGeodesy::sticky_grid == 1} {
		geo set sticky
		set cut " "
	}
	set GcGeodesy::coordsys [geodesywidget getcoordinatesystem $::cu]
	eval geo dra $cut lon "$GcGeodesy::longitudeStart" "$GcGeodesy::longitudeStop" inc "$GcGeodesy::longitudeInc" lat "$GcGeodesy::latitudeStart" "$GcGeodesy::latitudeStop" inc "$GcGeodesy::latitudeInc" col $GcGeodesy::colorGeogrid
	geo set sticky off
	geo set geolev off
}


Display examples of map with geographical coordinates

The first example is from the workflow Seismic and reservoir models - Course B1.


Cartographical display from course workflow

The next examples are nice displays with cartographic standard.

...

Image Modified
 Geographical coordinates from Atlantis demo project

...

Image Modified
 Cartographical display in Polar Stereographic projection

See also

axe - Axes display