On 21.04.2012 14:26, Rahkonen Jukka wrote:
>> For shapefiles, there's a shortcut that save a lot of computations w.r.t.
>> > the general algorithm, because the shapefile specification states that 
>> > outer
>> > rings should be described clockwise , whereas inner rings should be 
>> > described
>> > counter-clockwise.
> Thus it is 4 seconds vs. 32 seconds measured by Martin. It is a considerable 
> difference but perhaps Martin is
> not doing exactly the same thing.  Anyway, speed of OGR seems to be excellent.

i reused the polygon routines from OJ's shapefile reader in geometry converter 
and seem to remember that the shapefile code had comments explaining that it 
checks extensively because it does not trust that the counter/clockwise spec 
from above was respected by every shapefile writer. it actually "repairs" the 
ring direction if it encounters a hole/shell that has the wrong orientation.

..ede

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to