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
<ContiguityOverrides> | |
<ContiguityOverride id="391230503021020" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021085" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021014" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021019" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021043" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021040" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021018" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021036" connect_to="390439901000008" /> | |
<ContiguityOverride id="391230503021021" connect_to="390439901000008" /> |
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
Index: calculators.py | |
=================================================================== | |
--- calculators.py (revision 1396) | |
+++ calculators.py (working copy) | |
@@ -788,6 +788,8 @@ | |
count = 0 | |
for district in districts: | |
+ if district.geom.empty: | |
+ continue |
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
Index: /projects/publicmapping/trunk/django/publicmapping/redistricting/models.py | |
=================================================================== | |
--- /projects/publicmapping/trunk/django/publicmapping/redistricting/models.py (revision 1404) | |
+++ /projects/publicmapping/trunk/django/publicmapping/redistricting/models.py (working copy) | |
@@ -413,19 +413,19 @@ | |
# Searching inside the boundary | |
if level != base_geolevel: | |
# Search by geometry | |
- q_geom = Q(geom__within=boundary) | |
+ q_geom = Q(geom__within=boundary.buffer(1)) |
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
-- Gather the county geometries from the blocks | |
select b.id, b.name, st_union(a.geom) as geom into temp new_county_geoms from redistricting_geounit as a join redistricting_geounit as b on a.geom && b.geom where b.geolevel_id = 3 and a.geolevel_id = 1 and position(b.portable_id in a.portable_id) = 1 group by b.id, b.name; | |
-- Index the id column for a faster join when updating | |
create index new_county_id on new_county_geoms (id); | |
-- Update your counties | |
update redistricting_geounit as a set geom = multi(b.geom) from new_county_geoms as b where a.id = b.id; | |
-- Gather the place geometries from the blocks |
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
OH State Senate | |
District 23 - Block in wrong district in CSV at line 251513 | |
390351171011005,023 -> 390351171011005,025 | |
District 11 - Not quite touching the water block. Needs a contiguity override | |
390950097002036 connected to 390950097003000 | |
OH State House | |
District 49 - should be same override as Senate 11 |
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
Index: views.py | |
=================================================================== | |
--- views.py (revision 1402) | |
+++ views.py (working copy) | |
@@ -1143,6 +1143,8 @@ | |
A JSON HttpResponse that contains the number of districts modified, | |
or an error message if adding fails. | |
""" | |
+ start = datetime.now() | |
+ sys.stderr.write('Received request at %s\n' % start) |
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
#!/bin/bash | |
# This will export the plan with id 1270, called "mf_exact", to | |
# a shapefile called mf_exact.shp | |
pgsql2shp -f mf_exact -u publicmapping -P <password_here> -h <hostname> publicmapping "select d.geom, d.name, | |
from redistricting_district as d | |
join (select max(version) as latest, district_id, plan_id from redistricting_district where plan_id = 1270 group by district_id, plan_id) as v on d.district_id = v.district_id and d.plan_id = v.plan_id and d.version = v.latest | |
where not (ST_IsEmpty(d.geom) or d.district_id = 0);" |
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
def _get_service_by_name(self, service_name): | |
module, separator, class_name = service_name.rpartition('.') | |
m = __import__( module ) | |
path = service_name.split('.')[1:] | |
for p in path: | |
m = getattr(m, p) | |
return m |
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
{ | |
"name": "symfony/framework-standard-edition", | |
"description": "The \"Symfony Standard Edition\" distribution", | |
"autoload": { | |
"psr-0": { "": "src/" } | |
}, | |
"require": { | |
"php": ">=5.3.3", | |
"symfony/symfony": "2.1.*", | |
"doctrine/orm": ">=2.2.3,<2.4-dev", |
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
{ | |
"hash": "b601d90d37f9b93a4bfda3ba539ddda1", | |
"packages": [ | |
{ | |
"name": "doctrine/common", | |
"version": "2.3.x-dev", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/doctrine/common", | |
"reference": "bb0aebbf234db52df476a2b473d434745b34221c" |
OlderNewer