<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Richard,</p>
<p>It would be interesting to have this as a built-in feature of the "line pattern fill" renderer in QGIS: being able to specify an angle relative to the longest line segment of a polygon.</p>
<p>I have the same issue for our black and white base map - see <a href="http://webgis.uster.ch/wsgi/webgisLauncher.wsgi?uuid=a6634a18-d37f-4997-b3d8-d4c3aed51716">http://webgis.uster.ch/wsgi/webgisLauncher.wsgi?uuid=a6634a18-d37f-4997-b3d8-d4c3aed51716</a></p>
<p>There we would like the line pattern fill angle to be 30 or 45 degrees relative to the longest side of a building. Currently all of these hatch-pattern fills are manually rotated ;-(</p>
<p>Meanwhile - until such a feature is available in QGIS - you could preprocess your data with a Python script be decomposing your polygon data to individual line segments, find the longest ones and get their angles. I would probably save this in a data-column to speed up rendering. But you said you can't do this - so maybe you really have to calculate this on the fly.</p>
<p>For data in Postgis one could write a plsql function to calculate these angles.</p>
<p>Sorry that I can't be of better help here. Just showing that I also have in interest in such a feature.</p>
<p>Andreas</p>
<p>On 2015-07-23 10:10, Richard McDonnell wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->Hi,<br /> I am in need of some guidance, I am trying to create an "active hatch/Fill" as part of a style im working on. What I want is for a hatch to rotate depending on the orientation of a Polygon.<br /> For example, here is the same entity rotated, with the hatch rotating.<br /><br /><img src="cid:143764210055b0ad746f898702959913@carto.net" alt="" width="210" height="386" /><br /> The issue is I am working on a database, onto which I cant add any data (additional columns) to the tables, I would like to do this from within the styling.<br /> You can use an expression to denote the angle, so I was hoping to do it that way.<br /> I was looking to utilize the geometry of a bounding box, and calculate the angle of the diagonal, using something like<br /><br /> 180*atan((ymax - ymin)/(xmax - xmin))/$pi + 90<br /><br /> But I am not having any luck....If there is no way at present to do this, Might I put it forward as a possible new feature?<br /><br /> Regards,<br /><br /> Richard.<br /><br /><br /><br /><!-- node type 8 -->
<div style="font-family: Arial; font-size: 8pt;">OPW - Ag féachaint don am atá le teacht - Ag caomhnú ón am atá thart<br /> OPW - Looking to the future - Caring for the past<br /><a href="http://www.opw.ie/"><img src="/apps/assets/program/resources/blocked.gif" alt="" width="494" height="76" /></a><br /> Email Disclaimer: <a href="http://www.opw.ie/en/disclaimer/">http://www.opw.ie/en/disclaimer/</a></div>
<!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> Qgis-user mailing list<br /><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br /><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p> </p>
<div> </div>
</body></html>