PyANGKernel.GKLayer¶
- class GKLayer¶
Geographical objects container
Details
Aimsun organises objects in layers. The use of layers has a dual role: - to determine the drawing order (what is drawn over what) - to hold together related objects (for example: decorative elements in a layer, main roads in another)
Synopsis¶
Methods¶
def
__init__()def
contains()def
findLayer()def
fromMeters()def
getCS()def
getDrawMode()def
getFromScale()def
getLayers()def
getLevel()def
getNorthing()def
getObjects()def
getOwnStyle()def
getRotation()def
getScale()def
getStyle()def
getToScale()def
getTranslation()def
getUTMZone()def
getUnits()def
getUseRotation()def
getUseScale()def
getUseStyle()def
isExternal()def
isLayerVisible()def
resetDrawScale()def
selectAll()def
setAsExternal()def
setCS()def
setDrawMode()def
setDrawScale()def
setLevel()def
setMapMode()def
setNorthing()def
setRotation()def
setScale()def
setStyle()def
setTranslation()def
setUTMZone()def
setUnits()def
setUseRotation()def
setUseScale()def
setUseStyle()def
toDegrees()def
toMeters()def
useMapMode()
Virtual methods¶
def
nbObjects()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class GKLayerDrawMode¶
visibility type. See
getDrawMode
- __init__()¶
Is Editable? If it is objects on it can be selected and edited.
See also
Is Editable? If it is objects on it can be selected and edited. This function is used in 3D Selection.
- contains(obj)¶
- Parameters:
obj –
GKGeoObject- Return type:
Returns true if an object is in this layer
Find a layer in this layer using its internal name.
Converts a point from m to its coordinate system, if degrees is uses
toDegreesThe coordinate system for this layer. The initial value is empty (so it will look in the geomodel
getDefaultCS).- getDrawMode()¶
- Return type:
Get the draw mode for this layer. It can be: -
eNever: the layer will not be drawn. -eAlways: the layer will be always draw. -eScale: the layer will be draw bases on the view Scale: in the range [getFromScale(),getToScale()] the layer will be draw.Get the drawing scale. See
getDrawMode.Get the internal, unique, name for this layer.
- getLayers()¶
- Return type:
.QSetGKLayer
Returns all the layers in this layer.
Gets the layer’s level.
If true we are in the northern hemisphere
- getObjects()¶
- Return type:
.QSetGKGeoObject
Returns all the objects (no layers) in this layer.
- getOwnStyle()¶
- Return type:
Get the style for this layer.
Rotation of this layer when drawing it, in degrees.
Scale of this layer when drawing it.
- getStyle()¶
- Return type:
Get the style for this layer. If useStyle is set to false, * it returns the style of the layer that this layer belongs
Get the drawing scale. See
getDrawMode.Translation of this layer when drawing it.
the UTM zone for this layer. If 0 then use the UTM Zone set in the model ( GKModel::getUTMZone )
Get the layer units
Rotation of this layer when drawing it.
Scale of this layer when drawing it.
If true, when the view draw the objects on this layer it will use the style specified in this layer (using
getStyle). If false the objects will be draw with its how styles.Translation of this layer when drawing it.
Is this layer external? No object information will be saved as these objects are in an external file. The rest of the layer information, but, will be saved.
Test the visibility of this layer at a given zoom factor. If the zoom factor is -1 then this information will not be used (
eScalewill be consideredeAlways)Returns the number of objects (no layers) in this layer and all its sublayers (if onlyInThisLabel is false).
Remove all the objects of type “type” (or any type than inherits “type”) from this layer. The object is still alive in the model (not deleted, just removed from the drawing list).
If an object is removed all its top objects will be removed too.
- resetDrawScale()¶
Reset the drawing scale. *
- restoreExternalData()¶
Restores all the external data found on this layer and its sublayers. At this moment only GKExternalLayer (CAD but not GIS) and
GKImageobjects.- selectAll()¶
Select all the objects in this layer and all the objects that are inside any layer inside this layer (recursively).
- setAllowObjectsEdition(avalue)¶
- Parameters:
avalue – bool
Set the objects in the layer editables. See GKLayer::allowObjectEdition
See also
- setAsExternal(value)¶
- Parameters:
value – bool
Set this layer as external, no object information will be saved as these objects are in an external file. The rest of the layer information, but, will be saved.
- setCS(cs)¶
- Parameters:
cs – str
The coordinate system for this layer. The initial value is empty (so it will look in the geomodel
getDefaultCS).- setDrawMode(amode)¶
- Parameters:
amode –
GKLayerDrawMode
Set the draw mode. See
getDrawMode.- setDrawScale(afrom, ato)¶
- Parameters:
afrom – int
ato – int
Set the drawing scale. See
getDrawMode.- setInternalName(iname)¶
- Parameters:
iname – str
Set the internal, unique, name for this layer.
- setLevel(alevel)¶
- Parameters:
alevel – int
Sets the layer’s level. In order to also update the 2D view objects level in the layer, call the following function instead: * * layer.
getModel().getGeoModel().setLayerLevel( layer, alevel );- setMapMode(value)¶
- Parameters:
value – bool
If true draw this layer (and sub layers as a map)
- setNorthing(northing)¶
- Parameters:
northing – bool
If true we are in the northern hemisphere
- setRotation(value)¶
- Parameters:
value – float
Rotation of this layer when drawing it, in degrees.
Scale of this layer when drawing it.
- setStyle(astyle)¶
- Parameters:
astyle –
GKDrawStyle
Set the style for this layer.
Translation of this layer when drawing it.
- setUTMZone(zone)¶
- Parameters:
zone – int
the UTM zone for this layer. If 0 then use the UTM Zone set in the model ( GKModel::getUTMZone )
Set the layer units: It forces the recalculation of the geometry in the shapes using the incrementTick() call.
- setUseRotation(value)¶
- Parameters:
value – bool
Rotation of this layer when drawing it.
- setUseScale(value)¶
- Parameters:
value – bool
Scale of this layer when drawing it.
- setUseStyle(value)¶
- Parameters:
value – bool
Activate or deactivate the use Style option. See
getUseStyle.- setUseTranslation(value)¶
- Parameters:
value – bool
Translation of this layer when drawing it.
Converts a point in m to longitude (X) and latitude (Y) using the current UTM Zone and the current coordinate system
Converts a point from its coordinate system (
getUnits) to m- toMeters(value)
- Parameters:
value – float
- Return type:
Converts a point from “units” to m
Converts a set of points from its coordinate system (
getUnits) to m. The new points are placed in “res”.Converts a set of points from “units” to m. The new points are placed in “res”.
- unloadExternalData()¶
Unloads all the external data found on this layer and its sublayers. At this moment only GKExternalLayer (CAD but not GIS) and
GKImageobjects.If true draw this layer (and sub layers as a map)