Permalink
Browse files

add supports for topojson

  • Loading branch information...
1 parent f98820a commit 7a66114514eb2f636074a8775b33fe852e2b201a @zbryikt zbryikt committed Jan 29, 2013
Showing with 9 additions and 2 deletions.
  1. +5 −0 Makefile
  2. +2 −1 package.json
  3. +1 −0 package.ls
  4. +0 −1 twCounty1982.topojson
  5. +1 −0 twTown1982.topojson
View
@@ -41,3 +41,8 @@ twTown1982.json: twTown1982raw.json
twTown2010.json: twTown1982raw.json
./node_modules/.bin/lsc bin/tw-counties.ls --town --2010 --simplify 0.0005 $< > $@
+
+.SUFFIXES: .json .topojson
+
+%.topojson: %.json
+ ./node_modules/.bin/topojson $< > $@
View
@@ -23,7 +23,8 @@
"LiveScript": "1.1.x",
"optimist": "*",
"d3": "3.0.x",
- "d3Plugins": "git://github.com/d3/d3-plugins.git"
+ "d3Plugins": "git://github.com/d3/d3-plugins.git",
+ "topojson": "0.0.10"
},
"optionalDependencies": {}
}
View
@@ -18,4 +18,5 @@ devDependencies:
optimist: \*
d3: \3.0.x
d3-plugins: "git://github.com/d3/d3-plugins.git"
+ topojson: \0.0.10
optionalDependencies: {}
View
@@ -1 +0,0 @@
-{"type":"Topology","transform":{"scale":[0.00037923059476456495,0.0004336407028991922],"translate":[118.214545144332,21.900907098616077]},"objects":{"twCounty1982":{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","arcs":[[[0]],[[1,2,3,4,5,6,7,8]]]},{"type":"Polygon","arcs":[[9,10,11,12,13]]},{"type":"MultiPolygon","arcs":[[[14]],[[15,16,17,18,19,20,21,22,23]],[[24]]]},{"type":"MultiPolygon","arcs":[[[25,26,-10,27,28,29,30,31],[32,33,34,35]]]},{"type":"Polygon","arcs":[[34,36,32,37]]},{"type":"Polygon","arcs":[[38,39,40,41,42,43,44,45]]},{"type":"Polygon","arcs":[[-43,46]]},{"type":"MultiPolygon","arcs":[[[47,48,49,50,51,52,53,54,55,56],[57,58]]]},{"type":"Polygon","arcs":[[57,59]]},{"type":"MultiPolygon","arcs":[[[60]],[[61,62,63,64,19,65]]]},{"type":"Polygon","arcs":[[66,67,68,69,70,71,5,72,7,73,74,75,76,77,49,78]]},{"type":"MultiPolygon","arcs":[[[79,80,-56,81,82,83,84]]]},{"type":"MultiPolygon","arcs":[[[28,85]]]},{"type":"Polygon","arcs":[[-62,86,87,88,-41,89,90,91,-69,92,93,94,17,95,-64,96]]},{"type":"Polygon","arcs":[[97,98,99]]},{"type":"MultiPolygon","arcs":[[[30,100,25,101,102,103,104,-54,105,106,107]]]},{"type":"MultiPolygon","arcs":[[[15,108,-94,109,-67,110,51,111,106,112,113,22,114]]]},{"type":"Polygon","arcs":[[-13,115,103,116,117,83,118,119,120]]},{"type":"Polygon","arcs":[[-120,121,79,122]]},{"type":"MultiPolygon","arcs":[[[-39,123,-45,124,3,125,-71,126,-91,127],[128,129]]]},{"type":"Polygon","arcs":[[-129,130]]},{"type":"MultiPolygon","arcs":[[[-75,131,1,132,47,133,-77,134]]]},{"type":"MultiPolygon","arcs":[[[135,136]],[[137]],[[-136,138]]]},{"type":"MultiPolygon","arcs":[[[139]],[[140]]]},{"type":"MultiPolygon","arcs":[[[141]],[[142]]]}]}},"arcs":[[[4865,3663],[-79,-23],[-14,-45],[-73,13],[222,135],[-56,-80]],[[6163,4381],[-108,-2],[-205,69],[-330,-22]],[[5520,4426],[-224,35],[-123,-69],[14,-113],[-32,-113],[24,-14],[-97,-139],[-6,-211],[16,-66],[204,-39]],[[5296,3697],[63,28],[-13,58],[80,-24],[55,76],[103,33],[4,31],[181,81],[267,19],[87,-93],[105,-26],[190,22],[58,-34],[173,-18]],[[6649,3850],[-15,110],[-182,-19]],[[6452,3941],[-86,58]],[[6366,3999],[41,76],[-11,145]],[[6396,4220],[41,10]],[[6437,4230],[-41,117],[-233,34]],[[8201,7360],[79,-64],[96,-8],[31,-144],[-90,-51],[-110,3],[-30,-92],[63,-23],[-58,-28],[65,-55],[81,-133],[112,2],[90,-114],[-69,-56],[70,-129]],[[8531,6468],[64,-23],[-122,-207]],[[8473,6238],[-107,-45],[-63,37]],[[8303,6230],[-27,150],[-93,70],[-49,-4],[22,135],[-125,62],[-45,62],[-183,44],[-62,39],[14,83],[-53,-6],[-206,64],[1,63],[-53,30]],[[7444,7022],[-136,-15],[64,110],[117,129],[125,57],[231,59],[186,66],[170,-68]],[[8664,1719],[-74,1],[-22,73],[120,1],[-24,-75]],[[8227,2944],[-49,-155],[-115,-29],[-61,77],[-99,30],[-55,134],[-135,-2],[-28,50],[-131,22],[-61,132],[-46,24]],[[7447,3227],[-179,-44]],[[7268,3183],[-87,-83],[-59,-17],[-8,-118],[-95,-82],[30,-34],[-6,-110],[-44,-67],[28,-58],[-155,-170],[21,-131]],[[6893,2313],[106,-106],[-19,-73],[109,-61]],[[7089,2073],[-22,-144],[-29,-47],[-93,-1],[-36,-47],[-98,-17],[-95,-136],[-58,-181],[64,-139],[-33,-76],[66,-21],[35,-73],[-95,-29],[-27,-87],[110,-50],[21,-76],[-41,-34],[58,-94],[42,14],[134,-77],[79,38]],[[7071,796],[-4,203],[136,282],[102,259],[64,46],[34,139],[33,41],[246,122],[119,82],[73,100],[-38,79],[55,72],[70,2],[90,106],[37,80],[72,58],[72,113],[31,111],[164,128],[-34,194],[80,164],[91,82],[41,188],[47,89]],[[8652,3536],[-129,21],[-124,-134]],[[8399,3423],[60,-59]],[[8459,3364],[-122,-148],[4,-60],[-114,-212]],[[8688,388],[-26,25],[176,13],[9,-106],[81,-45],[-80,-40],[-96,55],[-64,98]],[[9351,6816],[-80,-4],[-112,-90],[-164,-17],[-90,-49],[-13,-155],[-115,-34],[-18,-40]],[[8759,6427],[-149,-33],[-79,74]],[[8201,7360],[-111,40],[275,82],[68,52],[-10,46],[80,71],[22,62],[245,114],[101,7],[102,-48],[44,-87],[195,-149]],[[9212,7550],[-194,-72],[56,-116],[201,-94],[80,10],[-17,118]],[[9338,7396],[110,14],[26,43],[221,-31],[86,24],[-27,-103],[89,-151],[75,14],[81,-35],[-115,-53]],[[9884,7118],[-305,-63],[16,-81],[-58,-47]],[[9537,6927],[-100,-12],[-86,-99]],[[8645,7167],[-15,62],[51,81],[-127,120],[116,116],[106,36]],[[8776,7582],[32,45],[76,-32]],[[8884,7595],[-18,-64],[81,-85],[-27,-47],[76,-32],[-11,-129],[111,-38],[-176,-20],[7,-87],[51,-23],[-154,-5],[-27,52]],[[8797,7117],[-62,-1],[9,53],[-99,-2]],[[8797,7117],[-107,79],[-45,-29]],[[8776,7582],[43,49],[65,-36]],[[6274,3086],[42,-39]],[[6316,3047],[120,1],[-38,-92]],[[6398,2956],[-105,-90],[-70,-121],[-254,-203],[-48,0],[-115,-201],[-92,11],[-70,-71],[-203,33],[-64,-24],[-163,62]],[[5214,2352],[65,91]],[[5279,2443],[56,1],[30,73],[-105,70],[99,98],[-172,28],[-87,32],[-126,-15],[-102,-96]],[[4872,2634],[-81,69],[10,64],[69,98],[55,153],[41,196],[53,105]],[[5019,3319],[139,-83],[132,-19],[45,71],[127,54],[18,58],[149,60],[234,27],[161,-58],[-42,-38],[149,-101],[-46,-37],[26,-130],[-35,-37]],[[6076,3086],[156,-57],[42,57]],[[5279,2443],[-60,-85],[-48,19],[-51,107],[-48,44],[-200,106]],[[6047,5272],[41,-110],[69,-59],[166,-26],[34,-78],[-1,-90],[57,9]],[[6413,4918],[157,-66],[105,-15]],[[6675,4837],[102,59],[59,93],[58,16],[41,122],[123,-61],[154,69],[67,-25],[65,25],[33,61],[106,3],[139,98],[80,-3],[84,67],[38,-31],[99,40],[48,-22],[50,57]],[[8021,5405],[227,-48],[25,46]],[[8273,5403],[85,26],[-11,57],[142,99],[45,98]],[[8534,5683],[-38,41]],[[8496,5724],[-169,-34],[-23,48],[-97,21]],[[8207,5759],[0,83],[-216,-27],[-36,-88]],[[7955,5727],[-65,31],[-103,-86],[-71,-3],[-52,-67],[-105,-15],[-124,-61],[-78,79],[-182,26],[-51,-19],[14,-74],[-45,-24],[-188,-4],[-71,58],[-115,24],[-185,95]],[[6534,5687],[-188,170],[-155,-183],[-33,-105],[-58,-5],[-92,-110],[-28,-68],[-38,-56],[105,-58]],[[6807,5311],[17,-80],[-202,-29],[-52,14],[-6,-88],[-195,-32],[-146,84],[61,97],[-4,57],[104,-24],[146,6],[34,-45],[83,17]],[[6647,5288],[48,58],[112,-35]],[[6647,5288],[48,57],[112,-34]],[[5654,970],[22,69],[53,-21],[-75,-48]],[[5823,1424],[63,155],[-27,183],[50,123]],[[5909,1885],[-5,117],[40,141],[222,-5]],[[6166,2138],[138,103],[104,28],[43,-59],[118,50],[130,-38],[61,-68],[116,70],[81,-18]],[[6957,2206],[41,-94],[91,-39]],[[7071,796],[-28,-262],[43,-66],[-28,-41],[26,-120],[-68,-79],[-78,-27],[-13,-89],[67,-112],[-116,77],[-148,56],[-70,-91],[-75,34],[12,89],[-61,85],[-18,40],[82,153],[-80,261],[-98,114],[-18,108],[-152,160],[-346,173],[-78,77],[-3,88]],[[8266,5304],[-166,-55],[-13,-96],[124,-49],[-14,-68],[-106,-71],[-58,-139],[44,-65],[-25,-190],[-76,-99],[-29,-127],[-63,-30],[76,-56],[20,-90],[-14,-107],[-58,-143],[-92,-39],[-67,7],[-6,-138],[-218,-19],[-77,-102],[52,-29]],[[7500,3599],[-116,-61],[2,38]],[[7386,3576],[-129,46]],[[7257,3622],[-129,9],[-207,-10]],[[6921,3621],[-81,149],[44,116],[-31,34]],[[6853,3920],[-286,37],[-115,-16]],[[6366,3999],[48,87],[-18,134]],[[6437,4230],[-35,116]],[[6402,4346],[109,36],[-84,26],[-69,68]],[[6358,4476],[-5,62],[60,218]],[[6413,4756],[-12,105]],[[6401,4861],[96,12],[178,-36]],[[8021,5405],[225,-47],[20,-54]],[[7096,6548],[-72,-12]],[[7024,6536],[-131,-152],[-128,-20],[-56,-110],[-86,-11],[-40,-52],[-121,-236],[-114,-98],[186,-170]],[[7955,5727],[82,163]],[[8037,5890],[-156,132],[-90,-23]],[[7791,5999],[-120,17],[-137,-27],[23,99],[-56,36],[63,77],[-198,125],[-115,91],[32,52]],[[7283,6469],[-160,33],[-27,46]],[[9338,7396],[122,31],[11,62],[-114,35],[-77,-12],[-68,38]],[[5823,1424],[1,-97],[-166,72],[101,95]],[[5759,1494],[-74,88],[-121,-2],[67,121],[-93,132],[67,79],[-166,18]],[[5439,1930],[-57,-46],[-115,206],[-98,241],[45,21]],[[6398,2956],[40,80],[-37,174],[136,-20]],[[6537,3190],[48,56],[95,31],[31,51],[62,-5],[120,76],[55,104]],[[6948,3503],[167,88],[142,31]],[[7386,3576],[29,-106]],[[7415,3470],[-68,-32],[-36,-77],[162,-77]],[[7473,3284],[-66,-73],[-139,-28]],[[6893,2313],[82,-60],[-18,-47]],[[6166,2138],[-203,23],[-57,-153],[3,-123]],[[5605,1912],[-67,-79],[93,-132],[-67,-121],[121,2],[74,-88]],[[5759,1494],[-104,-97],[-65,35],[-182,204],[-37,80],[68,214]],[[5439,1930],[128,-5],[14,44],[24,-57]],[[9537,6927],[-131,-36],[-55,-75]],[[8759,6427],[-202,-34],[-84,-155]],[[8473,6238],[-66,-33],[-3,-144]],[[8404,6061],[-148,-104]],[[8256,5957],[-76,-98],[27,-100]],[[8496,5724],[162,-102]],[[8658,5622],[121,-3],[42,-34],[124,-23],[-30,43],[98,7],[-5,83],[119,-77],[257,-53]],[[9384,5565],[72,276],[51,63],[94,45],[-37,91],[74,19],[20,115],[-85,153],[-23,159],[-45,102],[29,215],[58,92],[195,180],[97,43]],[[7447,3227],[26,57]],[[7415,3470],[-32,67],[117,62]],[[8266,5304],[7,99]],[[8534,5683],[124,-61]],[[9384,5565],[-77,-120],[-184,-125],[-42,-67],[21,-70],[-35,-65],[-93,-83],[8,-85],[69,-90],[-109,-123],[15,-49],[-36,-170],[-65,-132],[-1,-98],[-63,-111],[11,-32],[-60,-164],[-11,-115],[-61,-140],[30,-64],[-49,-126]],[[8652,3536],[-128,21],[-125,-134]],[[8459,3364],[-118,-136],[-2,-40],[-112,-244]],[[8303,6230],[128,-69],[-45,-38],[18,-62]],[[8256,5957],[-108,-119],[-122,-4],[11,56]],[[8037,5890],[-116,99],[-8,40],[-122,-30]],[[7283,6469],[-97,5],[-5,48],[145,118]],[[7326,6640],[105,-42],[-30,91],[-56,47],[-118,28]],[[7227,6764],[-57,43],[40,66],[84,133],[150,16]],[[7326,6640],[-130,-85],[-22,-72],[-78,65]],[[7024,6536],[56,58],[-19,64],[49,90],[62,57],[55,-41]],[[6274,3086],[-41,-56],[-157,56]],[[5019,3319],[90,110],[-21,189],[36,58],[-101,1],[20,57],[253,-37]],[[6649,3850],[-13,92],[217,-22]],[[6921,3621],[258,4],[-135,-88],[-96,-34]],[[6537,3190],[-110,15],[-30,-57],[23,-87],[-104,-14]],[[5735,3684],[12,-83],[93,-4],[27,-49],[76,51],[70,-21],[38,51],[-69,70]],[[5982,3699],[-71,25],[-176,-40]],[[5735,3684],[103,24],[144,-9]],[[6402,4346],[-239,35]],[[5520,4426],[-174,51],[120,76],[83,139],[-39,11],[68,111],[109,118],[95,39],[-78,3],[-1,43],[131,17],[25,86],[-112,-35],[119,121],[53,1],[70,88],[58,-23]],[[6413,4918],[84,-46],[-96,-11]],[[6413,4756],[-49,-74],[24,-16],[-30,-190]],[[4629,9831],[-1,-1]],[[4628,9830],[2,0],[-1,1]],[[4648,9911],[-12,47],[74,41],[38,-43],[-100,-45]],[[4629,9831],[8,5],[-65,-19],[-91,-33],[88,-5],[57,50],[2,1]],[[3353,3355],[72,-6],[-15,86],[-41,-21],[-16,-59]],[[3603,4060],[-70,-10],[-98,-71],[-6,-144],[-124,-2],[93,37],[-36,37],[65,139],[68,-35],[40,65],[112,14],[0,-76],[70,-142],[68,68],[51,-18],[63,-108],[-124,13],[-107,-72],[1,-50],[-91,2],[29,56],[-54,121],[117,0],[-67,176]],[[396,5828],[-91,-92],[-138,58],[86,35],[-60,93],[69,47],[81,-52],[104,1],[21,96],[87,38],[61,-39],[64,-155],[-112,-79],[-7,42],[-85,25],[-80,-18]],[[128,5821],[-128,-37],[38,86],[100,-8],[-10,-41]]]}
View

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 7a66114

Please sign in to comment.