d.where
Identifies the geographic coordinates associated with point locations given in display coordinates.
d.where [-dlwf] [at=x,y [,x,y,...]] [input=name] [--verbose] [--quiet] [--qq] [--ui]
Example:
d.where
grass.script.run_command("d.where", at=None, input=None, flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("d.where")
Parameters
at=x,y [,x,y,...]
Display coordinates to convert
input=name
File from which to read coordinates ("-" to read from stdin)
-d
Output lat/long in decimal degree
-l
Output lat/long referenced to current ellipsoid
-w
Output lat/long referenced to WGS84 ellipsoid using datum transformation parameters defined in current location (if available)
-f
Output frame coordinates of current display monitor (percentage)
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
at : list[tuple[float, float]] | tuple[float, float] | list[float] | str, optional
Display coordinates to convert
Used as: x,y
input : str, optional
File from which to read coordinates ("-" to read from stdin)
Used as: input, file, name
flags : str, optional
Allowed values: d, l, w, f
d
Output lat/long in decimal degree
l
Output lat/long referenced to current ellipsoid
w
Output lat/long referenced to WGS84 ellipsoid using datum transformation parameters defined in current location (if available)
f
Output frame coordinates of current display monitor (percentage)
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
d.where is an interactive program that allows the user, using the pointing device (mouse), to identify the geographic coordinates associated with point locations within the current geographic region in the active display frame on the graphics monitor.
Each mouse click will output the easting and northing of the point currently located beneath the mouse pointer. A mouse-button menu is presented so the user knows which mouse buttons to use. The output is always printed to the terminal screen; if the output is redirected into a file, it will be written to the file as well.
Mouse buttons:
Left: where am i
Middle: draw to/from here
Right: quit this
The left mouse button prints the coordinates at the selected point, the middle mouse button allows you to query two points (they are connected by a line for convenience). Use the right mouse button to exit the module.
NOTES
This program uses the current geographic region setting and active frame. It is not necessary, although useful, to have displayed a map in the current frame before running d.where. The -d flag allows the user to optionally output latitude/longitude coordinates pair(s) in decimal degree rather than DD:MM:SS format. The -w flag is only valid if a datum is defined for the current project's coordinate reference system. If the -f flag is given the x,y frame coordinates of the active display monitor will be returned (as a percentage, 0,0 is bottom left).
EXAMPLE
Query position in map (North Carolina sample dataset):
d.rast elevation
d.where
SEE ALSO
d.what.rast, d.what.vect, g.region, v.what.rast, v.what.vect
AUTHORS
James Westervelt,
Michael Shapiro,
U.S. Army Construction Engineering Research Laboratory
SOURCE CODE
Available at: d.where source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f