Created
September 25, 2012 22:18
-
-
Save mjumbewu/3784808 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| from django.core.management import setup_environ | |
| import settings | |
| setup_environ(settings) | |
| from django.conf import settings | |
| from django.contrib.gis.gdal import CoordTransform, DataSource, OGRGeometry, OGRGeomType | |
| from django.core.management.base import BaseCommand | |
| from django.db import connections, DEFAULT_DB_ALIAS, transaction | |
| from boundaryservice.models import BoundarySet, Boundary | |
| A = Boundary.objects.get(external_id='270532150') | |
| B = Boundary.objects.get(external_id='270532160') | |
| A.shape, B.shape = B.shape, A.shape | |
| A.simple_shape, B.simple_shape = B.simple_shape, A.simple_shape | |
| A.centroid, B.centroid = B.centroid, A.centroid | |
| A.save() | |
| B.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment