Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/l/i/linz2osm-HEAD/linz2osm/convert/processing/__init__.py   linz2osm(Download)
from linz2osm.convert.processing.river_direction import RiverDirection
from linz2osm.convert.processing.line_reverse import ReverseLine
from linz2osm.convert.processing.poly_winding import PolyWindingCW, PolyWindingCCW
from linz2osm.convert.processing.centroid import Centroid, PointOnSurface
 

src/l/i/linz2osm-HEAD/linz2osm/convert/processing/tests/test_poly_winding.py   linz2osm(Download)
from django.test import TestCase
 
from django.contrib.gis import geos
 
from linz2osm.convert.processing.poly_winding import PolyWindingCW, PolyWindingCCW
        ccw.reverse()
 
        p = PolyWindingCCW()
        self.assertEqual(True, p.ring_is_clockwise(cw))
        self.assertEqual(False, p.ring_is_clockwise(ccw))
        self.assertEqual(False, p.ring_is_clockwise(p.wind_ring(ccw, is_outer=False)))
 
        p = PolyWindingCCW()
        self.assertEqual(False, p.ring_is_clockwise(p.wind_ring(cw, is_outer=True)))
        self.assertEqual(False, p.ring_is_clockwise(p.wind_ring(ccw, is_outer=True)))
            for name, ring in geoms.items():
                print "layer=%s, data=%s" % (dir, name)
                p = PolyWindingCCW() if (dir == 'ccw') else PolyWindingCW()
 
                g_out = p.handle(geos.Polygon(ring))
            for name, rings in geoms.items():
                print "layer=%s, data=%s" % (dir, name)
                p = PolyWindingCCW() if (dir == 'ccw') else PolyWindingCW()
 
                g_out = p.handle(geos.Polygon(*rings))