Skip to content
Permalink
Browse files

keeping color information in edgesInDistricts. refs #3979

  • Loading branch information...
namdre committed Oct 18, 2018
1 parent c787c3f commit 13911bec58207a622d6f8aaeba449572c54642a2
@@ -2,5 +2,5 @@

<tazs>
<taz id="b" shape="-5.00,-5.00 5.00,-5.00 5.00,5.00 -5.00,5.00 -5.00,-5.00"/>
<taz id="e" shape="1995.00,-5.00 2005.00,-5.00 2005.00,5.00 1995.00,5.00 -1995.00,-5.00"/>
<taz id="e" shape="1995.00,-5.00 2005.00,-5.00 2005.00,5.00 1995.00,5.00 -1995.00,-5.00" color="blue"/>
</tazs>
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- generated on 2018-03-09 09:35:26.058000 by $Id: $
<!-- generated on 2018-10-18 09:47:53.500988 by $Id$
options: -n input_net.net.xml -t input_districts.xml -o out.add.xml <doubleminus>weighted -s
-->
<tazs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/taz_file.xsd">
<taz id="b" shape="-5.0,-5.0 5.0,-5.0 5.0,5.0 -5.0,5.0 -5.0,-5.0">
<tazSource id="absBeg" weight="13859.69"/>
<tazSink id="absBeg" weight="13859.69"/>
</taz>
<taz id="e" shape="1995.0,-5.0 2005.0,-5.0 2005.0,5.0 1995.0,5.0 -1995.0,-5.0">
<taz id="e" shape="1995.0,-5.0 2005.0,-5.0 2005.0,5.0 1995.0,5.0 -1995.0,-5.0" color="blue">
<tazSource id="absBeg" weight="13859.69"/>
<tazSink id="absBeg" weight="13859.69"/>
<tazSource id="absEnd" weight="13900.00"/>
@@ -94,8 +94,9 @@ def writeResults(self, options):
else:
if options.weighted:
if options.shapeinfo:
fd.write(' <taz id="%s" shape="%s">\n' %
(district.id, district.getShapeString()))
color = ' color="%s"' % district.color if district.color is not None else ''
fd.write(' <taz id="%s" shape="%s"%s>\n' %
(district.id, district.getShapeString(), color))
else:
fd.write(' <taz id="%s">\n' % district.id)
for edge in filtered:
@@ -93,7 +93,7 @@ def startElement(self, name, attrs):
poly = Polygon(attrs['id'], attrs['type'], c, float(
attrs['layer']), attrs['fill'], cshape)
else:
poly = Polygon(attrs['id'], shape=cshape)
poly = Polygon(attrs['id'], color=attrs.get('color'), shape=cshape)
self._id2poly[poly.id] = poly
self._polys.append(poly)
self._lastPoly = poly

0 comments on commit 13911be

Please sign in to comment.
You can’t perform that action at this time.