I try to calculate the azimuth between a row of polygonsheets to print the number of the last and the next sheet inside the sheet in direction of the last and the next sheet. This should help to orient inside a big Project- Atlas with many sheets. The script (not complete):
for feature in layer.getFeatures():
count = layer.featureCount()
geom = feature.geometry()
polycent = geom.centroid().asPoint()
while i < count
azimuth = polycent[i].azimuth(polycent[i+1])
The error code is 'float' object has no attribute 'azimuth'
- but my polycent[i]
is no 'float' object - isn't it? How can I ask for the azimuth between the actual and the next centroid?
azimuth
is a point method. QgsPoint.azimuth(QgsPoint)