GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Functions | |
def | vector_db |
Return the database connection details for a vector map (interface to `v.db.connect -g'). More... | |
def | vector_layer_db |
Return the database connection details for a vector map layer. More... | |
def | vector_columns |
Return a dictionary (or a list) of the columns for the database table connected to a vector map (interface to `v.info -c'). More... | |
def | vector_history |
Set the command history for a vector map to the command used to invoke the script (interface to `v.support'). More... | |
def | vector_info_topo |
Return information about a vector map (interface to `v.info -t'). More... | |
def | vector_db_select |
Get attribute data of selected vector map layer. More... | |
def | vector_what |
Query vector map at given locations. More... | |
def python.vector.vector_columns | ( | map, | |
layer = None , |
|||
getDict = True , |
|||
args | |||
) |
Return a dictionary (or a list) of the columns for the database table connected to a vector map (interface to `v.info -c').
map | map name |
layer | layer number or name (None for all layers) |
getDict | True to return dictionary of columns otherwise list of column names is returned |
args | (v.info's arguments) |
Definition at line 98 of file vector.py.
References python.core.read_command().
def python.vector.vector_db | ( | map, | |
args | |||
) |
Return the database connection details for a vector map (interface to `v.db.connect -g').
Example:
map | vector map |
args |
Definition at line 38 of file vector.py.
References python.core.read_command(), and utils.split().
Referenced by python.vector.vector_db_select(), and python.vector.vector_layer_db().
def python.vector.vector_db_select | ( | map, | |
layer = 1 , |
|||
kwargs | |||
) |
Get attribute data of selected vector map layer.
Function returns list of columns and dictionary of values ordered by key column value. Example:
map | map name |
layer | layer number |
kwargs | v.db.select options |
Definition at line 173 of file vector.py.
References python.core.read_command(), utils.split(), and python.vector.vector_db().
def python.vector.vector_history | ( | map | ) |
Set the command history for a vector map to the command used to invoke the script (interface to `v.support').
map | mapname |
Definition at line 137 of file vector.py.
References python.core.run_command().
def python.vector.vector_info_topo | ( | map | ) |
Return information about a vector map (interface to `v.info -t').
Example:
map | map name |
Definition at line 149 of file vector.py.
References python.core.parse_key_val(), and python.core.read_command().
def python.vector.vector_layer_db | ( | map, | |
layer | |||
) |
Return the database connection details for a vector map layer.
If db connection for given layer is not defined, fatal() is called.
map | map name |
layer | layer number |
Definition at line 80 of file vector.py.
References python.core.fatal(), and python.vector.vector_db().
def python.vector.vector_what | ( | map, | |
coord, | |||
distance = 0.0 |
|||
) |
Query vector map at given locations.
To query one vector map at one location
To query one vector map with multiple layers (no additional parameters required)
To query more vector maps at one location
To query one vector map at more locations
map | vector map(s) to query given as string or list/tuple |
coord | coordinates of query given as tuple (easting, northing) or list of tuples |
distance | query threshold distance (in map units) |
Definition at line 232 of file vector.py.
References python.core.read_command(), and dialogs.type.