[QGIS-Developer] Looking for my right and my left
Martin Dobias
wonder.sk at gmail.com
Thu Jun 21 06:25:39 PDT 2018
Hi again
On Thu, Jun 21, 2018 at 1:38 PM, DelazJ <delazj at gmail.com> wrote:
>>
>> It should be left/right when looking from the direction of the
>> original line. So for example if the original line goes from bottom to
>> the top, the left/right side should be the same as the map
>> orientation, but if the line goes from the top to the bottom, then the
>> left/right side would be reversed...
>>
> Sorry but still I do not get the relation with the behavior whether I set a
> positive or negative value.
>
> I draw a line from bottom to top
> then I snap to the lower point and trace with a positive offset: the new
> line is placed on the left side of the screen (should it? Positive value
> goes right), and coincidentally the left of the tracing direction.
> If I snap to the higher point and trace with the positive value: the new
> line is placed on the right side of the screen, and coincidentally still the
> left of the tracing direction.
>
> It looks like it has not to do with the _direction of the original line_ but
> with the direction of the trace. And that positive value rather goes to left
> (unlike doc statement)
Sorry for the confusion - I have checked again and you are right:
- direction is determined from the traced line (not the original line
orientation)
- positive offset = left side, negative offset = right side (as
documented in [1] - see GEOSOffsetCurve_r)
[1] https://geos.osgeo.org/doxygen/geos__c_8h_source.html
Cheers
Martin
More information about the QGIS-Developer
mailing list