Skip to content

Instantly share code, notes, and snippets.

@nrenner
Last active March 24, 2023 11:40
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save nrenner/5371796 to your computer and use it in GitHub Desktop.
Save nrenner/5371796 to your computer and use it in GitHub Desktop.
Inverse fill area (GeoJSON)
Display the source blob
Display the rendered blob
Raw
{"type":"MultiPolygon","coordinates":[[[[11.555809,48.079563],[11.556321,48.080309],[11.557277,48.079674],[11.557524,48.079524],[11.556385,48.079245],[11.555809,48.079563]]],[[[11.490702,48.073795],[11.49062,48.073733],[11.490513,48.073789],[11.490288,48.07363],[11.490171,48.073755],[11.490625,48.074055],[11.490651,48.074077],[11.490916,48.073955],[11.490851,48.073906],[11.490702,48.073795]]],[[[11.508793,48.061602],[11.508465,48.061615],[11.508321,48.061629],[11.508169,48.061644],[11.505195,48.062117],[11.504222,48.062271],[11.504096,48.062891],[11.503651,48.065454],[11.503538,48.065496],[11.503049,48.06568],[11.502576,48.066822],[11.502594,48.066823],[11.503045,48.066852],[11.503194,48.066868],[11.503171,48.066999],[11.503112,48.067253],[11.502984,48.067591],[11.502937,48.06779],[11.502937,48.068059],[11.502937,48.068142],[11.502934,48.068157],[11.502951,48.068297],[11.503009,48.068475],[11.503053,48.068566],[11.503088,48.068616],[11.503176,48.068707],[11.503366,48.068877],[11.503528,48.069037],[11.503651,48.069171],[11.503534,48.069236],[11.503504,48.069252],[11.503466,48.069278],[11.503285,48.069388],[11.503207,48.069435],[11.503073,48.069502],[11.502844,48.069618],[11.502731,48.069704],[11.502571,48.0698],[11.502307,48.069954],[11.501836,48.070184],[11.501356,48.070383],[11.501027,48.070535],[11.500741,48.07066],[11.500628,48.070738],[11.500394,48.070842],[11.499156,48.071333],[11.498629,48.071566],[11.498266,48.071819],[11.497292,48.07215],[11.49684,48.072263],[11.496486,48.072425],[11.496238,48.07261],[11.496212,48.07262],[11.493959,48.073506],[11.491776,48.07435],[11.491623,48.074376],[11.491472,48.074435],[11.489871,48.075076],[11.489832,48.075182],[11.488936,48.075524],[11.487595,48.076101],[11.486997,48.075387],[11.48796,48.075059],[11.487105,48.073885],[11.486077,48.074226],[11.486483,48.07483],[11.485971,48.075048],[11.486617,48.075854],[11.48694,48.076324],[11.486328,48.076605],[11.486188,48.076645],[11.486114,48.076679],[11.485067,48.07711],[11.483335,48.07782],[11.482906,48.077904],[11.482664,48.077979],[11.480657,48.078841],[11.479397,48.079336],[11.477348,48.080259],[11.474737,48.081389],[11.47332,48.081973],[11.473101,48.081778],[11.473436,48.081591],[11.472968,48.081163],[11.472402,48.081469],[11.471785,48.081855],[11.472431,48.082361],[11.470939,48.082999],[11.470974,48.083159],[11.471206,48.083471],[11.471358,48.083619],[11.471412,48.083672],[11.471521,48.083857],[11.471588,48.083957],[11.471681,48.08408],[11.471796,48.084209],[11.472055,48.08453],[11.472403,48.084917],[11.473135,48.085777],[11.473726,48.086533],[11.473756,48.086565],[11.473904,48.086589],[11.474323,48.08666],[11.474439,48.086692],[11.47458,48.08674],[11.474784,48.086824],[11.474946,48.086918],[11.475077,48.08702],[11.475089,48.087027],[11.475108,48.087046],[11.475702,48.08767],[11.475865,48.087856],[11.47627,48.088356],[11.4764,48.088503],[11.47645,48.088606],[11.476494,48.088694],[11.476381,48.088706],[11.476341,48.088712],[11.475996,48.088767],[11.475798,48.088792],[11.474972,48.08884],[11.47474,48.088879],[11.47424,48.088992],[11.473495,48.089262],[11.473267,48.089357],[11.473393,48.089536],[11.473417,48.089569],[11.473439,48.089602],[11.473558,48.089771],[11.472797,48.090076],[11.472425,48.090233],[11.472317,48.090279],[11.472283,48.090288],[11.472142,48.090327],[11.47218,48.090415],[11.472236,48.090514],[11.472272,48.090564],[11.472357,48.090646],[11.472549,48.090932],[11.472613,48.091049],[11.472683,48.09129],[11.472732,48.091428],[11.472737,48.091438],[11.472822,48.091559],[11.472881,48.091672],[11.472886,48.091711],[11.472879,48.091794],[11.473028,48.091835],[11.473184,48.091877],[11.473226,48.091978],[11.473441,48.092438],[11.473504,48.092603],[11.473506,48.092614],[11.473517,48.092832],[11.473641,48.093142],[11.47366,48.093195],[11.473669,48.093461],[11.473728,48.09353],[11.473829,48.09377],[11.473917,48.094167],[11.474196,48.095315],[11.474209,48.09545],[11.473916,48.095477],[11.473931,48.095574],[11.473952,48.095702],[11.473811,48.095863],[11.473649,48.096047],[11.473162,48.0966],[11.471681,48.098541],[11.47164,48.098594],[11.47129,48.099052],[11.471184,48.099106],[11.471049,48.099157],[11.47119,48.099326],[11.471396,48.099573],[11.4722,48.100527],[11.473393,48.101937],[11.474734,48.103531],[11.474603,48.103581],[11.47447,48.103631],[11.474406,48.103667],[11.474049,48.103827],[11.474634,48.104585],[11.474197,48.104676],[11.472246,48.104975],[11.471984,48.105025],[11.471467,48.105123],[11.471241,48.105124],[11.471151,48.105164],[11.47099,48.105224],[11.469446,48.105795],[11.469471,48.105422],[11.469487,48.105289],[11.46928,48.105311],[11.468527,48.105314],[11.467237,48.105318],[11.465232,48.105331],[11.463823,48.105364],[11.463669,48.105371],[11.463089,48.105373],[11.463092,48.105464],[11.463097,48.105519],[11.46314,48.105759],[11.463207,48.1061],[11.463263,48.106308],[11.463325,48.106602],[11.463382,48.107035],[11.463426,48.107341],[11.463485,48.10783],[11.463359,48.108041],[11.463402,48.108132],[11.463467,48.108268],[11.463493,48.108567],[11.463511,48.108823],[11.463513,48.108845],[11.4633,48.109215],[11.463078,48.109601],[11.463262,48.110374],[11.463219,48.110886],[11.463211,48.111046],[11.463205,48.111177],[11.463286,48.111415],[11.463484,48.111991],[11.463553,48.112217],[11.463594,48.112598],[11.463286,48.113357],[11.46344,48.113879],[11.463429,48.114068],[11.463421,48.114198],[11.463407,48.114394],[11.463405,48.114457],[11.463401,48.11452],[11.463397,48.114581],[11.463396,48.114683],[11.463918,48.114725],[11.464089,48.114736],[11.464814,48.11476],[11.464827,48.114818],[11.46484,48.114865],[11.464861,48.115441],[11.464868,48.115462],[11.464929,48.115548],[11.464973,48.115617],[11.465003,48.115658],[11.465041,48.115758],[11.465086,48.115953],[11.465377,48.117141],[11.465409,48.117239],[11.465445,48.117347],[11.46549,48.117546],[11.465536,48.117778],[11.465575,48.118017],[11.465578,48.118143],[11.46557,48.118217],[11.46558,48.118393],[11.46557,48.118794],[11.46553,48.119225],[11.465469,48.119801],[11.465413,48.120163],[11.465383,48.120307],[11.465324,48.120485],[11.465269,48.120685],[11.46515,48.120966],[11.464869,48.121645],[11.464734,48.121955],[11.464692,48.122076],[11.464656,48.122209],[11.464619,48.122395],[11.464586,48.12274],[11.46458,48.122999],[11.464505,48.123109],[11.464443,48.123413],[11.464432,48.123648],[11.464438,48.123909],[11.464452,48.12398],[11.464469,48.124056],[11.464524,48.124312],[11.464521,48.124456],[11.464545,48.124665],[11.464678,48.125443],[11.464803,48.126457],[11.464885,48.127054],[11.464891,48.127105],[11.464891,48.127421],[11.464883,48.127664],[11.464873,48.127816],[11.464809,48.128093],[11.464787,48.128163],[11.464744,48.1283],[11.464708,48.128404],[11.464526,48.129115],[11.464516,48.129147],[11.464502,48.129151],[11.464217,48.129214],[11.464076,48.129245],[11.46379,48.129334],[11.46353,48.129447],[11.463341,48.129499],[11.463329,48.12982],[11.462819,48.129817],[11.462348,48.129821],[11.462114,48.129853],[11.462006,48.129895],[11.461981,48.129913],[11.461935,48.129968],[11.461903,48.130061],[11.4619,48.130086],[11.461928,48.130221],[11.460141,48.13056],[11.459993,48.130585],[11.459515,48.130665],[11.459266,48.130716],[11.460072,48.132015],[11.457669,48.132437],[11.457667,48.132181],[11.454663,48.132657],[11.454519,48.13268],[11.454644,48.133007],[11.454301,48.133033],[11.452441,48.133177],[11.452188,48.133196],[11.451693,48.133188],[11.451423,48.133184],[11.45118,48.133179],[11.451135,48.133181],[11.451108,48.13304],[11.45102,48.132725],[11.450977,48.13261],[11.450628,48.132714],[11.449958,48.132944],[11.44993,48.132956],[11.449798,48.132903],[11.44958,48.132667],[11.449477,48.132571],[11.449455,48.132538],[11.449357,48.132396],[11.449191,48.132185],[11.449015,48.132049],[11.448922,48.131964],[11.44882,48.131872],[11.448638,48.131669],[11.4484,48.131312],[11.44835,48.131214],[11.44831,48.131155],[11.448276,48.131138],[11.448252,48.131112],[11.448183,48.131099],[11.448174,48.131097],[11.44811,48.131085],[11.448025,48.131069],[11.447983,48.131126],[11.447888,48.13129],[11.447861,48.131367],[11.447811,48.131509],[11.447811,48.131521],[11.447883,48.131756],[11.44788,48.131812],[11.447782,48.131963],[11.447557,48.132172],[11.447438,48.132283],[11.447318,48.132466],[11.447067,48.132977],[11.447064,48.132998],[11.447101,48.133166],[11.44711,48.133183],[11.447214,48.133289],[11.447233,48.133302],[11.447549,48.133433],[11.447494,48.133512],[11.446923,48.133482],[11.446545,48.133596],[11.445928,48.133783],[11.445776,48.133829],[11.445639,48.133886],[11.44555,48.133917],[11.445315,48.134008],[11.444805,48.134087],[11.444546,48.13407],[11.444283,48.134054],[11.443694,48.134016],[11.443349,48.134134],[11.443188,48.134156],[11.443034,48.134162],[11.442817,48.13415],[11.442694,48.13413],[11.442535,48.1341],[11.442356,48.134136],[11.442249,48.134139],[11.44222,48.134136],[11.442129,48.134114],[11.441977,48.134047],[11.441934,48.134029],[11.441668,48.134049],[11.44137,48.134147],[11.440971,48.134273],[11.440877,48.134305],[11.440431,48.134338],[11.438619,48.134605],[11.43807,48.134663],[11.438212,48.134818],[11.438385,48.134991],[11.438513,48.135114],[11.438785,48.13537],[11.438585,48.135473],[11.438396,48.135586],[11.437354,48.136191],[11.4365,48.136629],[11.436348,48.13669],[11.436029,48.136198],[11.435976,48.136247],[11.43591,48.136288],[11.435753,48.136384],[11.435379,48.136604],[11.434949,48.136821],[11.434481,48.136958],[11.434343,48.136964],[11.43416,48.136928],[11.43402,48.13688],[11.433847,48.136945],[11.433782,48.136966],[11.433526,48.137002],[11.433365,48.137011],[11.433293,48.137009],[11.433112,48.136989],[11.432818,48.136935],[11.43273,48.13692],[11.4327,48.136928],[11.431869,48.137093],[11.430042,48.137487],[11.429761,48.137516],[11.429486,48.137482],[11.429137,48.137378],[11.428262,48.137093],[11.427958,48.137009],[11.427367,48.13679],[11.427234,48.136759],[11.426626,48.13658],[11.426141,48.136345],[11.425095,48.135649],[11.42508,48.13564],[11.424666,48.135275],[11.424319,48.134923],[11.424065,48.134644],[11.424046,48.134577],[11.423789,48.133902],[11.423769,48.133815],[11.423736,48.133704],[11.423575,48.133429],[11.423544,48.133365],[11.423445,48.133264],[11.423087,48.13291],[11.423018,48.132843],[11.422461,48.132528],[11.422385,48.132365],[11.422347,48.132283],[11.42228,48.132134],[11.421575,48.131768],[11.421091,48.131517],[11.420653,48.131376],[11.420377,48.131229],[11.419531,48.130833],[11.419117,48.130639],[11.419102,48.130632],[11.418845,48.130532],[11.418724,48.130448],[11.418599,48.130363],[11.418473,48.130276],[11.418132,48.130041],[11.417921,48.129889],[11.417638,48.129711],[11.417457,48.129598],[11.416896,48.129311],[11.416224,48.128934],[11.416112,48.128865],[11.414619,48.128022],[11.414073,48.127792],[11.413282,48.127549],[11.41323,48.127541],[11.413096,48.127521],[11.412903,48.127462],[11.412795,48.127386],[11.412654,48.127429],[11.412513,48.127472],[11.412381,48.127344],[11.412287,48.127324],[11.409703,48.126475],[11.40876,48.126202],[11.408499,48.126163],[11.408129,48.126111],[11.406952,48.12593],[11.406045,48.125818],[11.405277,48.125709],[11.404943,48.125651],[11.404025,48.125552],[11.403688,48.125516],[11.403358,48.125481],[11.403182,48.125458],[11.403006,48.125435],[11.402923,48.125425],[11.402308,48.125349],[11.402135,48.125331],[11.402064,48.125196],[11.401998,48.125094],[11.401779,48.125105],[11.394559,48.125414],[11.39449,48.125419],[11.394447,48.125432],[11.394311,48.12547],[11.394163,48.125482],[11.393826,48.126163],[11.392977,48.127906],[11.392742,48.128295],[11.392647,48.128473],[11.390066,48.128014],[11.389899,48.127984],[11.389607,48.128063],[11.389436,48.128152],[11.389362,48.128212],[11.388746,48.129278],[11.388715,48.129395],[11.388785,48.129697],[11.388777,48.129788],[11.389123,48.130845],[11.389294,48.13111],[11.38939,48.131361],[11.389489,48.131617],[11.389519,48.131712],[11.389514,48.131736],[11.389456,48.131829],[11.389374,48.131955],[11.389268,48.132217],[11.389153,48.132565],[11.389117,48.132696],[11.389078,48.132882],[11.389046,48.133017],[11.38883,48.13299],[11.388684,48.132962],[11.388624,48.133156],[11.388485,48.133508],[11.38848,48.13358],[11.388476,48.133659],[11.388534,48.133817],[11.388497,48.133943],[11.388274,48.134529],[11.388236,48.134605],[11.388621,48.134704],[11.388871,48.13481],[11.389077,48.134892],[11.389266,48.13494],[11.389408,48.134976],[11.389327,48.135171],[11.390188,48.135417],[11.390047,48.135795],[11.391623,48.136258],[11.392517,48.136514],[11.392457,48.13661],[11.392433,48.136652],[11.39233,48.136819],[11.39223,48.136986],[11.391295,48.138584],[11.389639,48.141096],[11.390317,48.141348],[11.391428,48.141769],[11.39135,48.141907],[11.390388,48.143287],[11.390212,48.143526],[11.390753,48.143725],[11.389606,48.145501],[11.38985,48.145673],[11.390537,48.145938],[11.390467,48.146034],[11.390292,48.146263],[11.389924,48.146752],[11.389251,48.147531],[11.389064,48.147744],[11.387202,48.147276],[11.387121,48.147393],[11.386079,48.148899],[11.385543,48.149687],[11.384267,48.149132],[11.383893,48.148969],[11.383985,48.14979],[11.383611,48.149765],[11.383132,48.149733],[11.383118,48.150582],[11.383136,48.151505],[11.383127,48.151564],[11.383005,48.152291],[11.382858,48.153129],[11.381313,48.153421],[11.379812,48.153561],[11.379546,48.153527],[11.379552,48.153792],[11.379312,48.153856],[11.378685,48.153836],[11.378383,48.153852],[11.378221,48.153828],[11.378035,48.15383],[11.378022,48.153222],[11.377632,48.153253],[11.376996,48.153305],[11.375617,48.153364],[11.374007,48.153567],[11.373903,48.153575],[11.373594,48.154189],[11.373763,48.154181],[11.374422,48.154088],[11.374141,48.154975],[11.373968,48.155465],[11.375087,48.155465],[11.374918,48.156],[11.373187,48.156023],[11.371906,48.156305],[11.370162,48.156875],[11.370446,48.157558],[11.370548,48.157693],[11.371286,48.158271],[11.3713,48.158289],[11.371342,48.158383],[11.37125,48.158411],[11.371171,48.158422],[11.370899,48.158462],[11.369677,48.158652],[11.367619,48.158747],[11.366533,48.158732],[11.366449,48.158745],[11.366308,48.158767],[11.366157,48.158766],[11.36608,48.158769],[11.365855,48.158768],[11.365316,48.158722],[11.365075,48.15871],[11.364675,48.1587],[11.364268,48.158676],[11.363455,48.158598],[11.363084,48.158541],[11.362706,48.158489],[11.361877,48.158353],[11.36184,48.158347],[11.36164,48.15832],[11.361068,48.158227],[11.361028,48.158222],[11.360923,48.158209],[11.36078,48.158195],[11.361069,48.158706],[11.361153,48.158871],[11.361186,48.158913],[11.361198,48.158929],[11.361211,48.158945],[11.361241,48.158982],[11.361343,48.159058],[11.361446,48.159101],[11.361652,48.159431],[11.361819,48.15977],[11.361849,48.159831],[11.361856,48.159845],[11.362184,48.16088],[11.362662,48.162632],[11.3627,48.162863],[11.362677,48.163003],[11.363601,48.163238],[11.364135,48.163402],[11.364357,48.163501],[11.364415,48.163522],[11.364739,48.163671],[11.365189,48.163967],[11.365475,48.164246],[11.365732,48.164614],[11.36579,48.164721],[11.365831,48.164796],[11.365888,48.164934],[11.366264,48.165672],[11.366608,48.166318],[11.366802,48.166671],[11.367043,48.1671],[11.367108,48.167205],[11.367242,48.167434],[11.367387,48.167671],[11.367499,48.167825],[11.367527,48.167851],[11.367594,48.167913],[11.367628,48.167944],[11.3677,48.16801],[11.367722,48.168058],[11.367744,48.168107],[11.367784,48.168193],[11.367919,48.168483],[11.368319,48.169346],[11.368463,48.169747],[11.368507,48.170034],[11.368759,48.171652],[11.368937,48.172664],[11.369488,48.17378],[11.369665,48.174187],[11.369694,48.174316],[11.369688,48.174442],[11.369686,48.174454],[11.369653,48.17456],[11.369625,48.174612],[11.369005,48.176434],[11.368992,48.176469],[11.369795,48.177187],[11.370168,48.17752],[11.371021,48.178283],[11.371248,48.178408],[11.371352,48.178437],[11.37162,48.17846],[11.373113,48.178461],[11.373635,48.178498],[11.374171,48.178617],[11.374816,48.17884],[11.374904,48.178886],[11.375216,48.178886],[11.375906,48.178884],[11.377007,48.178807],[11.377315,48.178795],[11.377583,48.178811],[11.380888,48.179145],[11.381033,48.179167],[11.381051,48.179173],[11.381118,48.179188],[11.382938,48.178045],[11.383102,48.17794],[11.38312,48.177931],[11.38322,48.177897],[11.383293,48.177872],[11.383442,48.177832],[11.384,48.177773],[11.38411,48.177756],[11.384507,48.177698],[11.384851,48.177667],[11.38512,48.177566],[11.385195,48.177596],[11.386145,48.17815],[11.386825,48.178554],[11.386963,48.178636],[11.387135,48.178747],[11.387332,48.178883],[11.387542,48.179124],[11.387821,48.179561],[11.38807,48.179933],[11.38823,48.180109],[11.388452,48.180257],[11.388685,48.180377],[11.389433,48.180698],[11.389504,48.180733],[11.389903,48.180929],[11.389964,48.180959],[11.390355,48.181156],[11.390578,48.181268],[11.39063,48.181321],[11.390693,48.181385],[11.390778,48.181471],[11.390854,48.181541],[11.390865,48.181554],[11.391062,48.181788],[11.391356,48.18215],[11.391509,48.18246],[11.391859,48.182851],[11.391987,48.182997],[11.392132,48.183217],[11.392241,48.183386],[11.39233,48.183477],[11.392543,48.183709],[11.392682,48.183867],[11.393104,48.184372],[11.39271,48.184591],[11.392229,48.184858],[11.391214,48.185421],[11.391253,48.185463],[11.391295,48.185503],[11.391381,48.185572],[11.391552,48.18571],[11.392051,48.186966],[11.392411,48.188181],[11.392416,48.188218],[11.39241,48.18825],[11.392392,48.188281],[11.392331,48.188488],[11.392334,48.188677],[11.392381,48.189248],[11.392404,48.189522],[11.392257,48.189565],[11.39058,48.190261],[11.390715,48.190572],[11.389666,48.190734],[11.388962,48.190826],[11.38872,48.190866],[11.388778,48.191127],[11.388793,48.191221],[11.388834,48.19151],[11.388923,48.192289],[11.388964,48.192502],[11.389062,48.192865],[11.389171,48.193194],[11.389229,48.193346],[11.3895,48.194146],[11.389617,48.194481],[11.389693,48.194751],[11.389837,48.195293],[11.390077,48.196551],[11.390151,48.196902],[11.390167,48.19698],[11.390231,48.197242],[11.390324,48.197737],[11.390515,48.198537],[11.390624,48.198993],[11.390653,48.199104],[11.390655,48.199629],[11.390678,48.200218],[11.390679,48.200362],[11.391275,48.200396],[11.392132,48.200454],[11.393588,48.20064],[11.394158,48.200706],[11.397371,48.200857],[11.400258,48.20099],[11.40144,48.201056],[11.401665,48.201065],[11.401974,48.201077],[11.40219,48.201215],[11.402257,48.201259],[11.402327,48.201301],[11.402345,48.201312],[11.402576,48.201453],[11.403003,48.201161],[11.404618,48.20147],[11.40489,48.201522],[11.404931,48.20153],[11.405081,48.201559],[11.406234,48.201718],[11.406413,48.201594],[11.406592,48.201469],[11.406883,48.201511],[11.40744,48.201595],[11.407493,48.201603],[11.408974,48.2018],[11.409194,48.201938],[11.409234,48.201965],[11.410216,48.202101],[11.412624,48.202429],[11.413448,48.202538],[11.415143,48.20279],[11.415456,48.202844],[11.415929,48.202924],[11.415989,48.202921],[11.416215,48.202896],[11.416698,48.202828],[11.417792,48.20266],[11.418651,48.202523],[11.418783,48.202524],[11.418955,48.202535],[11.419118,48.202574],[11.41914,48.202582],[11.419251,48.202641],[11.419263,48.20265],[11.419355,48.20274],[11.419375,48.202761],[11.41958,48.203219],[11.419696,48.203458],[11.419717,48.203484],[11.419752,48.203498],[11.420594,48.203586],[11.421338,48.203663],[11.422724,48.203862],[11.423663,48.203997],[11.424428,48.204106],[11.424639,48.204139],[11.425524,48.204253],[11.425701,48.204242],[11.426004,48.204224],[11.426205,48.204313],[11.426228,48.204346],[11.426623,48.204403],[11.427794,48.20457],[11.428088,48.204612],[11.428384,48.204654],[11.430532,48.20496],[11.430755,48.204992],[11.431962,48.205155],[11.432116,48.20518],[11.432453,48.205233],[11.432505,48.205239],[11.432797,48.205297],[11.432748,48.205745],[11.43587,48.205786],[11.438405,48.205808],[11.438624,48.20581],[11.43862,48.206191],[11.440821,48.206267],[11.441252,48.206282],[11.4427,48.206336],[11.443596,48.20637],[11.443875,48.20664],[11.444187,48.206947],[11.445903,48.207216],[11.447556,48.207475],[11.450401,48.207876],[11.452291,48.208146],[11.455221,48.208512],[11.457542,48.208823],[11.457597,48.20883],[11.457668,48.20884],[11.45785,48.208861],[11.458134,48.209244],[11.458425,48.209731],[11.458574,48.209976],[11.458602,48.210045],[11.458817,48.210567],[11.458944,48.210962],[11.459087,48.211387],[11.459147,48.211571],[11.459174,48.211593],[11.459274,48.211622],[11.459485,48.211656],[11.459797,48.211707],[11.460079,48.211754],[11.460213,48.211811],[11.460257,48.211828],[11.460422,48.212025],[11.460512,48.212238],[11.460529,48.212394],[11.460479,48.212721],[11.460427,48.212846],[11.460412,48.212902],[11.460413,48.212919],[11.46045,48.213014],[11.460504,48.213086],[11.460537,48.213142],[11.460812,48.213458],[11.4612,48.213856],[11.461292,48.214004],[11.461642,48.214348],[11.461906,48.214555],[11.462278,48.214807],[11.462669,48.215049],[11.462732,48.215088],[11.463238,48.21533],[11.464758,48.215966],[11.465797,48.21645],[11.466466,48.216762],[11.467626,48.217383],[11.469408,48.218191],[11.470211,48.218555],[11.470239,48.218565],[11.470976,48.218846],[11.471445,48.219028],[11.47188,48.219177],[11.472796,48.219392],[11.473095,48.219445],[11.476189,48.219606],[11.476677,48.219625],[11.476908,48.219681],[11.476968,48.219695],[11.477214,48.219765],[11.477172,48.219802],[11.477131,48.219838],[11.477095,48.21987],[11.47704,48.219917],[11.477618,48.22005],[11.478875,48.220339],[11.479621,48.22051],[11.481813,48.221014],[11.482858,48.221237],[11.484195,48.221549],[11.484383,48.221593],[11.484749,48.221677],[11.485531,48.221843],[11.486702,48.222092],[11.487148,48.22219],[11.489598,48.222684],[11.489779,48.222721],[11.491346,48.223063],[11.491014,48.223117],[11.488897,48.223467],[11.488996,48.224009],[11.488676,48.224791],[11.488516,48.225181],[11.488103,48.226188],[11.48808,48.22627],[11.488384,48.228303],[11.488234,48.228303],[11.488248,48.228402],[11.488262,48.228503],[11.488299,48.228829],[11.488408,48.229154],[11.488441,48.229337],[11.488326,48.229666],[11.487808,48.230938],[11.487805,48.230951],[11.487804,48.230965],[11.487737,48.231243],[11.487661,48.2316],[11.487648,48.231659],[11.487565,48.232045],[11.487558,48.232202],[11.487738,48.232528],[11.487877,48.232746],[11.488102,48.233101],[11.488209,48.233289],[11.488294,48.233421],[11.48833,48.233451],[11.488613,48.233715],[11.488748,48.233966],[11.489051,48.234327],[11.489221,48.234487],[11.489571,48.234764],[11.489852,48.234978],[11.489918,48.235065],[11.490034,48.235304],[11.490135,48.235588],[11.490104,48.235685],[11.489781,48.236543],[11.489635,48.236929],[11.48956,48.237128],[11.489299,48.237925],[11.489566,48.237957],[11.489733,48.237977],[11.490838,48.238034],[11.491573,48.238316],[11.491592,48.239331],[11.491598,48.239449],[11.491604,48.239598],[11.491186,48.239946],[11.491161,48.239976],[11.490827,48.240384],[11.490773,48.240475],[11.49066,48.240653],[11.490592,48.240849],[11.490605,48.241053],[11.490623,48.241096],[11.490679,48.241221],[11.490732,48.241283],[11.490835,48.241398],[11.491034,48.241549],[11.491104,48.241592],[11.491382,48.241763],[11.491403,48.24179],[11.491414,48.241818],[11.491412,48.241859],[11.491389,48.241958],[11.491302,48.242096],[11.491052,48.24241],[11.490517,48.24312],[11.49034,48.243341],[11.490292,48.243444],[11.490249,48.243673],[11.490248,48.243725],[11.490246,48.243915],[11.490246,48.24396],[11.49025,48.244001],[11.490321,48.244043],[11.490421,48.244102],[11.490509,48.244155],[11.490596,48.244504],[11.490615,48.244686],[11.490697,48.24533],[11.490729,48.245461],[11.490775,48.245553],[11.490808,48.245605],[11.490835,48.245641],[11.490948,48.245731],[11.491057,48.245785],[11.491668,48.24589],[11.494854,48.246456],[11.496008,48.246698],[11.496683,48.24687],[11.497094,48.24697],[11.497794,48.247113],[11.498183,48.247188],[11.498469,48.247233],[11.498628,48.247254],[11.498899,48.247267],[11.499324,48.247284],[11.499601,48.24735],[11.499561,48.247446],[11.499529,48.247526],[11.499523,48.247542],[11.499523,48.247557],[11.499529,48.247571],[11.499592,48.247637],[11.499575,48.247879],[11.499595,48.248051],[11.499608,48.248151],[11.499672,48.248148],[11.499794,48.248159],[11.499849,48.248164],[11.499985,48.248176],[11.500338,48.24821],[11.501075,48.24822],[11.5017,48.248122],[11.502437,48.24804],[11.504249,48.247734],[11.505051,48.247668],[11.505708,48.247579],[11.506662,48.247321],[11.507858,48.247044],[11.50849,48.246877],[11.509539,48.246691],[11.510015,48.246637],[11.510507,48.246508],[11.511137,48.246318],[11.511199,48.2463],[11.511809,48.246143],[11.512118,48.246062],[11.512298,48.246014],[11.512936,48.245835],[11.51312,48.245783],[11.51338,48.245711],[11.51489,48.245186],[11.515646,48.244923],[11.516234,48.244718],[11.51643,48.244649],[11.518139,48.244029],[11.51837,48.243947],[11.518926,48.243749],[11.519383,48.243587],[11.519646,48.243487],[11.52009,48.243316],[11.52182,48.242656],[11.523179,48.242383],[11.523986,48.241961],[11.524734,48.24157],[11.525101,48.241378],[11.525144,48.241367],[11.525447,48.241291],[11.525589,48.241252],[11.525662,48.241226],[11.525684,48.241152],[11.525774,48.240977],[11.526081,48.240334],[11.526323,48.239853],[11.526518,48.239586],[11.526651,48.239251],[11.526799,48.238967],[11.526903,48.238818],[11.526989,48.23871],[11.527059,48.238533],[11.527096,48.238332],[11.5272,48.238004],[11.527752,48.237152],[11.527992,48.236687],[11.528051,48.236533],[11.52814,48.236154],[11.528241,48.235878],[11.528307,48.235751],[11.528447,48.235545],[11.528653,48.235273],[11.528947,48.234865],[11.52926,48.234353],[11.529545,48.233863],[11.529761,48.233472],[11.530171,48.232598],[11.530274,48.232424],[11.530287,48.232403],[11.530455,48.232227],[11.530564,48.23213],[11.530736,48.232014],[11.531087,48.231783],[11.531167,48.231707],[11.53123,48.231647],[11.531381,48.231486],[11.532819,48.231419],[11.534072,48.231459],[11.534224,48.231464],[11.534196,48.231108],[11.534104,48.230789],[11.534092,48.230714],[11.534059,48.230616],[11.534261,48.230532],[11.53485,48.230468],[11.535944,48.230383],[11.536641,48.230298],[11.537047,48.230203],[11.537323,48.230134],[11.537639,48.230089],[11.537648,48.230086],[11.537709,48.230055],[11.537849,48.230001],[11.541117,48.229372],[11.541705,48.229292],[11.541822,48.229276],[11.541641,48.228842],[11.541637,48.228825],[11.541855,48.228811],[11.542566,48.228768],[11.542913,48.228746],[11.543077,48.228738],[11.543381,48.229481],[11.543444,48.229613],[11.543586,48.22989],[11.543659,48.229729],[11.543778,48.229506],[11.543893,48.229329],[11.544206,48.229338],[11.544165,48.229216],[11.544087,48.228986],[11.544145,48.228885],[11.544185,48.228817],[11.544441,48.228455],[11.544839,48.228092],[11.545213,48.227819],[11.545442,48.227679],[11.545677,48.22755],[11.546058,48.227384],[11.54633,48.227287],[11.546707,48.227172],[11.546962,48.22712],[11.547085,48.227094],[11.547195,48.227072],[11.547589,48.227011],[11.548736,48.226879],[11.548968,48.226845],[11.551571,48.226895],[11.552996,48.226933],[11.55306,48.226951],[11.553131,48.226981],[11.553556,48.226993],[11.554004,48.227001],[11.556472,48.227045],[11.559623,48.227078],[11.560555,48.227094],[11.563252,48.227179],[11.564283,48.227192],[11.566328,48.227294],[11.567346,48.227341],[11.568265,48.227387],[11.568556,48.227376],[11.568836,48.227373],[11.570161,48.227449],[11.57072,48.22748],[11.574338,48.227739],[11.575312,48.22782],[11.575536,48.22784],[11.575901,48.227894],[11.576073,48.227936],[11.579919,48.228303],[11.581645,48.228463],[11.582185,48.228511],[11.582198,48.228494],[11.582366,48.228318],[11.582422,48.22826],[11.582478,48.228201],[11.582488,48.228191],[11.58251,48.228175],[11.582517,48.22816],[11.582652,48.228019],[11.583156,48.227491],[11.583751,48.226882],[11.583754,48.226877],[11.583777,48.226855],[11.583784,48.226851],[11.583841,48.226802],[11.58426,48.22644],[11.584872,48.225934],[11.585631,48.225351],[11.58615,48.224961],[11.586702,48.224544],[11.58675,48.224509],[11.586847,48.224458],[11.587023,48.224348],[11.587054,48.224193],[11.587079,48.224064],[11.587195,48.223117],[11.587251,48.222115],[11.587322,48.221045],[11.587338,48.220122],[11.587361,48.218134],[11.587404,48.216647],[11.587452,48.213866],[11.587439,48.21371],[11.587437,48.213629],[11.587685,48.21363],[11.587765,48.213631],[11.587843,48.213631],[11.588107,48.213633],[11.58809,48.213529],[11.58814,48.213528],[11.588984,48.213517],[11.589153,48.213514],[11.590422,48.213497],[11.591953,48.213486],[11.592793,48.213476],[11.59409,48.213458],[11.594801,48.213449],[11.595326,48.213444],[11.595442,48.213445],[11.59559,48.213446],[11.597897,48.213494],[11.597934,48.213496],[11.599225,48.213425],[11.60033,48.21331],[11.60183,48.213418],[11.601496,48.214832],[11.601816,48.214938],[11.602042,48.215141],[11.602016,48.215958],[11.601991,48.216763],[11.604424,48.217278],[11.605122,48.21745],[11.60496,48.218446],[11.605942,48.218342],[11.606818,48.218456],[11.606831,48.219117],[11.611058,48.218895],[11.611151,48.219139],[11.611785,48.219147],[11.610408,48.221035],[11.609925,48.22167],[11.609543,48.222152],[11.609175,48.222581],[11.608931,48.222864],[11.608401,48.223446],[11.608352,48.223513],[11.608128,48.223813],[11.607988,48.224],[11.607657,48.224446],[11.607294,48.22498],[11.60715,48.225229],[11.606905,48.225371],[11.606659,48.225513],[11.606512,48.225766],[11.606075,48.226527],[11.605973,48.226701],[11.605717,48.226899],[11.605935,48.227007],[11.605952,48.227012],[11.606944,48.227308],[11.607515,48.227461],[11.607434,48.227707],[11.607412,48.227776],[11.607388,48.227844],[11.60729,48.228138],[11.607451,48.228163],[11.608271,48.22829],[11.609143,48.228382],[11.609336,48.227871],[11.60942,48.22765],[11.60898,48.227585],[11.608922,48.227566],[11.608819,48.227549],[11.608552,48.227536],[11.608501,48.227536],[11.607946,48.2274],[11.60791,48.227394],[11.608171,48.226524],[11.608339,48.22593],[11.608436,48.225686],[11.610085,48.225695],[11.611881,48.225708],[11.612141,48.22571],[11.612481,48.225679],[11.613242,48.225609],[11.613604,48.226282],[11.613706,48.226471],[11.613738,48.226531],[11.61377,48.22659],[11.613877,48.226791],[11.614339,48.22765],[11.614466,48.227886],[11.614532,48.22788],[11.616611,48.227669],[11.61718,48.227676],[11.617817,48.22757],[11.620229,48.227593],[11.620663,48.227544],[11.621449,48.227466],[11.622195,48.227393],[11.622275,48.227389],[11.622367,48.227377],[11.622406,48.227374],[11.62234,48.227502],[11.622319,48.227548],[11.622317,48.22769],[11.62231,48.227747],[11.622263,48.228129],[11.622191,48.228642],[11.622649,48.228671],[11.622672,48.228673],[11.622735,48.228682],[11.622785,48.22868],[11.622992,48.228652],[11.624117,48.228505],[11.624574,48.228707],[11.624641,48.228744],[11.624671,48.228768],[11.624935,48.228874],[11.627811,48.22814],[11.628214,48.228028],[11.62842,48.227983],[11.629024,48.22787],[11.629851,48.227714],[11.63093,48.227472],[11.631175,48.227412],[11.632204,48.227216],[11.632331,48.227191],[11.632421,48.227173],[11.632813,48.227089],[11.633069,48.227175],[11.633112,48.227167],[11.634039,48.226976],[11.635812,48.226529],[11.636654,48.226387],[11.636841,48.226477],[11.637592,48.226308],[11.638355,48.226215],[11.639347,48.225863],[11.639439,48.22583],[11.639269,48.225646],[11.63898,48.225334],[11.638672,48.22508],[11.638422,48.224757],[11.638272,48.224441],[11.638198,48.224159],[11.638233,48.223736],[11.638176,48.223641],[11.638168,48.223617],[11.638154,48.22343],[11.638139,48.223317],[11.638304,48.223137],[11.638347,48.22309],[11.638526,48.222724],[11.638604,48.222571],[11.638686,48.222394],[11.63891,48.22191],[11.639375,48.22182],[11.639683,48.221737],[11.639945,48.221661],[11.640161,48.221573],[11.640253,48.221535],[11.640397,48.221477],[11.640673,48.221365],[11.641193,48.221154],[11.642756,48.220671],[11.642818,48.220651],[11.642877,48.220632],[11.642997,48.220569],[11.642711,48.220301],[11.642672,48.220249],[11.642877,48.220135],[11.642903,48.22013],[11.642951,48.220109],[11.642989,48.22008],[11.643053,48.219995],[11.643283,48.219812],[11.643423,48.219739],[11.643802,48.219628],[11.644529,48.219367],[11.645644,48.21899],[11.646866,48.21854],[11.647086,48.218458],[11.647099,48.218455],[11.647123,48.218444],[11.648025,48.218143],[11.648081,48.218124],[11.648133,48.218107],[11.648553,48.217967],[11.649135,48.217758],[11.649219,48.217728],[11.64946,48.217642],[11.650281,48.21733],[11.650334,48.217321],[11.650533,48.217293],[11.650522,48.217145],[11.650512,48.217129],[11.650524,48.216913],[11.650532,48.216756],[11.650562,48.215456],[11.650526,48.214576],[11.650282,48.213712],[11.650374,48.213448],[11.650442,48.213268],[11.650253,48.212903],[11.64986,48.211833],[11.649164,48.210698],[11.648608,48.209888],[11.648593,48.209873],[11.648247,48.20964],[11.648103,48.209536],[11.648037,48.209491],[11.647971,48.209446],[11.64761,48.209197],[11.645905,48.208393],[11.645145,48.207967],[11.645134,48.207963],[11.644898,48.20788],[11.644647,48.207783],[11.644518,48.207716],[11.643424,48.207183],[11.643031,48.206959],[11.642954,48.206915],[11.642484,48.206646],[11.64247,48.206639],[11.641879,48.206382],[11.641578,48.206284],[11.641014,48.205987],[11.640927,48.205951],[11.640802,48.205863],[11.640326,48.205509],[11.640076,48.205149],[11.639959,48.205025],[11.639803,48.204901],[11.639761,48.204851],[11.63962,48.204562],[11.639598,48.204535],[11.639426,48.204288],[11.639066,48.2034],[11.638982,48.202999],[11.638879,48.202425],[11.638823,48.202059],[11.638668,48.202044],[11.638512,48.20203],[11.638492,48.201903],[11.638476,48.201221],[11.638433,48.200591],[11.638393,48.200186],[11.638309,48.19964],[11.638229,48.199364],[11.638136,48.199167],[11.638103,48.199128],[11.638072,48.199095],[11.637915,48.198763],[11.637235,48.197367],[11.636996,48.196866],[11.636907,48.196636],[11.636718,48.196309],[11.636468,48.195819],[11.636283,48.195459],[11.636071,48.195089],[11.635756,48.194564],[11.635404,48.193978],[11.635219,48.193626],[11.635133,48.193456],[11.635056,48.193278],[11.634837,48.192812],[11.634722,48.19261],[11.634638,48.192426],[11.634586,48.192327],[11.63455,48.192263],[11.634223,48.191721],[11.633994,48.191364],[11.633739,48.190951],[11.633011,48.189672],[11.632921,48.189504],[11.632629,48.189045],[11.632036,48.188099],[11.631189,48.186889],[11.630683,48.186209],[11.6305,48.185946],[11.630238,48.185614],[11.630215,48.185585],[11.629898,48.185183],[11.629851,48.185143],[11.629756,48.18497],[11.629627,48.184736],[11.629571,48.184664],[11.629366,48.184404],[11.629335,48.184364],[11.62925,48.184255],[11.62943,48.184187],[11.629584,48.18413],[11.629573,48.184114],[11.629592,48.184107],[11.629881,48.183998],[11.630112,48.183909],[11.630559,48.183737],[11.630632,48.183709],[11.630649,48.183734],[11.63076,48.183693],[11.630863,48.183655],[11.63102,48.183596],[11.631109,48.183563],[11.631237,48.183513],[11.631104,48.18336],[11.631025,48.183269],[11.630991,48.183239],[11.631149,48.183166],[11.631316,48.183074],[11.631368,48.183039],[11.631308,48.182992],[11.630722,48.182538],[11.63054,48.182361],[11.630473,48.182212],[11.628375,48.179487],[11.628389,48.179358],[11.628403,48.179263],[11.628422,48.178934],[11.628201,48.178657],[11.628078,48.178515],[11.628103,48.178303],[11.628112,48.17822],[11.628071,48.178046],[11.628018,48.177821],[11.62789,48.177395],[11.630235,48.177147],[11.630266,48.177312],[11.630336,48.177577],[11.63039,48.177714],[11.630649,48.177669],[11.631407,48.177553],[11.631533,48.177848],[11.632621,48.177616],[11.6333,48.177421],[11.634101,48.177211],[11.635376,48.176896],[11.636801,48.176551],[11.637133,48.176473],[11.637061,48.176276],[11.636905,48.175773],[11.636818,48.17567],[11.636639,48.175517],[11.636482,48.175414],[11.636379,48.175327],[11.636282,48.175241],[11.636002,48.175052],[11.635955,48.175025],[11.636049,48.174972],[11.636091,48.174948],[11.636211,48.174869],[11.636251,48.174839],[11.636304,48.174816],[11.636758,48.174679],[11.636947,48.174623],[11.63829,48.17426],[11.639037,48.174058],[11.64053,48.173641],[11.640834,48.173557],[11.640985,48.173515],[11.641372,48.174046],[11.641496,48.174038],[11.642302,48.173983],[11.642567,48.17397],[11.643645,48.173921],[11.644182,48.173896],[11.644947,48.173844],[11.645055,48.173834],[11.645193,48.173821],[11.64531,48.173811],[11.645664,48.173781],[11.645871,48.17376],[11.646109,48.173739],[11.645961,48.174051],[11.648195,48.174125],[11.648229,48.174513],[11.650772,48.174528],[11.650747,48.174705],[11.650733,48.174968],[11.650746,48.175093],[11.650977,48.175111],[11.652182,48.175181],[11.652227,48.175183],[11.653582,48.175267],[11.654868,48.175379],[11.65643,48.175522],[11.658157,48.175668],[11.659459,48.175788],[11.663068,48.176132],[11.665272,48.176369],[11.665511,48.176438],[11.665581,48.176658],[11.66561,48.176806],[11.665614,48.176852],[11.665456,48.17699],[11.665272,48.177092],[11.665239,48.17711],[11.665141,48.177163],[11.66509,48.177196],[11.664966,48.177268],[11.664937,48.17728],[11.664889,48.177291],[11.66478,48.177298],[11.664672,48.177297],[11.664616,48.177307],[11.664566,48.177326],[11.664548,48.177338],[11.664507,48.177352],[11.664328,48.177413],[11.664241,48.177464],[11.663589,48.177891],[11.663571,48.177911],[11.662973,48.178345],[11.662859,48.178432],[11.662617,48.178609],[11.662385,48.178778],[11.661901,48.179104],[11.661244,48.179549],[11.661131,48.179667],[11.661061,48.179838],[11.661068,48.180047],[11.661071,48.180262],[11.661082,48.180295],[11.661138,48.180403],[11.661148,48.180461],[11.661153,48.180532],[11.661147,48.180603],[11.661082,48.180781],[11.661009,48.180948],[11.660959,48.181062],[11.660857,48.181309],[11.66083,48.181389],[11.660874,48.181488],[11.660909,48.181564],[11.660971,48.181701],[11.661177,48.181905],[11.661599,48.181892],[11.661845,48.182225],[11.662052,48.182505],[11.662142,48.182862],[11.663359,48.182789],[11.664707,48.182703],[11.665272,48.182686],[11.667108,48.182495],[11.667802,48.182443],[11.668185,48.182392],[11.671742,48.182094],[11.672249,48.182047],[11.672375,48.182037],[11.677003,48.181649],[11.680008,48.181399],[11.681105,48.181335],[11.682063,48.181209],[11.685578,48.180658],[11.686053,48.180549],[11.686743,48.180332],[11.687241,48.180625],[11.688897,48.181628],[11.688849,48.182828],[11.689316,48.182788],[11.690854,48.182658],[11.691599,48.182595],[11.691703,48.182522],[11.691898,48.182386],[11.692116,48.182236],[11.693334,48.181343],[11.693601,48.181189],[11.693874,48.181032],[11.694677,48.18056],[11.69572,48.179912],[11.693914,48.179171],[11.693,48.178816],[11.690868,48.178091],[11.690959,48.178026],[11.69334,48.176412],[11.693635,48.176209],[11.693752,48.176129],[11.693887,48.176036],[11.694078,48.175905],[11.695429,48.174986],[11.69611,48.174518],[11.696008,48.174365],[11.695934,48.17426],[11.695804,48.174031],[11.69424,48.172016],[11.693824,48.171491],[11.693449,48.170973],[11.693136,48.17056],[11.692835,48.170624],[11.690505,48.171124],[11.688936,48.171452],[11.685914,48.171694],[11.685927,48.171613],[11.685971,48.171442],[11.686032,48.171271],[11.686293,48.17061],[11.686398,48.17031],[11.686687,48.169873],[11.686693,48.169857],[11.686724,48.169666],[11.686706,48.169491],[11.686598,48.16901],[11.686491,48.16878],[11.686245,48.168518],[11.686007,48.168304],[11.685911,48.168185],[11.685854,48.168069],[11.685871,48.167913],[11.685853,48.167724],[11.685813,48.167601],[11.685806,48.167588],[11.685661,48.167412],[11.685479,48.16725],[11.685346,48.167161],[11.685325,48.167112],[11.685289,48.166973],[11.685247,48.166931],[11.685211,48.166915],[11.685048,48.166851],[11.684905,48.166658],[11.684375,48.166068],[11.684263,48.165937],[11.684204,48.165869],[11.683466,48.165117],[11.683251,48.164905],[11.682022,48.163813],[11.681724,48.163548],[11.681566,48.163357],[11.681234,48.163001],[11.680657,48.162382],[11.677349,48.15934],[11.675588,48.157774],[11.674704,48.157024],[11.674536,48.157048],[11.674482,48.157047],[11.67442,48.157037],[11.674398,48.157035],[11.674368,48.157029],[11.674349,48.157022],[11.674275,48.157001],[11.674258,48.156998],[11.67422,48.156985],[11.674182,48.15675],[11.674066,48.15636],[11.67445,48.156114],[11.674642,48.156011],[11.675209,48.155722],[11.67527,48.155688],[11.676522,48.15498],[11.679423,48.153445],[11.679648,48.153286],[11.679692,48.153202],[11.679312,48.151569],[11.679155,48.150989],[11.679078,48.150702],[11.678222,48.146107],[11.678151,48.145835],[11.678177,48.144262],[11.678178,48.144221],[11.681236,48.144588],[11.683014,48.144753],[11.683264,48.144786],[11.684894,48.144962],[11.685071,48.144989],[11.685179,48.145006],[11.686876,48.14526],[11.688819,48.145531],[11.689157,48.145581],[11.698921,48.146823],[11.704603,48.14753],[11.70566,48.147647],[11.70628,48.147728],[11.706855,48.147803],[11.707119,48.147834],[11.707397,48.147869],[11.708022,48.147944],[11.708335,48.147957],[11.710119,48.14818],[11.710195,48.148162],[11.710261,48.148089],[11.71046,48.147869],[11.710544,48.147777],[11.711859,48.146782],[11.712822,48.146025],[11.713548,48.145446],[11.713422,48.14539],[11.713294,48.145334],[11.711498,48.144652],[11.711099,48.144505],[11.712782,48.143194],[11.712224,48.142913],[11.711773,48.142688],[11.711649,48.142627],[11.711034,48.14233],[11.710977,48.142303],[11.710509,48.142065],[11.710396,48.142008],[11.710291,48.141948],[11.710132,48.141854],[11.710928,48.141284],[11.711873,48.140529],[11.713526,48.139282],[11.713587,48.139203],[11.713634,48.139138],[11.71364,48.139132],[11.713811,48.138977],[11.713905,48.138889],[11.714096,48.138731],[11.714186,48.138678],[11.714284,48.138647],[11.714474,48.138622],[11.71454,48.138617],[11.714602,48.138613],[11.714712,48.138604],[11.71665,48.138098],[11.717845,48.137798],[11.718666,48.138254],[11.71979,48.138879],[11.720231,48.139097],[11.720343,48.13898],[11.720371,48.138956],[11.721623,48.137894],[11.721749,48.137787],[11.722193,48.137453],[11.722878,48.136937],[11.720814,48.136045],[11.72004,48.135709],[11.71968,48.135541],[11.720215,48.134708],[11.720284,48.134593],[11.720437,48.134335],[11.72013,48.134233],[11.719111,48.133936],[11.718739,48.133781],[11.718161,48.133593],[11.717842,48.133505],[11.71731,48.133387],[11.717182,48.133359],[11.716451,48.133051],[11.715247,48.132698],[11.71508,48.132764],[11.715016,48.132863],[11.714884,48.133066],[11.71481,48.133178],[11.714724,48.13331],[11.714672,48.13339],[11.714341,48.133897],[11.713793,48.133746],[11.713649,48.133704],[11.712413,48.133342],[11.712294,48.133307],[11.712265,48.133299],[11.712558,48.133007],[11.712964,48.132627],[11.713263,48.132342],[11.713399,48.13213],[11.713764,48.13179],[11.71395,48.131597],[11.71413,48.131411],[11.714273,48.131264],[11.714118,48.13119],[11.712711,48.130521],[11.711857,48.130024],[11.711769,48.129973],[11.711829,48.129942],[11.713302,48.129169],[11.714101,48.129544],[11.714128,48.129561],[11.714458,48.1297],[11.714557,48.129624],[11.715386,48.129003],[11.715534,48.128875],[11.715368,48.128746],[11.715974,48.128311],[11.715963,48.128291],[11.715398,48.127257],[11.715125,48.126758],[11.714951,48.126439],[11.714877,48.126312],[11.71467,48.125896],[11.714287,48.125226],[11.713829,48.1244],[11.713753,48.124299],[11.713602,48.124177],[11.713371,48.124039],[11.711998,48.12322],[11.710904,48.124103],[11.710886,48.124114],[11.710677,48.12397],[11.710209,48.123623],[11.709628,48.12315],[11.708896,48.122583],[11.70867,48.122917],[11.708077,48.12267],[11.707671,48.122504],[11.707619,48.122535],[11.707356,48.122663],[11.707151,48.122735],[11.707043,48.122751],[11.706601,48.122734],[11.706583,48.122734],[11.706286,48.122683],[11.705905,48.122571],[11.705882,48.122566],[11.705858,48.122557],[11.705829,48.122549],[11.705811,48.122539],[11.705614,48.122462],[11.705252,48.122295],[11.704842,48.122056],[11.70427,48.12173],[11.70418,48.121685],[11.703999,48.121594],[11.701566,48.123038],[11.699991,48.124027],[11.699332,48.124436],[11.699203,48.124529],[11.699085,48.124614],[11.698922,48.124723],[11.698553,48.124968],[11.698523,48.124988],[11.697831,48.12543],[11.69715,48.124963],[11.696518,48.12453],[11.696437,48.124474],[11.696352,48.124416],[11.696317,48.124393],[11.695957,48.124401],[11.695882,48.124398],[11.695594,48.124218],[11.695542,48.124182],[11.694047,48.123151],[11.694187,48.123068],[11.694427,48.122925],[11.697509,48.121251],[11.696974,48.120779],[11.696072,48.119985],[11.695231,48.120373],[11.695143,48.120395],[11.694765,48.119995],[11.694797,48.119832],[11.694566,48.119632],[11.694295,48.119368],[11.694238,48.119314],[11.694318,48.119262],[11.694399,48.11921],[11.694686,48.119008],[11.695694,48.11879],[11.696476,48.118631],[11.697441,48.118365],[11.697903,48.118201],[11.698237,48.118059],[11.698367,48.117989],[11.698487,48.117928],[11.698565,48.117959],[11.698915,48.11806],[11.699484,48.117898],[11.699577,48.117986],[11.707491,48.116286],[11.710711,48.115558],[11.708914,48.114248],[11.709808,48.113722],[11.710417,48.113295],[11.710723,48.113052],[11.711313,48.112654],[11.711887,48.112261],[11.712532,48.11177],[11.713002,48.111496],[11.713831,48.11106],[11.714163,48.110924],[11.714284,48.110847],[11.714393,48.110772],[11.714429,48.110748],[11.714009,48.108581],[11.713372,48.107131],[11.713214,48.10655],[11.713184,48.106422],[11.71297,48.105714],[11.71293,48.10556],[11.712742,48.105117],[11.712681,48.104923],[11.712563,48.104736],[11.712444,48.104649],[11.711726,48.104186],[11.711301,48.103917],[11.711258,48.10389],[11.711253,48.103883],[11.711192,48.103818],[11.710933,48.103621],[11.709752,48.102755],[11.709565,48.102626],[11.709126,48.102353],[11.709112,48.102344],[11.708938,48.10226],[11.708904,48.102246],[11.708776,48.102194],[11.708515,48.102107],[11.706913,48.101543],[11.706131,48.101246],[11.705964,48.101186],[11.705657,48.101035],[11.705539,48.100966],[11.705419,48.100896],[11.705073,48.100731],[11.704689,48.100548],[11.70459,48.10051],[11.704409,48.100448],[11.704289,48.100422],[11.704178,48.100401],[11.703764,48.10033],[11.70356,48.100298],[11.703511,48.100287],[11.703419,48.100265],[11.703363,48.10025],[11.70328,48.100227],[11.70306,48.10016],[11.702891,48.100089],[11.702523,48.099906],[11.701527,48.099533],[11.70147,48.099517],[11.700927,48.099381],[11.700453,48.099188],[11.70038,48.099142],[11.700339,48.099111],[11.700205,48.099069],[11.700006,48.099048],[11.698981,48.098603],[11.698405,48.098355],[11.697572,48.098006],[11.697101,48.097754],[11.696835,48.097548],[11.696642,48.097415],[11.696191,48.097266],[11.695539,48.097305],[11.694847,48.097213],[11.694605,48.097208],[11.694332,48.097139],[11.694191,48.097103],[11.693664,48.096805],[11.693585,48.096705],[11.693575,48.096698],[11.693476,48.096638],[11.692401,48.096245],[11.692065,48.096131],[11.691757,48.095995],[11.691386,48.09585],[11.691097,48.095706],[11.69084,48.095606],[11.690408,48.095484],[11.690152,48.095349],[11.69011,48.095336],[11.689889,48.095266],[11.689615,48.095125],[11.689399,48.095055],[11.688953,48.09487],[11.688941,48.094491],[11.689019,48.094165],[11.689032,48.093989],[11.688884,48.093945],[11.687121,48.093572],[11.686945,48.093537],[11.68705,48.093457],[11.687155,48.093377],[11.687656,48.092968],[11.687707,48.092927],[11.688312,48.092554],[11.688525,48.092351],[11.688699,48.092242],[11.688565,48.092212],[11.688535,48.092205],[11.6885,48.092197],[11.688487,48.092194],[11.687402,48.092216],[11.685809,48.092496],[11.684288,48.092401],[11.683863,48.092324],[11.683481,48.09223],[11.683122,48.092081],[11.682901,48.091952],[11.682733,48.091764],[11.682489,48.091441],[11.68248,48.091423],[11.682452,48.091185],[11.682436,48.091048],[11.682373,48.090404],[11.682334,48.089527],[11.682368,48.089022],[11.682342,48.088831],[11.682336,48.088759],[11.682276,48.088476],[11.682197,48.088126],[11.682149,48.088012],[11.682022,48.087506],[11.681965,48.087028],[11.68181,48.086806],[11.681649,48.086331],[11.681489,48.086223],[11.681369,48.085801],[11.681497,48.0856],[11.681137,48.08472],[11.681179,48.083293],[11.681278,48.083071],[11.681302,48.082975],[11.681555,48.082799],[11.682415,48.082286],[11.683283,48.081629],[11.683414,48.081544],[11.683428,48.08149],[11.683449,48.081358],[11.683517,48.080984],[11.683545,48.080958],[11.683651,48.080818],[11.683762,48.080554],[11.683765,48.080529],[11.683742,48.080298],[11.683817,48.080116],[11.684134,48.079357],[11.684137,48.079326],[11.68413,48.079296],[11.684093,48.079228],[11.684197,48.079124],[11.684323,48.078931],[11.68457,48.078399],[11.684865,48.078093],[11.685161,48.077907],[11.685506,48.077499],[11.685287,48.077575],[11.685162,48.077589],[11.684283,48.077685],[11.682755,48.077791],[11.682194,48.077866],[11.679832,48.078196],[11.67944,48.078242],[11.679427,48.078406],[11.6788,48.078438],[11.678751,48.078272],[11.67691,48.078452],[11.67681,48.078462],[11.674298,48.078735],[11.673647,48.078815],[11.673553,48.078317],[11.673521,48.078153],[11.671676,48.07809],[11.671484,48.078033],[11.671398,48.078012],[11.671297,48.077982],[11.671203,48.077961],[11.668583,48.077872],[11.667854,48.077839],[11.667826,48.077837],[11.667772,48.077848],[11.666975,48.078002],[11.665688,48.078165],[11.66552,48.07823],[11.665274,48.078324],[11.664933,48.07842],[11.664879,48.078429],[11.664053,48.078667],[11.663433,48.078868],[11.663323,48.078904],[11.663298,48.078832],[11.663147,48.07886],[11.662921,48.078901],[11.661958,48.079078],[11.661483,48.079165],[11.661276,48.079199],[11.659868,48.079397],[11.659192,48.079517],[11.658565,48.079639],[11.658398,48.079667],[11.657081,48.079896],[11.654259,48.080503],[11.650168,48.08132],[11.646727,48.082035],[11.641887,48.082977],[11.63746,48.083802],[11.634854,48.084167],[11.633114,48.084273],[11.633166,48.085884],[11.629578,48.086253],[11.629609,48.086514],[11.626599,48.086777],[11.626435,48.087055],[11.624153,48.087256],[11.624259,48.088044],[11.616485,48.088483],[11.615729,48.088394],[11.615732,48.08793],[11.614666,48.087958],[11.613485,48.088033],[11.613393,48.087561],[11.611994,48.087686],[11.612111,48.087131],[11.612104,48.087094],[11.612084,48.087064],[11.612047,48.087029],[11.611973,48.087024],[11.608629,48.086805],[11.608121,48.086813],[11.60743,48.086943],[11.606867,48.086945],[11.606559,48.086901],[11.605621,48.086215],[11.603457,48.085328],[11.60203,48.087369],[11.600622,48.087061],[11.600081,48.086898],[11.599972,48.086721],[11.599705,48.086678],[11.599342,48.086743],[11.599071,48.086731],[11.597911,48.086487],[11.597983,48.086306],[11.59796,48.086133],[11.597887,48.086024],[11.597664,48.085934],[11.596987,48.085908],[11.596617,48.085907],[11.595854,48.085822],[11.595195,48.085651],[11.594546,48.085462],[11.594582,48.085338],[11.594173,48.085207],[11.593622,48.085066],[11.593478,48.085063],[11.593358,48.085064],[11.593209,48.085076],[11.593032,48.085107],[11.59277,48.085185],[11.592576,48.0853],[11.592416,48.085489],[11.592308,48.08573],[11.592234,48.086004],[11.592208,48.08629],[11.592169,48.086512],[11.592127,48.08667],[11.591054,48.088632],[11.588596,48.092725],[11.588122,48.093496],[11.587831,48.09346],[11.587578,48.093462],[11.587385,48.093525],[11.586906,48.093817],[11.58684,48.093789],[11.58635,48.093507],[11.586148,48.093429],[11.585971,48.093404],[11.585776,48.093388],[11.58553,48.093411],[11.585352,48.093486],[11.585002,48.093351],[11.584376,48.093013],[11.580457,48.091524],[11.575676,48.089713],[11.574311,48.089249],[11.574272,48.088855],[11.574193,48.088766],[11.573259,48.088862],[11.570095,48.087668],[11.564791,48.085748],[11.563609,48.085329],[11.563265,48.08522],[11.563034,48.085158],[11.562793,48.085107],[11.562343,48.083594],[11.561342,48.083769],[11.56061,48.083897],[11.560355,48.083941],[11.560406,48.084144],[11.554431,48.084941],[11.553254,48.082432],[11.552414,48.080606],[11.552099,48.079932],[11.551381,48.078403],[11.551355,48.07835],[11.550651,48.07689],[11.55053,48.076647],[11.550439,48.076462],[11.550422,48.07643],[11.55039,48.076352],[11.55022,48.076006],[11.550082,48.075726],[11.549902,48.075364],[11.549651,48.074866],[11.549607,48.074768],[11.549522,48.074576],[11.549328,48.074611],[11.549294,48.074529],[11.549277,48.07449],[11.549254,48.074442],[11.549109,48.074114],[11.54848,48.072847],[11.548103,48.072068],[11.547822,48.071583],[11.547769,48.071599],[11.547628,48.07164],[11.547478,48.07169],[11.547417,48.071703],[11.547178,48.071728],[11.547091,48.071588],[11.546815,48.071122],[11.546255,48.070158],[11.546188,48.070042],[11.54564,48.069008],[11.545613,48.068911],[11.545415,48.0685],[11.545262,48.068202],[11.543899,48.068402],[11.544043,48.06921],[11.543843,48.069676],[11.544135,48.070298],[11.543991,48.071096],[11.543828,48.072004],[11.543079,48.073094],[11.543501,48.073541],[11.543385,48.07377],[11.543327,48.073829],[11.54309,48.073998],[11.542905,48.074136],[11.542752,48.074306],[11.542644,48.074403],[11.542573,48.074459],[11.542535,48.074461],[11.542371,48.074456],[11.542339,48.074459],[11.542308,48.074467],[11.542225,48.074507],[11.542108,48.074493],[11.54197,48.074473],[11.54192,48.074467],[11.541837,48.074458],[11.541807,48.074636],[11.541782,48.07483],[11.541738,48.075487],[11.541723,48.075865],[11.541896,48.076184],[11.542185,48.076833],[11.54226,48.077288],[11.542322,48.077888],[11.541903,48.077907],[11.541671,48.077915],[11.541312,48.077913],[11.540889,48.077925],[11.540604,48.077933],[11.540229,48.077941],[11.540105,48.077944],[11.539708,48.077953],[11.538816,48.077975],[11.538543,48.077982],[11.538424,48.077985],[11.538295,48.077988],[11.538119,48.077993],[11.538,48.078002],[11.53789,48.078002],[11.537667,48.078011],[11.537502,48.078002],[11.536928,48.077973],[11.536814,48.077967],[11.535853,48.077793],[11.5353,48.077741],[11.534602,48.077707],[11.53413,48.077671],[11.533852,48.077636],[11.533812,48.077632],[11.533755,48.077624],[11.532752,48.07733],[11.532522,48.077276],[11.532501,48.077196],[11.532501,48.077188],[11.532493,48.077166],[11.532488,48.077159],[11.532421,48.077007],[11.532306,48.076821],[11.532254,48.076752],[11.532238,48.076732],[11.532167,48.076665],[11.531997,48.07651],[11.531912,48.076418],[11.531857,48.076361],[11.531733,48.076183],[11.531616,48.07597],[11.531506,48.075711],[11.531335,48.075094],[11.531326,48.075082],[11.53116,48.074953],[11.531085,48.07473],[11.531064,48.074662],[11.531011,48.074599],[11.531005,48.074593],[11.53085,48.074411],[11.530776,48.074324],[11.530529,48.074035],[11.530394,48.073877],[11.530074,48.073339],[11.529241,48.071965],[11.5291,48.071729],[11.528713,48.070475],[11.528709,48.069638],[11.528225,48.069315],[11.528267,48.069054],[11.527651,48.069004],[11.526263,48.068948],[11.526241,48.068794],[11.526119,48.068273],[11.52531,48.06835],[11.52433,48.068444],[11.523818,48.068377],[11.522875,48.067368],[11.52294,48.066518],[11.522197,48.066633],[11.522289,48.066896],[11.522373,48.067135],[11.521862,48.06716],[11.52186,48.067244],[11.521226,48.06725],[11.520979,48.067249],[11.519931,48.067264],[11.519614,48.067277],[11.519375,48.067307],[11.51904,48.067342],[11.518881,48.067341],[11.519093,48.067005],[11.518918,48.066939],[11.518794,48.066893],[11.518738,48.067038],[11.518239,48.066933],[11.518264,48.06666],[11.51758,48.066735],[11.51756,48.066676],[11.51741,48.066248],[11.517103,48.066282],[11.517019,48.066291],[11.516906,48.066038],[11.516682,48.065532],[11.516604,48.06537],[11.516396,48.065389],[11.516328,48.065399],[11.516114,48.065416],[11.51609,48.065368],[11.516031,48.065272],[11.515877,48.06488],[11.515776,48.064596],[11.515688,48.064263],[11.515626,48.064052],[11.515468,48.063508],[11.515438,48.063426],[11.511556,48.064329],[11.50931,48.062134],[11.508793,48.061602]]]]}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="'Clipping'/highlighting an area by creating a filled outside polygon with area as hole">
<title>Inverse fill area (GeoJSON)</title>
<link rel="stylesheet" href="http://openlayers.org/api/2.12/theme/default/style.css">
<style>
html, body, #map {
margin: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="http://openlayers.org/api/2.12/OpenLayers.js"></script>
<script src="index.js"></script>
</body>
</html>
(function() {
var map;
// load admin. boundary
// GeoJSON from http://www.file-upload.net/download-7458340/62428.gjson.html
var request = OpenLayers.Request.GET({
url : "62428.geojson",
async : false
});
var format = new OpenLayers.Format.GeoJSON({
"internalProjection": "EPSG:900913",
"externalProjection": "EPSG:4326"
});
var boundary = format.read(request.responseText)[0];
var bounds = boundary.geometry.getBounds();
map = new OpenLayers.Map({
div : "map",
projection : "EPSG:900913",
displayProjection : "EPSG:4326",
controls : [],
restrictedExtent : bounds.scale(1.3)
});
map.addControl(new OpenLayers.Control.ArgParser());
map.addControl(new OpenLayers.Control.Attribution());
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.Navigation({
// disabled, fill rendered too slow when panning fast (base map appears)
dragPanOptions : {
enableKinetic : false
}
}));
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.Permalink());
// base map with restricted extent and limited zoom
var zoomOffset = 11;
var osm = new OpenLayers.Layer.OSM("OSM Mapnik", null, {
zoomOffset : zoomOffset,
maxResolution : 156543.03390625 / Math.pow(2, zoomOffset),
numZoomLevels : 18 - zoomOffset + 1,
attribution : "&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",
});
map.addLayer(osm);
// vector overlay for "clipping"/highlighting an area
var style = {
strokeColor : 'purple',
strokeWidth : 2,
strokeOpacity : 0.6,
fillColor : '#FFF',
fillOpacity : 1.0
};
var boundaryLayer = new OpenLayers.Layer.Vector("Boundary", {
displayInLayerSwitcher : false,
style : style,
// extend polygon clipping around map view, so that base map is always covered when panning
ratio : 3.0,
// SVG renderer has a clipping issue at high zooms (polygon disappears)
renderers : [ "VML", "Canvas" ], // "SVG",
attribution : '<br>data licensed under <a href="http://opendatacommons.org/licenses/odbl/">ODbL</a>'
});
// Create polygon with an outer outside of the viewable extent and the actual boundary as inner hole.
// disabled world-wide outer, does not work with Firefox 19 (fill disappears at zoom 16 and higher).
// var inversePolygon = map.getMaxExtent().toGeometry();
var features = [];
var inversePolygon = bounds.scale(5.0).toGeometry();
features.push(new OpenLayers.Feature.Vector(inversePolygon));
var geom = boundary.geometry;
if (geom instanceof OpenLayers.Geometry.MultiPolygon) {
// add as holes to outer polygon (admin boundary with exclaves)
for (var i = 0; i < geom.components.length; i++) {
var polygon = geom.components[i];
var linearRing = polygon.components[0];
inversePolygon.addComponent(linearRing);
}
} else if (geom instanceof OpenLayers.Geometry.Polygon) {
var linearRing = geom.components[0];
inversePolygon.addComponent(linearRing);
if (geom.components.length > 1) {
// convert inner holes to separate, standalone polygons (enclaves within admin boundary)
for (var i = 1; i < geom.components.length; i++) {
var poly = new OpenLayers.Geometry.Polygon([geom.components[i]]);
features.push(new OpenLayers.Feature.Vector(poly));
}
}
}
boundaryLayer.addFeatures(features);
map.addLayer(boundaryLayer);
if (!map.getCenter()) {
map.zoomToExtent(bounds);
}
})();
@mnowaczyk
Copy link

