Esempio n. 1
0
def poly_obj(idNum):
    p1 = geosPolygon(((0, 0), (0, 1), (1, 1), (0, 0)))
    p2 = geosPolygon(((1, 1), (1, 2), (2, 2), (1, 1)))
    mp = MultiPolygon(p1, p2)
    polygon = Polygon.objects.create(PolygonID=idNum,
                                     Polygon=mp,
                                     LandArea=1,
                                     WaterArea=1,
                                     InternalPLatitude=1,
                                     InternalPLongitude=1)
    return polygon
Esempio n. 2
0
def ahj_obj(db):
    p1 = geosPolygon(((0, 0), (0, 1), (1, 1), (0, 0)))
    p2 = geosPolygon(((1, 1), (1, 2), (2, 2), (1, 1)))
    mp = MultiPolygon(p1, p2)
    polygon = Polygon.objects.create(Polygon=mp,
                                     LandArea=1,
                                     WaterArea=1,
                                     InternalPLatitude=1,
                                     InternalPLongitude=1)
    address = Address.objects.create()
    ahj = AHJ.objects.create(AHJPK=1, PolygonID=polygon, AddressID=address)
    return ahj
Esempio n. 3
0
def ahj_obj(db):
    p1 = geosPolygon(((0, 0), (0, 1), (1, 1), (0, 0)))
    p2 = geosPolygon(((1, 1), (1, 2), (2, 2), (1, 1)))
    mp = MultiPolygon(p1, p2)
    polygon = Polygon.objects.create(Polygon=mp,
                                     LandArea=1,
                                     WaterArea=1,
                                     InternalPLatitude=1,
                                     InternalPLongitude=1)
    address = Address.objects.create()
    ahj = AHJ.objects.create(AHJPK=1,
                             PolygonID=polygon,
                             AddressID=address,
                             AHJID='63e32327-7a31-4a0c-a715-20d46355cc9e')
    return ahj
Esempio n. 4
0
def mpoly_obj():
    p1 = geosPolygon(((0, 0), (0, 1), (1, 1), (0, 0)))
    p2 = geosPolygon(((1, 1), (1, 2), (2, 2), (1, 1)))
    mp = MultiPolygon(p1, p2)
    return mp