<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
On your right! ;)<br>
<br>
If what you mentioned below is what you actually wanted, for
something general you would have to factor in which jurisdiction you
are in as to which side you drive.<br>
<br>
<div class="moz-cite-prefix">On 26/04/2023 10:18 pm, Shaozhong SHI
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+i5JwYr-RzGP8W3-K6+UDZT0bPijJmbQZsMXO8WzVO8OwpqLQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 25 Apr 2023 at
21:18, Richard Greenwood <<a
href="mailto:richard.greenwood@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">richard.greenwood@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">First you would have to define what valid
directionality is.
<div><br>
</div>
<div>In some cases valid directionality might be that all
roads project outward in a cardinal direction from an
origin. For example, city blocks running north-south or
east-west. In that case you could compare the X or Y
coordinates of the start and end points of a linestring
to verify that they were larger or smaller as
appropriate. e.g. that a north bound road's end point Y
was greater than its starting Y. Obviously your data
would have to have an attribute that identified if a
road was designated north-south or east-west.
<div><br>
</div>
<div>Another definition of a valid road direction is
that it is always radiating out like branches on a
tree. This is more common in rural addressing systems.
If that's your definition of "valid" then you need to
create nodes at the forks, compare these to your
linestring starting points and verify that a fork node
is not at the end of a linestring.</div>
<div><br>
</div>
<div>I'm sure there are other definitions of valid
directionality, these are just two that I have come
across in my work.</div>
<div><br>
</div>
<div>Rich</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Apr 25, 2023 at
4:10 AM Shaozhong SHI <<a
href="mailto:shishaozhong@gmail.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">shishaozhong@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">How best to check and validate
directionality of road lines?
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>David</div>
</div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">postgis-users@lists.osgeo.org</a><br>
<a
href="https://lists.osgeo.org/mailman/listinfo/postgis-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
</blockquote>
<div>It may be a feasible idea to check and validate road
lines depicting high ways. Direction of digitising
indicates the direction of road. To test for whether road
lines are parallel to each other. If you travel along one
road, you always expect the road line that is on your left
should travel in opposite direction.</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
<br>
</body>
</html>