FYI, this won't work if the other polygons are inside holes in the first polygon, e.g Netherlands/Baarle-Nassau.

@nrenner
Copy link
Author

nrenner commented Dec 9, 2019

Thanks for the hint.

For Leaflet, you might want to give these plugins a try:
https://github.com/ebrelsford/Leaflet.snogylop
https://github.com/aparshin/leaflet-boundary-canvas

edit: plugins are for Leaflet (Gist is OpenLayers 2)

@mnowaczyk
Copy link

mnowaczyk commented Dec 10, 2019

I didn't test it (I'm not using Leaflet), but after reading the code I'm sure it won't work either. The plugin just takes the outer edge of every polygon and turns it into a hole in the world rectangle, while holes in the original polygons are discarded. This will crash when one of these outer polygons is inside a hole, because intersecting holes do not make a valid polygon.
The problem is that all outer bounaries are on the top level of this data structure, even if geometrically they're inside holes, while holes must be nested inside a specific outer boundary. The best idea I have come up with is to check if every new hole (original outer boundary) is contained in every new outer boundary (original hole) and if it is, treat it as a hole in this particular polygon, instead of a hole in the world rectangle, but this seems a bit CPU-heavy. I'll post the solution when it's done.

@indus
Copy link

indus commented Nov 14, 2022

