[postgis-users] reverseWindingOrder and isClockwise in PostGIS
Paul Ramsey
pramsey at cleverelephant.ca
Wed Sep 30 11:32:33 PDT 2009
Then use ForceRHR to get the rings clockwise followed by Reverse to
get the order you want (counter clockwise).
P
On Wed, Sep 30, 2009 at 11:09 AM, Peter Freimuth <pfreimuth at arcor.de> wrote:
> Picavet Vincent schrieb:
>> Hello,
>>
>>
>>> today i am searching for a postgis based solution which gives
>>> me an answer on the question
>>>
>>> isClockwise(POLYGON)
>>>
>>> and if this is true
>>>
>>> reverseWindingOrder(POLYGON)
>>>
>>>
>>
>> PostGIS provides the following function :
>>
>> ST_ForceRHR(geometry)
>> Force polygons of the collection to obey Right-Hand-Rule.
>>
>> Does that suit your needs or you really want to test if your polygon is
>> clockwise ?
>>
>> Regards,
>> Vincent
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
> Hi Vincent,
> thanks for the quick and good response. Yes, i would like to check if
> the vertices of a polygon without inner rings are in a
> clockwise/counterclockwise order so that i can use |ST_Reverse to change
> this.
> At the end i want to dump the coordinates of a polygon in
> counterclockwise order using something like the dump_points function as
> described here
> http://www.spatialdbadvisor.com/postgis_tips_tricks/109/implementing-oracles-getvertices-function-in-postgis-st_dumppoints/
> !
> Kind regards,
> Peter
>
> |
> _______________________________________________
> 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