Hi Nyall,
Interesting approach - need to test it if it works reliable with my data.
Thanks for sharing the idea.
Andreas
Am 24.07.2013 00:31, schrieb Nyall Dawson:
>
> Another approach is to use the ST_OffsetCurve function to create two copies
> of the linestring, one which is slightly offset to the left (eg
> "st_offsetcurve(geom, 1)"), and one which is offset to the right
> ("st_offsetcurve(geom, -1)"). Then you test the minimum distance from the
> point to each of the offset curves to determine whether it's closer to the
> left side or right side of the linestring.
>
> eg, something along the lines of:
>
> CASE WHEN ST_Distance(point_geom, ST_OffsetCurve(line_geom, 1)) <
> ST_Distance(point_geom, ST_OffsetCurve(line_geom, -1)) THEN 'left' ELSE
> 'right' END
>
> Hope that helps!
> Nyall
>
>
>
>
> On Wednesday, 24 July 2013 05:07:09 UTC+10, Andreas Neumann wrote:
>>
>> Hi Stephen and all,
>>
>> Thank you for your proposal. I think I will try your proposal with
>> projection and cross-product. Will write a PostgreSQL left_of function.
>>
>> Thanks,
>> Andreas
>>
>
>
>
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users