[postgis-users] Computing the lenght of a building's edges looking on a direction

Komяpa me at komzpa.net
Wed Jun 17 08:40:23 PDT 2015


Hello,

you can apply ST_ForceRHR, break your polygons into segments and sum length
of the ones that go from right to left, that is, where
ST_X(ST_StartPoint(geom)) < ST_X(ST_StartPoint(geom)).

That's basically visibility problem, been there somewhere around
https://github.com/Komzpa/Mapnik-Sheets/blob/master/3d-buildings/3dbuil.xml#L95

2015-06-17 18:12 GMT+03:00 Paolo Crosato <paolo.crosato at targaubiest.com>:

> Hi,
>
> I have a set of 2d polygons representing buildings. For each one, I have
> to find the lenght of the edges that look towards north.
>
> Here http://imgur.com/HgpO2yH there is a small picture with a test case,
> I have to compute the lenght of the red edges.
>
> Has anybody any suggestion on how to do this in postgis?
>
> Thanks for any input,
>
> Regards
>
> --
> Paolo Crosato
> Software engineer/Custom Solutions
> e-mail: paolo.crosato at targaubiest.com
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
xmpp:me at komzpa.net mailto:me at komzpa.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150617/ee2315fc/attachment.html>


More information about the postgis-users mailing list