@mnowaczyk is your solution done?

@mnowaczyk
Copy link

mnowaczyk commented Nov 15, 2022

@indus It's been a while, but I found that code. Here's a service that correctly reverses Multipolygon (represented as a list of polygons, which are a list of rings each). Although it doesn't check whether rings are CW or CCW, because we worked on good data from PostGIS.

import pointInPolygon from "robust-point-in-polygon";

export class GeoJsonTools
{
    public getBoundingBox(ring: any)
    {
        let xs = ring.map((a) => a[0]);
        let ys = ring.map((a) => a[1]);
        let minX = Math.min.apply(Math, xs);
        let minY = Math.min.apply(Math, ys);
        let maxX = Math.max.apply(Math, xs);
        let maxY = Math.max.apply(Math, ys);
        return {minX: minX, minY: minY, maxX: maxX, maxY: maxY};

    }

    public containsBbox(outer: any, inner: any)
    {
        let outerBox = this.getBoundingBox(outer);
        let innerBox = this.getBoundingBox(inner);
        return (
            innerBox.minX >= outerBox.minX
            && innerBox.minY >= outerBox.minY
            && innerBox.maxX <= outerBox.maxX
            && innerBox.maxY <= outerBox.maxY
        );
    }


    public contains(outer: any, inner: any)
    {
        if (!this.containsBbox(outer, inner)) {
            return false;
        }
        for (let point of inner) {
            if (!pointInPolygon(outer, point)) {
                return false;
            }
        }

        return true;

    }

