[postgis-users] polygon_edges_numbering

Nicolas Ribot nicolas.ribot at gmail.com
Fri Aug 24 01:24:30 PDT 2012


Hi,

Yes, it seems possible:

• First force polygon orientation to be CW: st_forceRHR()
• Then, extract the polygons outer rings (st_exteriorRing) (if
polygons have holes or are multipolygons, you may want to deal with
these cases)
• With st_dumppoints(), you will dump the points forming theses
exteriors (linestrings). It will give you the index of the vertex.
• You will then be able to build edges if you need them
(st_makeLine()), or just number them virtually.

Nicolas

On 23 August 2012 19:56, Zmitser Kozhukh <zmitserk at mail.ru> wrote:
> hello!
> I've a question and would be really grateful if someone helps...dunno if it
> is a trivial thing to do...
> I have a polygon boundary and want to number all polygon edges starting from
> certain vertice for instance in clockwise direction....so the first edge to
> the left from certain vertice will have number one, then the next one to the
> left number two etc...until all edges will be numbered.
> does anyone have an idea how to do it?
> thanks a lot.
> storm_bringer
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list