Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am translating an input that describes zones by mixing segments and arcs. Arcs are given by a center, 2 points (beginning/end of arc) and a direction (CW or CCW). In a first prototypes using GDAL, I inspected once how the points were sorted after the call to .buffer() and made the assumption that they will always be in the same direction. Then I moved my code to shapely, and it looks like the direction used is not the same, so I'm back to inspecting and hardcoding the internal direction.

But my guess is that this is not the correct way of dealing with circle direction. Should I check after every calls to .buffer() the direction in which the points are ordered ? If so, is there a well known method to compute the direction ?

share|improve this question
    
Are you really just asking for a quick test to determine the ordering of vertices in a polygonal approximation to a circular arc? (If so, there's a simple one...) –  whuber Jan 13 '12 at 14:16
add comment

1 Answer

Sounds like a question for the GIS-Python list: http://lists.gispython.org/mailman/listinfo/community. (Note: in Feb 2011, I was thinking "why the hell do I have to field Shapely questions on some other forum?", but in Jan 2012 I am thinking "why the hell not?")

Update: In Shapely 1.2.10 there is a boolean .is_ccw property and an .orient() function for making particularly oriented copies of polygons .

share|improve this answer
1  
For those interested in the thread lists.gispython.org/pipermail/community/2011-February/… –  geographika Feb 16 '11 at 0:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.