当前位置: 首页>>代码示例>>Python>>正文


Python TestQgsPalLabeling.loadFeatureLayer方法代码示例

本文整理汇总了Python中test_qgspallabeling_base.TestQgsPalLabeling.loadFeatureLayer方法的典型用法代码示例。如果您正苦于以下问题:Python TestQgsPalLabeling.loadFeatureLayer方法的具体用法?Python TestQgsPalLabeling.loadFeatureLayer怎么用?Python TestQgsPalLabeling.loadFeatureLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在test_qgspallabeling_base.TestQgsPalLabeling的用法示例。


在下文中一共展示了TestQgsPalLabeling.loadFeatureLayer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUpClass

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def setUpClass(cls):
     TestQgsPalLabeling.setUpClass()
     cls.setUpServerProjectAndDir(TESTPROJPATH, TESTPROJDIR)
     cls.layer = TestQgsPalLabeling.loadFeatureLayer('background')
     cls.layer = TestQgsPalLabeling.loadFeatureLayer('point')
     cls.checkmismatch = 1000
     cls.checkgroup = ''
开发者ID:xxsurvey,项目名称:Quantum-GIS,代码行数:9,代码来源:test_qgspallabeling_server.py

示例2: test_polygon_placement_with_hole_and_point

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_polygon_placement_with_hole_and_point(self):
     # Testing that hole from a feature is not treated as an obstacle for other feature's labels
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point')
     polyLayer = TestQgsPalLabeling.loadFeatureLayer('polygon_with_hole')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.removeMapLayer(polyLayer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:11,代码来源:test_qgspallabeling_placement.py

示例3: test_multipolygon_obstacle

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_multipolygon_obstacle(self):
     # Test that all parts of multipolygon are used as an obstacle
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point')
     polyLayer = TestQgsPalLabeling.loadFeatureLayer('multi_polygon')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.removeMapLayer(polyLayer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:11,代码来源:test_qgspallabeling_placement.py

示例4: test_point_placement_narrow_polygon_obstacle

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_placement_narrow_polygon_obstacle(self):
     # Default point label placement with narrow polygon obstacle
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point')
     polyLayer = TestQgsPalLabeling.loadFeatureLayer('narrow_polygon')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.removeMapLayer(polyLayer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:11,代码来源:test_qgspallabeling_placement.py

示例5: test_point_ordered_placement4

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_ordered_placement4(self):
     # Test ordered placements for point (3 obstacle)
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point_ordered_placement')
     obstacleLayer = TestQgsPalLabeling.loadFeatureLayer('point_ordered_obstacle3')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.OrderedPositionsAroundPoint
     self.lyr.dist = 2
     self.checkTest()
     self.removeMapLayer(obstacleLayer)
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:13,代码来源:test_qgspallabeling_placement.py

示例6: test_point_dd_ordered_placement1

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_dd_ordered_placement1(self):
     # Test ordered placements for point with data defined order and obstacle
     self.layer = TestQgsPalLabeling.loadFeatureLayer("point_ordered_placement")
     obstacleLayer = TestQgsPalLabeling.loadFeatureLayer("point_ordered_obstacle_top")
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.OrderedPositionsAroundPoint
     self.lyr.dist = 2
     self.lyr.setDataDefinedProperty(QgsPalLayerSettings.PredefinedPositionOrder, True, True, "'T,B'", None)
     self.checkTest()
     self.removeMapLayer(obstacleLayer)
     self.removeMapLayer(self.layer)
     self.lyr.removeDataDefinedProperty(QgsPalLayerSettings.PredefinedPositionOrder)
     self.layer = None
开发者ID:GrokImageCompression,项目名称:QGIS,代码行数:15,代码来源:test_qgspallabeling_placement.py

示例7: test_point_dd_ordered_placement1

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_dd_ordered_placement1(self):
     # Test ordered placements for point with data defined order and obstacle
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point_ordered_placement')
     obstacleLayer = TestQgsPalLabeling.loadFeatureLayer('point_ordered_obstacle_top')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.OrderedPositionsAroundPoint
     self.lyr.dist = 2
     self.lyr.dataDefinedProperties().setProperty(QgsPalLayerSettings.PredefinedPositionOrder, QgsProperty.fromExpression("'T,B'"))
     self.checkTest()
     self.removeMapLayer(obstacleLayer)
     self.removeMapLayer(self.layer)
     self.lyr.dataDefinedProperties().setProperty(QgsPalLayerSettings.PredefinedPositionOrder, QgsProperty())
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:15,代码来源:test_qgspallabeling_placement.py

示例8: test_point_placement_around_obstacle

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_placement_around_obstacle(self):
     # Default point label placement with obstacle
     self.layer = TestQgsPalLabeling.loadFeatureLayer("point2")
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:GrokImageCompression,项目名称:QGIS,代码行数:9,代码来源:test_qgspallabeling_placement.py

示例9: test_point_placement_around

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_placement_around(self):
     # Default point label placement
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:9,代码来源:test_qgspallabeling_placement.py

示例10: test_point_placement_around_obstacle_large_symbol

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_point_placement_around_obstacle_large_symbol(self):
     # Default point label placement with obstacle and large symbols
     self.layer = TestQgsPalLabeling.loadFeatureLayer('point3')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:9,代码来源:test_qgspallabeling_placement.py

示例11: test_label_line_avoid_jaggy

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_label_line_avoid_jaggy(self):
     # Test that labeling a line using parallel labels won't place labels over jaggy bits of line
     self.layer = TestQgsPalLabeling.loadFeatureLayer('line_placement_5')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.Line
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:10,代码来源:test_qgspallabeling_placement.py

示例12: test_label_line_toward_center

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_label_line_toward_center(self):
     # Test that labeling a line using parallel labels will try to place labels as close to center of line as possible
     self.layer = TestQgsPalLabeling.loadFeatureLayer('line_placement_4')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.Line
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:10,代码来源:test_qgspallabeling_placement.py

示例13: test_prefer_more_horizontal_lines

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_prefer_more_horizontal_lines(self):
     # Test that labeling a line using parallel labels will tend to place the labels over more horizontal sections
     self.layer = TestQgsPalLabeling.loadFeatureLayer('line_placement_2')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.Line
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:10,代码来源:test_qgspallabeling_placement.py

示例14: test_small_polygon_placement_perimeter

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_small_polygon_placement_perimeter(self):
     # Default polygon perimeter placement for small polygon
     self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.Line
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:10,代码来源:test_qgspallabeling_placement.py

示例15: test_label_line_over_small_angles

# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import loadFeatureLayer [as 别名]
 def test_label_line_over_small_angles(self):
     # Test that labeling a line using parallel labels will place labels near center of straightish line
     self.layer = TestQgsPalLabeling.loadFeatureLayer('line_placement_3')
     self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
     self.lyr.placement = QgsPalLayerSettings.Line
     self.checkTest()
     self.removeMapLayer(self.layer)
     self.layer = None
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:10,代码来源:test_qgspallabeling_placement.py


注:本文中的test_qgspallabeling_base.TestQgsPalLabeling.loadFeatureLayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。