예제 #1
0
 def test_convex_hull(self):
     r = session.query(Road).filter(Road.road_name=='Graeme Ave').one()
     eq_(session.scalar(functions.wkt(r.road_geom.convex_hull)),
         'POLYGON ((-88.547770872712135 42.698885396122932, -88.5912422100082 43.187101952731609, -88.602946031838655 43.088455460965633, -88.609633930027485 42.969745270907879, -88.547770872712135 42.698885396122932))')
     ok_(session.query(Spot).filter(Spot.spot_location.convex_hull == WKTSpatialElement('POINT(-88.5945861592357 42.9480095987261)')).first() is not None)
     eq_(session.scalar(functions.wkt(functions.convex_hull('POINT(-88.5945861592357 42.9480095987261)'))),
         'POINT (-88.594586159235689 42.948009598726117)')
예제 #2
0
 def test_convex_hull(self):
     r = session.query(Road).filter(Road.road_name=='Graeme Ave').one()
     eq_(session.scalar(functions.wkt(r.road_geom.convex_hull)),
         u'POLYGON((-88.5477708726115 42.6988853949045,-88.6096339299363 42.9697452675159,-88.6029460318471 43.0884554585987,-88.5912422101911 43.187101955414,-88.5477708726115 42.6988853949045))')
     ok_(session.query(Spot).filter(Spot.spot_location.convex_hull == WKTSpatialElement('POINT(-88.5945861592357 42.9480095987261)')).first() is not None)
     eq_(session.scalar(functions.wkt(functions.convex_hull('POINT(-88.5945861592357 42.9480095987261)'))),
         u'POINT(-88.5945861592357 42.9480095987261)')
예제 #3
0
 def test_convex_hull(self):
     r = session.query(Road).filter(Road.road_name=='Graeme Ave').one()
     eq_(session.scalar(functions.wkt(r.road_geom.convex_hull)),
         'POLYGON((-88.5477708726115 42.6988853949045,-88.6096339299363 42.9697452675159,-88.6029460318471 43.0884554585987,-88.5912422101911 43.187101955414,-88.5477708726115 42.6988853949045))')
     ok_(session.query(Spot).filter(Spot.spot_location.convex_hull == WKTSpatialElement('POINT(-88.5945861592357 42.9480095987261)')).first() is not None)
     eq_(session.scalar(functions.wkt(functions.convex_hull('POINT(-88.5945861592357 42.9480095987261)'))),
         'POINT(-88.5945861592357 42.9480095987261)')
예제 #4
0
 def test_convex_hull(self):
     r = session.query(Road).filter(Road.road_name=='Graeme Ave').one()
     eq_(session.scalar(functions.wkt(r.road_geom.convex_hull)),
         u'POLYGON ((-88.5477708728477 42.6988853969538, -88.5912422100661 43.1871019533972, -88.6029460317718 43.0884554581896, -88.6096339299412 42.9697452675198, -88.5477708728477 42.6988853969538))')
     # Oracle does not support ConvexHull for points
     ok_(session.query(Spot).filter(functions.equals(Spot.spot_location.convex_hull,
                                                     WKTSpatialElement('POINT(-88.5945861592357 42.9480095987261)'))).first() is None)
     eq_(session.scalar(functions.wkt(functions.convex_hull('LINESTRING(0 0, 1 1, 1 0)', diminfo_))),
         u'POLYGON ((0.999999915732742 8.48487373222706E-8, 0.999999915755202 0.999999915201249, 8.4273559349594E-8 8.48422467917753E-8, 0.999999915732742 8.48487373222706E-8))')
예제 #5
0
 def test_convex_hull(self):
     r = session.query(Road).filter(Road.road_name == 'Graeme Ave').one()
     eq_(
         session.scalar(functions.wkt(r.road_geom.convex_hull)),
         u'POLYGON ((-88.547770872712135 42.698885396122932, -88.5912422100082 43.187101952731609, -88.602946031838655 43.088455460965633, -88.609633930027485 42.969745270907879, -88.547770872712135 42.698885396122932))'
     )
     ok_(
         session.query(Spot).filter(
             Spot.spot_location.convex_hull == WKTSpatialElement(
                 'POINT(-88.5945861592357 42.9480095987261)')).first()
         is not None)
     eq_(
         session.scalar(
             functions.wkt(
                 functions.convex_hull(
                     'POINT(-88.5945861592357 42.9480095987261)'))),
         u'POINT (-88.594586159235689 42.948009598726117)')