Friday, 25 December 2015

qgis - How to rotate a marker line in a polygon ring?



I've to rotate a marker line in a polygon ring by 180 degrees without rotating the same marker line at the polygon border (outline):


enter image description here


How can I do this in QGIS 2.18/2.99?



Answer



I could reproduce this in 2.18.3 with a scratch layer of type POLYGON, where i digitised both the outer ring (exterior) and hole (using the add ring tool) in a clockwise direction, and applied 180 degrees to the marker rotation. (Image on left)


I was able to get the result you were after by digitising the hole in an anti-clockwise direction... (Image on right)


enter image description here


It doesn't happen if you create a new SHAPEFILE layer; I assume this automatically corrects the hole so that its vertices go anti-clockwise.


Just to add to the confusion, it looks like you need to use a rotation value of 0 for a MULTIPOLYGON layer..


EDIT tried all 4 combinations of winding for the exterior and hole. It looks like the assumption is the exterior is assumed to be clockwise and holes anti-clockwise. This may not be the case for all formats. But provided holes use a different winding to the exterior, you should be able to get it to work.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...