Ejemplo n.º 1
0
    def test_reindexing(self):

        p = Point(-73.745631, 40.336791)
        p2 = Point(-78.745631, 44.336791)
        p3 = Point(0, 0)
        st = time.time()
        s = Shoreline(point=p, spatialbuffer=2)
        s.index(point=p2, spatialbuffer=2)
        s.index(point=p3, spatialbuffer=2)
        print "Reindexing Time: " + str(time.time() - st)
Ejemplo n.º 2
0
    def test_reindexing(self):

        p = Point(-73.745631, 40.336791)
        p2 = Point(-78.745631, 44.336791)
        p3 = Point(0, 0)
        st = time.time()
        s = Shoreline(point=p, spatialbuffer=2)
        s.index(point=p2, spatialbuffer=2)
        s.index(point=p3, spatialbuffer=2)
        print "Reindexing Time: " + str(time.time() - st)
Ejemplo n.º 3
0
    def test_multipart_shape_reindexing(self):

        p = Point(-73.745631, 40.336791)
        p2 = Point(-78.745631, 44.336791)
        p3 = Point(0, 0)
        st = time.time()
        shore_path = os.path.join(self.shoreline_path, "westcoast", "New_Land_Clean.shp")
        s = Shoreline(file=shore_path, point=p, spatialbuffer=1)
        s.index(point=p2, spatialbuffer=0.25)
        s.index(point=p3, spatialbuffer=0.25)
        print "Multipart Shoreline Reindexing Time: " + str(time.time() - st)
Ejemplo n.º 4
0
    def test_large_shape_reindexing(self):

        p = Point(-73.745631, 40.336791)
        p2 = Point(-78.745631, 44.336791)
        p3 = Point(0, 0)
        st = time.time()
        shore_path = os.path.join(self.shoreline_path, "alaska", "AK_Land_Basemap.shp")
        s = Shoreline(file=shore_path, point=p, spatialbuffer=0.25)
        s.index(point=p2, spatialbuffer=0.25)
        s.index(point=p3, spatialbuffer=0.25)
        print "Large Shoreline Reindexing Time: " + str(time.time() - st)
Ejemplo n.º 5
0
    def test_multipart_shape_reindexing(self):

        p = Point(-73.745631, 40.336791)
        p2 = Point(-78.745631, 44.336791)
        p3 = Point(0, 0)
        st = time.time()
        shore_path = os.path.join(self.shoreline_path, "westcoast",
                                  "New_Land_Clean.shp")
        s = Shoreline(file=shore_path, point=p, spatialbuffer=1)
        s.index(point=p2, spatialbuffer=0.25)
        s.index(point=p3, spatialbuffer=0.25)
        print "Multipart Shoreline Reindexing Time: " + str(time.time() - st)
Ejemplo n.º 6
0
    def test_large_shape_reindexing(self):

        p = Point(-73.745631, 40.336791)
        p2 = Point(-78.745631, 44.336791)
        p3 = Point(0, 0)
        st = time.time()
        shore_path = os.path.join(self.shoreline_path, "alaska",
                                  "AK_Land_Basemap.shp")
        s = Shoreline(file=shore_path, point=p, spatialbuffer=0.25)
        s.index(point=p2, spatialbuffer=0.25)
        s.index(point=p3, spatialbuffer=0.25)
        print "Large Shoreline Reindexing Time: " + str(time.time() - st)