Mon, 17 Apr 2017 22:56:39 +0300
Aluemuotoja
alueet.gmp | file | annotate | diff | comparison | revisions | |
alueet.py | file | annotate | diff | comparison | revisions |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alueet.gmp Mon Apr 17 22:56:39 2017 +0300 @@ -0,0 +1,74 @@ +roadmap^60.43008939664394, 22.252131324329984^11@undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Ylioppilaskylä^60.4609,22.28027~60.46498,22.28722~60.46587,22.29813~60.4646,22.30422~60.46284,22.30463~60.46111,22.3071~60.45995,22.29775~60.45769,22.28959~60.45981,22.28626 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Halinen^60.4716,22.30774~60.47444,22.31868~60.47537,22.32499~60.47319,22.3325~60.46946,22.33473~60.46617,22.33658~60.46503,22.3245~60.46416,22.30973~60.47051,22.30346 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Satama^60.44255,22.20659~60.44617,22.19914~60.45022,22.19881~60.44886,22.21573~60.44435,22.23624~60.43617,22.23826~60.43205,22.22517~60.43592,22.20679 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Papinsaari^60.39482,22.2577~60.40037,22.27521~60.39147,22.28456~60.38851,22.27179 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kaistarniemi^60.3977,22.24465~60.40772,22.24046~60.40792,22.26057~60.40076,22.27409~60.3952,22.25642 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Haarla^60.3977,22.22706~60.38719,22.23676~60.38341,22.22466~60.38518,22.21205~60.39359,22.20706~60.39816,22.21341 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Friskala^60.39868,22.21599~60.39804,22.22852~60.38876,22.23916~60.38952,22.24843~60.39329,22.25135~60.40217,22.23474~60.4019,22.21689 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kukola^60.41228,22.23341~60.40674,22.23847~60.40283,22.23487~60.40258,22.2168~60.40696,22.21113~60.41236,22.21849 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Oriniemi^60.38871,22.16432~60.39236,22.18483~60.39972,22.188~60.40171,22.1823~60.39919,22.15413~60.39151,22.15633 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Maanpää^60.42123,22.17264~60.41472,22.15422~60.40622,22.14277~60.40003,22.15599~60.40577,22.17143~60.41357,22.18174 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Pikisaari^60.43275,22.20869~60.4239,22.21632~60.41889,22.19831~60.42495,22.19216~60.43033,22.19648 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Jänessaari^60.42148,22.17333~60.42584,22.18964~60.41902,22.1971~60.41534,22.18056 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Lentoasema^60.51616,22.23289~60.50782,22.23676~60.50492,22.27787~60.50936,22.29718~60.51901,22.29847~60.51961,22.26218 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Mylly^60.49144,22.19414~60.4885,22.19573~60.48964,22.20822~60.49153,22.20901~60.49295,22.20801 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kuninkoja^60.49702,22.21496~60.49936,22.22028~60.50048,22.23744~60.49676,22.2392~60.49373,22.23435~60.49306,22.23554~60.49178,22.23402~60.48872,22.22903~60.48729,22.2221~60.49085,22.21505 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Liljalaakso^60.48957,22.23314~60.49088,22.23302~60.49168,22.23435~60.49311,22.23588~60.49375,22.23486~60.49667,22.2395~60.49666,22.24905~60.49075,22.24422~60.49122,22.24265~60.49107,22.24049~60.49067,22.23908~60.49024,22.2361 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Länsinummi^60.48921,22.23234~60.49017,22.23633~60.49054,22.23922~60.49097,22.24059~60.49111,22.24266~60.49068,22.24412~60.48955,22.24429~60.48579,22.24697~60.48516,22.23227~60.4884,22.23225 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Hepokulta^60.46742,22.16646~60.47441,22.16731~60.47744,22.17186~60.47668,22.17882~60.4752,22.18835~60.47127,22.19204~60.46632,22.19152~60.46475,22.18783~60.46403,22.17242 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Nättinummi^60.45177,22.26442~60.45305,22.2671~60.45144,22.26956~60.45042,22.26871~60.44977,22.26697 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Teräsrautela^60.47182,22.29006~60.47585,22.29014~60.48198,22.29898~60.4786,22.30708~60.47647,22.31503~60.4748,22.31928~60.47057,22.30316~60.47158,22.29897 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Ihala^60.46443,22.27208~60.47176,22.2828~60.47215,22.28351~60.47295,22.28976~60.47586,22.28966~60.47505,22.27803~60.47529,22.26612~60.47341,22.26482~60.47244,22.26502~60.47,22.26609~60.46873,22.26701~60.46674,22.26877~60.46574,22.26934~60.46434,22.27049~60.46395,22.27063~60.46343,22.27033~60.46395,22.27112 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kauppatori^60.45901,22.268~60.45994,22.26648~60.46324,22.27012~60.46392,22.27117~60.46441,22.2721~60.47172,22.28286~60.4721,22.28353~60.47232,22.2854~60.46842,22.28529~60.4655,22.28372~60.46387,22.28141~60.46168,22.27527 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Räntämäki^60.47238,22.28572~60.47263,22.28779~60.47285,22.28987~60.47174,22.28992~60.47142,22.29881~60.47041,22.3031~60.46833,22.30499~60.4655,22.3027~60.46669,22.29898~60.46669,22.29606~60.46569,22.29358~60.46553,22.28608~60.46104,22.27866~60.46121,22.27507~60.46379,22.28189~60.46546,22.2844~60.4686,22.28605 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kastu^60.45775,22.29049~60.4599,22.29787~60.45951,22.29945~60.45688,22.3026~60.45537,22.29751~60.45501,22.29585~60.45465,22.29285~60.45619,22.29141 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Raunistula^60.45331,22.2865~60.45033,22.29068~60.45113,22.29322~60.45198,22.29413~60.45225,22.29741~60.45399,22.29853~60.45529,22.2975~60.45495,22.29585~60.45446,22.2915~60.45386,22.28832~60.45369,22.28748 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Koroinen^60.45449,22.27684~60.45363,22.28081~60.45187,22.28268~60.45021,22.27761~60.45183,22.27498~60.45315,22.276 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kuuvuori^60.45191,22.28278~60.45318,22.28653~60.45331,22.28639~60.45376,22.28747~60.45455,22.2916~60.45579,22.29063~60.45768,22.28938~60.45871,22.28782~60.45974,22.28622~60.4608,22.28048~60.45965,22.27872~60.45826,22.27791~60.45722,22.2778~60.45553,22.27757~60.45456,22.27695~60.45369,22.28097 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>TYKS^60.4445,22.25538~60.44359,22.25256~60.44121,22.24824~60.43617,22.25517~60.43897,22.26358 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Tuomiokirkkotori^60.42981,22.22978~60.43034,22.2315~60.43061,22.23372~60.42969,22.2362~60.42969,22.23711~60.43068,22.24313~60.42616,22.24204~60.42284,22.23813~60.42596,22.23233 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Yliopistonmäki^60.42205,22.23332~60.41743,22.22843~60.41462,22.23002~60.41226,22.23362~60.40794,22.23766~60.40841,22.26324~60.41685,22.25384~60.42155,22.24643~60.42243,22.23594 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Martti<br>^60.4537,22.25043~60.45203,22.25283~60.45345,22.25685~60.45493,22.25432 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Majakkaranta^60.45014,22.27757~60.4531,22.28664~60.45031,22.29057~60.44735,22.28184 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Moikoinen^60.44005,22.2866~60.44433,22.30705~60.44753,22.30114~60.45008,22.29708~60.4519,22.29485~60.45193,22.2942~60.45107,22.2933~60.44645,22.27961~60.44438,22.28246 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Rautatieasema^60.45224,22.29757~60.4499,22.32448~60.4569,22.32432~60.4621,22.31703~60.45992,22.29862~60.45961,22.29964~60.45684,22.30304~60.45528,22.29775~60.45402,22.29882 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kerttuli^60.45206,22.29738~60.45137,22.2971~60.44687,22.30439~60.44232,22.3131~60.43895,22.31757~60.44625,22.3267~60.44913,22.32902 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kupittaa^60.35447,22.12646~60.34122,22.13676~60.33714,22.17865~60.35634,22.30671~60.36475,22.31056~60.38221,22.2982~60.37208,22.22194~60.3631,22.16082 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Nummenmäki^60.36483,22.11222~60.35498,22.12595~60.34539,22.09816~60.35061,22.08758 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Itäharju^60.35557,22.12732~60.36614,22.11211~60.37617,22.11563~60.38197,22.13505~60.38392,22.1608~60.38367,22.21058~60.38265,22.23049~60.37467,22.23427~60.36377,22.15899 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kakskerta^60.44513,22.32739~60.4509,22.33176~60.45303,22.33709~60.45193,22.34516~60.44766,22.34725~60.44482,22.35053~60.44204,22.35147~60.44187,22.33875~60.44334,22.33174 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Eerikvalla^60.44211,22.3519~60.44491,22.35092~60.44783,22.34766~60.45206,22.34564~60.45506,22.34898~60.4569,22.35851~60.45464,22.36246~60.44861,22.36587~60.44271,22.36825 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Satava^60.45658,22.33769~60.46067,22.33863~60.46369,22.34413~60.46361,22.35091~60.46069,22.35683~60.45802,22.35761~60.45549,22.34853~60.45532,22.34116 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Pääskyvuori^60.4623,22.31774~60.46502,22.33262~60.46094,22.33791~60.4565,22.33709~60.45315,22.33619~60.45112,22.33105~60.45135,22.32557~60.45712,22.32505 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Varissuo^60.42408,22.21672~60.43288,22.20943~60.43357,22.21448~60.43179,22.225~60.42963,22.22912~60.42589,22.23131~60.42324,22.2362~60.42237,22.23158~60.41794,22.22753 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kohmo^60.45645,22.26163~60.45447,22.26424~60.45634,22.26935~60.4576,22.26927~60.45794,22.2662 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Kurala^60.456,22.26864~60.45472,22.2702~60.45356,22.26639~60.45395,22.26597~60.45512,22.26643 +polygon^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Lauttaranta^60.45569,22.26935~60.45492,22.27039~60.45569,22.27163~60.45627,22.27076 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Linja-autoasema^60.45811,22.27231~60.4578,22.27506~60.45618,22.27427~60.45707,22.27271 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Puutori^ +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Konserttitalo^60.49152,22.24869~60.49397,22.26783~60.48683,22.27238~60.48425,22.26869~60.48425,22.2544 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Verkahovi^60.48328,22.24959~60.48059,22.25139~60.47672,22.25169~60.47522,22.26525~60.4831,22.2707 +undefined^#FF0000,5,1,#ff8800,0.4^^60.45857,22.22045~60.46175,22.23684~60.46635,22.24233~60.46999,22.22342~60.46663,22.21524~60.4656,22.21092~60.46162,22.21221 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Runosmäki^60.4697,22.22131~60.46693,22.21517~60.46528,22.20514~60.47272,22.19522~60.47605,22.20406~60.47122,22.21328 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Impivaara^60.4705,22.21951~60.48023,22.22414~60.48044,22.21169~60.47626,22.20483~60.47169,22.21384 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Suikkila^ +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Pläkkikaupunki^60.4848,22.22929~60.4745,22.23281~60.47744,22.25101~60.48083,22.25006~60.48293,22.24869~60.48568,22.24715 +undefined^#FF0000,5,1,#ff8800,0.4^^60.47431,22.23298~60.4707,22.23392~60.4664,22.2498~60.47087,22.2528~60.47636,22.25137~60.47635,22.24784 +undefined^#FF0000,5,1,#ff8800,0.4^^60.48011,22.225~60.48002,22.23015~60.4683,22.23427~60.47094,22.22069 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Port Arthur<br>^60.44981,22.24446~60.44765,22.24746~60.44849,22.24963~60.4445,22.25491~60.44364,22.25245~60.43855,22.24272~60.44493,22.23611 +undefined^#FF0000,5,1,#ff8800,0.4^^60.44886,22.24598~60.44968,22.24839~60.44865,22.24984~60.44775,22.24749 +undefined^#FF0000,5,1,#ff8800,0.4^^60.45108,22.24701~60.4446,22.25624~60.44808,22.26877~60.4545,22.26078~60.45179,22.2526~60.45252,22.2517 +undefined^#FF0000,5,1,#ff8800,0.4^<div class='infowindow'>Vanha Suurtori<br>^60.45191,22.2745~60.44999,22.27746~60.44796,22.2706~60.44837,22.26998~60.44934,22.272 +undefined^#FF0000,5,1,#ff8800,0.4^^60.4457,22.19908~60.44249,22.20603~60.43554,22.20629~60.43394,22.19696~60.44188,22.18918 +undefined^#FF0000,5,1,#ff8800,0.4^^60.43173,22.10338~60.41615,22.10006~60.41622,22.08295~60.42873,22.0844 +undefined^#FF0000,5,1,#ff8800,0.4^^60.4219,22.10621~60.4208,22.13539~60.40461,22.11823~60.40554,22.10579 +undefined^#FF0000,5,1,#ff8800,0.4^^60.43309,22.10569~60.42267,22.10398~60.42114,22.13985~60.42199,22.17041~60.42716,22.19204~60.43281,22.19683~60.4421,22.18592~60.43862,22.15024~60.437,22.11525 +undefined^#FF0000,5,1,#ff8800,0.4^^60.46255,22.1208~60.46094,22.14792~60.45392,22.15324~60.45116,22.13868~60.44198,22.1196~60.4466,22.10751 +undefined^#FF0000,5,1,#ff8800,0.4^^60.45366,22.15796~60.45129,22.1614~60.45049,22.16689~60.44892,22.17899~60.4424,22.18543~60.43899,22.15149~60.43804,22.12393~60.44149,22.1198~60.45079,22.13974 +undefined^#FF0000,5,1,#ff8800,0.4^^60.45942,22.15127~60.45429,22.15401~60.45399,22.1588~60.4517,22.16222~60.45006,22.17728~60.45513,22.17316~60.4602,22.17171 +undefined^#FF0000,5,1,#ff8800,0.4^^60.45716,22.18431~60.45599,22.18311~60.4547,22.18541~60.45605,22.18904~60.45722,22.18761 +undefined^#FF0000,5,1,#ff8800,0.4^^60.45502,22.18067~60.45494,22.18467~60.45406,22.18612~60.45343,22.18511~60.45311,22.18068 +undefined^#FF0000,5,1,#ff8800,0.4^^60.46026,22.17247~60.46048,22.18955~60.45751,22.18912~60.45739,22.1835~60.45506,22.17994~60.45248,22.17994~60.45248,22.18517~60.45421,22.19041~60.4499,22.19813~60.44596,22.19831~60.44291,22.18622~60.44993,22.179~60.45529,22.17372 +undefined^#FF0000,5,1,#ff8800,0.4^^60.42578,22.26521~60.41983,22.26733~60.41353,22.26766~60.41256,22.25922~60.41749,22.25439~60.4231,22.24424 +undefined^#FF0000,5,1,#ff8800,0.4^^60.41004,22.26508~60.41744,22.27211~60.41898,22.29023~60.4105,22.29177~60.40538,22.2807~60.4063,22.26891 +@@@@@@ \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alueet.py Mon Apr 17 22:56:39 2017 +0300 @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +from pprint import pprint +with open('alueet.gmp') as file: + data = file.read() + +shapes = {} +polygons = data.split('@')[1] +for polygon in polygons.splitlines(): + polygon = polygon.split('^') + nimi = polygon[2].rsplit('>', 1)[1] + coordinates = [] + for point in polygon[3].split('~'): + x, y = point.split(',') + coordinates.append((float(x), float(y))) + shapes[nimi.strip().replace('\u200b', '')] = coordinates + +pprint(shapes)