GRASS Programmer's Manual
6.4.2(2012)
|
Functions | |
def | normalize_whitespace |
Remove redundant whitespace from a string. | |
def | split |
Platform spefic shlex.split. | |
def | GetTempfile |
Creates GRASS temporary file using defined prefix. | |
def | GetLayerNameFromCmd |
Get map name from GRASS command. | |
def | GetValidLayerName |
Make layer name SQL compliant, based on G_str_to_sql() | |
def | ListOfCatsToRange |
Convert list of category number to range(s) | |
def | ListOfMapsets |
Get list of available/accessible mapsets. | |
def | ListSortLower |
Sort list items (not case-sensitive) | |
def | GetVectorNumberOfLayers |
Get list of vector layers. | |
def | Deg2DMS |
Convert deg value to dms string. | |
def | DMS2Deg |
Convert dms value to deg. | |
def | GetCmdString |
def | CmdToTuple |
Convert command list to tuple for gcmd.RunCommand() | |
def | PathJoin |
Check path created by os.path.join. | |
def | ReadEpsgCodes |
Read EPSG code from the file. | |
def | ReprojectCoordinates |
Reproject coordinates. | |
def | GetListOfLocations |
Get list of GRASS locations in given dbase. | |
def | GetListOfMapsets |
Get list of mapsets in given GRASS location. | |
def | GetColorTables |
Get list of color tables. | |
def | DecodeString |
Decode string using system encoding. | |
def | EncodeString |
Return encoded string using system locales. | |
def | UnicodeString |
Return unicode string. | |
def | GetFormats |
Get GDAL/OGR formats. | |
def | GetSettingsPath |
Get full path to the settings directory. |
Variables | |
formats = None |
def gui_modules.utils.CmdToTuple | ( | cmd | ) |
Convert command list to tuple for gcmd.RunCommand()
Definition at line 482 of file utils.py.
Referenced by gui_modules.psmap_dialogs.Instruction.SetRegion().
def gui_modules.utils.DecodeString | ( | string | ) |
def gui_modules.utils.DMS2Deg | ( | lon, | |
lat | |||
) |
def gui_modules.utils.EncodeString | ( | string | ) |
def gui_modules.utils.GetCmdString | ( | cmd | ) |
Get GRASS command as string. @param cmd GRASS command given as dictionary @return command string
Definition at line 454 of file utils.py.
Referenced by gui_modules.psmap_dialogs.Instruction.SetRegion().
def gui_modules.utils.GetColorTables | ( | ) |
def gui_modules.utils.GetLayerNameFromCmd | ( | dcmd, | |
fullyQualified = False , |
|||
param = None , |
|||
layerType = None |
|||
) |
Get map name from GRASS command.
Parameter dcmd can be modified when first parameter is not defined.
dcmd | GRASS command (given as list) |
fullyQualified | change map name to be fully qualified |
param | params directory |
layerType | check also layer type ('raster', 'vector', '3d-raster', ...) |
Definition at line 76 of file utils.py.
References gui_modules.utils.split().
Referenced by gui_modules.utils.GetTempfile().
def gui_modules.utils.GetListOfLocations | ( | dbase | ) |
Get list of GRASS locations in given dbase.
dbase | GRASS database path |
Definition at line 592 of file utils.py.
References gui_modules.utils.ListSortLower().
def gui_modules.utils.GetListOfMapsets | ( | dbase, | |
location, | |||
selectable = False |
|||
) |
Get list of mapsets in given GRASS location.
dbase | GRASS database path |
location | GRASS location |
selectable | True to get list of selectable mapsets, otherwise all |
Definition at line 615 of file utils.py.
References gui_modules.utils.ListSortLower().
def gui_modules.utils.GetSettingsPath | ( | ) |
Get full path to the settings directory.
Definition at line 767 of file utils.py.
References gui_modules.utils.split().
def gui_modules.utils.GetTempfile | ( | pref = None | ) |
Creates GRASS temporary file using defined prefix.
pref | prefer the given path |
Definition at line 45 of file utils.py.
References gui_modules.utils.GetLayerNameFromCmd().
def gui_modules.utils.GetValidLayerName | ( | name | ) |
Make layer name SQL compliant, based on G_str_to_sql()
def gui_modules.utils.GetVectorNumberOfLayers | ( | vector, | |
parent = None |
|||
) |
def gui_modules.utils.ListOfCatsToRange | ( | cats | ) |
Convert list of category number to range(s)
Used for example for d.vect cats=[range]
cats | category list |
Definition at line 197 of file utils.py.
References gui_modules.render.map.
Referenced by gui_modules.mapdisp_vdigit.VDigitWindow.OnLeftUpCopyLine().
def gui_modules.utils.ListOfMapsets | ( | get = 'ordered' | ) |
Get list of available/accessible mapsets.
get | method ('all', 'accessible', 'ordered') |
Definition at line 235 of file utils.py.
References gui_modules.utils.ListSortLower(), and gui_modules.utils.split().
def gui_modules.utils.ListSortLower | ( | list | ) |
Sort list items (not case-sensitive)
Definition at line 277 of file utils.py.
Referenced by gui_modules.utils.GetListOfLocations(), gui_modules.utils.GetListOfMapsets(), and gui_modules.utils.ListOfMapsets().
def gui_modules.utils.normalize_whitespace | ( | text | ) |
def gui_modules.utils.PathJoin | ( | args | ) |
def gui_modules.utils.ReadEpsgCodes | ( | path | ) |
def gui_modules.utils.ReprojectCoordinates | ( | coord, | |
projOut, | |||
projIn = None , |
|||
flags = '' |
|||
) |
Reproject coordinates.
coord | coordinates given as tuple |
projOut | output projection |
projIn | input projection (use location projection settings) |
Definition at line 555 of file utils.py.
References gui_modules.utils.split().
def gui_modules.utils.split | ( | s | ) |
Platform spefic shlex.split.
Definition at line 36 of file utils.py.
Referenced by gui_modules.gcmd.GError.__init__(), gui_modules.ghelp.AboutWindow.__init__(), gui_modules.psmap_dialogs.Text.__str__(), gui_modules.layertree.LayerTree.ChangeLayer(), g.check_dirs(), gui_modules.globalvar.CheckForWx(), gui_modules.globalvar.CheckWxVersion(), gui_modules.render.Map.Clean(), gui_modules.psmap.DialogDataChanged(), gui_modules.psmap_dialogs.RasterLegend.EstimateHeight(), gui_modules.psmap_dialogs.PageSetupDialog.getCtrl(), gui_modules.psmap.getFile(), gui_modules.globalvar.GetGRASSCmds(), gui_modules.utils.GetLayerNameFromCmd(), gui_modules.psmap_dialogs.GetMapBounds(), gui_modules.gcpmanager.GCP.GetNewExtent(), gui_modules.utils.GetSettingsPath(), g.install_extension_other(), g.install_extension_win(), g.install_extension_xml(), g.list_available_extensions(), gui_modules.utils.ListOfMapsets(), gui_modules.psmap.makePSFont(), gui_modules.dbm.AttributeManager.OnDataItemDeleteAll(), gui_modules.prompt.TextCtrlAutoComplete.OnEnteredText(), gui_modules.mapdisp.MapFrame.OnGoTo(), gui_modules.prompt.GPromptSTC.OnItemSelected(), gui_modules.gselect.TreeCtrlComboPopup.OnKeyUp(), gui_modules.gselect.TreeCtrlComboPopup.OnLeftDown(), gui_modules.ghelp.MenuTreeWindow.OnRun(), vkrige.KrigingPanel.OnRunButton(), gui_modules.ghelp.SearchModuleWindow.OnSelectModule(), gui_modules.gdialogs.DxfImportDialog.OnSetDsn(), gui_modules.gselect.GdalSelect.OnSetDsn(), gui_modules.gselect.GdalSelect.OnSettingsSave(), gui_modules.menudata.MenuData.PrintStrings(), gui_modules.psmap_dialogs.MapFrame.Read(), gui_modules.psmap_dialogs.Mapinfo.Read(), gui_modules.psmap_dialogs.VProperties.Read(), gui_modules.psmap.PsMapBufferedWindow.RecalculatePosition(), gui_modules.utils.ReprojectCoordinates(), gui_modules.gcpmanager.GCP.RMSError(), gui_modules.goutput.CmdThread.run(), gui_modules.profile.ProfileFrame.SetRaster(), gui_modules.psmap_dialogs.Instruction.SetRegion(), gui_modules.psmap_dialogs.MapFramePanel.update(), update_menudata.updateData(), gui_modules.psmap.UpdateMapLabel(), gui_modules.nviz_tools.NvizToolWindow.UpdateVectorPage(), python.vector.vector_db(), python.vector.vector_db_select(), and g.write_xml_modules().
def gui_modules.utils.UnicodeString | ( | string | ) |