[postgis-users] Check and validate directionality of road lines
Shaozhong SHI
shishaozhong at gmail.com
Wed Apr 26 03:18:18 PDT 2023
On Tue, 25 Apr 2023 at 21:18, Richard Greenwood <richard.greenwood at gmail.com>
wrote:
> First you would have to define what valid directionality is.
>
> 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.
>
> 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.
>
> I'm sure there are other definitions of valid directionality, these are
> just two that I have come across in my work.
>
> Rich
>
>
> On Tue, Apr 25, 2023 at 4:10 AM Shaozhong SHI <shishaozhong at gmail.com>
> wrote:
>
>> How best to check and validate directionality of road lines?
>>
>> Regards,
>>
>> David
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>
>
>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20230426/e648e161/attachment.htm>
More information about the postgis-users
mailing list