Exemplo n.º 1
0
def add_anonymous_boundary(request):
    request_dict = json.loads(request.body)
    srid = request_dict.get('srid', 4326)
    polygon = Polygon(request_dict.get('polygon', []), srid=srid)
    if srid != 3857:
        polygon.transform(3857)
    b = Boundary.anonymous(polygon)
    b.save()
    return {'id': b.id}
Exemplo n.º 2
0
def add_anonymous_boundary(request):
    request_dict = json.loads(request.body)
    srid = request_dict.get('srid', 4326)
    polygon = Polygon(request_dict.get('polygon', []), srid=srid)
    if srid != 3857:
        polygon.transform(3857)
    b = Boundary.anonymous(polygon)
    b.save()
    return {'id': b.id}
Exemplo n.º 3
0
def make_anonymous_boundary(n=1):
    b = Boundary.anonymous(make_simple_polygon(n))
    b.save()
    return b
Exemplo n.º 4
0
def make_anonymous_boundary(n=1):
    b = Boundary.anonymous(make_simple_polygon(n))
    b.save()
    return b