FitStreetWidthSettings

Street width fixer settings.

@example:
# Change street width and offset to abut nearby static geometry
segments = ce.getObjectsFrom(ce.scene, ce.isGraphSegment)
settings = FitStreetWidthSettings()
settings.setAdjustStreetOffsets(False)
settings.setMinStreetWidth(1)
settings.setMaxStreetWidth(50)
settings.setAdditionalMargin(1)
settings.setSidewalkScale("DONT")
ce.fitStreetWidths(segments, settings)

 

此处定义的方法如下:

getAdditionalMargin

getAdditionalMargin(self):

Gets AdditionalMargin field. Additional padding between streets and either other streets or static geometry.

@return: Value of AdditionalMargin field.  [float]

getAdjustStreetOffsets

getAdjustStreetOffsets(self):

Gets AdjustStreetOffsets field. Should the street offset be changed to better fit the shapes and/or streets? (Limited to street width).

@return: Value of AdjustStreetOffsets field.  [True/False]

getMaxStreetWidth

getMaxStreetWidth(self):

Gets MaxStreetWidth field. Maximum total street width when growing to fit static shapes.

@return: Value of MaxStreetWidth field.  [float]

getMinStreetWidth

getMinStreetWidth(self):

Gets MinStreetWidth field. Minimum total street width.

@return: Value of MinStreetWidth field.  [float]

getSidewalkScale

getSidewalkScale(self):

Gets SidewalkScale field. Defines the behaviour of sidewalks when streets are scaled.

@return: Value of SidewalkScale field.  ["DONT", "SCALE"] [str]

setAdditionalMargin

setAdditionalMargin(self, floatValue):

Sets AdditionalMargin field. Additional padding between streets and either other streets or static geometry.

@param floatValue: the new value. [float]

setAdjustStreetOffsets

setAdjustStreetOffsets(self, booleanValue):

Sets AdjustStreetOffsets field. Should the street offset be changed to better fit the shapes and/or streets? (Limited to street width).

@param booleanValue: the new value. [True/False]

setMaxStreetWidth

setMaxStreetWidth(self, floatValue):

Sets MaxStreetWidth field. Maximum total street width when growing to fit static shapes.

@param floatValue: the new value. [float]

setMinStreetWidth

setMinStreetWidth(self, floatValue):

Sets MinStreetWidth field. Minimum total street width.

@param floatValue: the new value. [float]

setSidewalkScale

setSidewalkScale(self, enumValue):

Sets SidewalkScale field. Defines the behaviour of sidewalks when streets are scaled.

@param enumValue: the new value ["DONT", "SCALE"]. [str]

常量

此类用于定义以下常量:

DONT = 'DONT'
SCALE = 'SCALE'