    // simply check containment - they never intersect in correct data
    public findSmallestPolygon(polygons: any)
    {
        let smallest = polygons[0];
        for (let i = 1; i < polygons.length; i++) {
            if (this.containsBbox(smallest[0], polygons[i][0])) {
                smallest = polygons[i][0];
            }
        }
        return smallest;
    }


    public reverseMultipolygon(multiPolygon: any)
    {
        const reversedPolygon: any = Object.assign({}, multiPolygon);

        let outerRings = multiPolygon.coordinates.map((a)=>a[0].slice().reverse());
        let holeRings = [];
        for (let row of multiPolygon.coordinates) {
            for (let i = 1; i < row.length; i++) {
                holeRings.push(row[i].slice().reverse());
            }
        }

        let newPolygons = holeRings.map((a)=>[a]); //create nested arrays to append holes to.
        let newHoles = outerRings;


        //add whole-world polygon
        newPolygons.push([[
            [ -180, 90 ],
            [ -180, -90 ],
            [ 180, -90 ],
            [ 180, 90 ],
            [ -180, 90 ]
        ]]);


        //match holes with the smallest outer rings containing them
        for (let hole of newHoles) {
            let containingPolygons = [];
            for (let newPolygon of newPolygons) {
                if (this.contains(newPolygon[0], hole)) {
                    containingPolygons.push(newPolygon)
                }
            }
            if (containingPolygons.length) {
                let smallestContainingPolygon = this.findSmallestPolygon(containingPolygons);
                smallestContainingPolygon.push(hole)
            }
        }

        const reversedMultiPolygon: any = Object.assign({}, multiPolygon);
        reversedMultiPolygon.coordinates = newPolygons;
        return reversedMultiPolygon;
        
    }

}

@mnowaczyk
Copy link

The important part is finding in which new outer ring the new holes are, since this information is not present in the input data. This is done by first by checking the bounding box (which is vastly cheaper), and only if matched, checking the actual polygon (with a library function). Then the smallest outer ring containing the hole is selected.

@indus
Copy link

indus commented Nov 19, 2022

@mnowaczyk thanks for sharing your code 🙇 I didn't even expected an answer after all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment