bjornd / jvectormap

jvectormap.com
GNU Affero General Public License v3.0
1.38k stars 431 forks source link

[Solved] Adding "Nouvelle Calédonie" to France #472

Closed pierre-alain-b closed 2 years ago

pierre-alain-b commented 2 years ago

If anyone needs a map of France with Nouvelle Calédonie in addition to the other remote territories of France, you can add the following SVG path to your map to position Nouvelle Calédonie :

"FR-98": {"path": "m7.5,473l0.0084,-0.0506zm-0.595607,0.0925c0.681821,0.0456,1.290018,-1.4871,2.603909,-0.21591c2.545157,1.41572,4.760057,3.61566,6.652896,5.63164c2.020386,2.2206,5.888835,1.46614,6.464594,4.53671c2.262633,0.53833,1.041643,3.72447,3.773615,3.9313c1.754097,1.24858,-1.230063,0.0972,0.566517,1.37493c1.399069,0.43894,3.197497,1.90186,3.724509,2.43569c0.968422,-1.76616,1.64176,3.05796,1.866358,1.24306c-0.580481,-2.40367,2.070316,1.83894,3.321547,1.50587c2.281858,1.48462,4.251806,3.44225,6.562363,5.7202c1.681836,-0.0181,0.103516,1.35813,2.110075,1.3151c2.104592,0.51188,3.730762,3.10787,3.311111,5.03477c-1.064745,2.16067,-2.026871,-0.24491,-2.638565,-0.008c-0.253012,2.80066,-1.978504,-1.14592,-3.779467,-0.72863c-0.761845,-2.26892,-2.212471,1.87559,-2.03023,-0.53526c-1.216998,-0.16351,1.337413,-0.3525,-0.39092,-1.14041c-0.565091,0.42468,-1.538509,1.03938,-1.151413,-0.46723c-1.25777,0.82549,-3.563235,-1.14748,-2.834463,-1.61545c0.886507,-0.25527,-1.446211,-3.38858,-2.177708,-1.29413c-1.264287,-1.34759,-2.964714,-1.69185,-3.085585,-2.51357c-0.811532,-0.35706,-0.705248,-1.94112,-1.6519,-0.6616c-1.283205,-0.70191,-3.155701,-2.77051,-5.426932,-2.7341c-0.982503,-1.21714,-2.678693,-2.03644,-3.279571,-3.44247c-1.06428,0.57978,-1.396058,-2.00021,-2.10943,-0.35318c-0.72103,-1.46936,-1.914979,-3.66398,-2.543489,-4.51711c-1.987757,-0.67293,-1.721246,-2.51946,-4.173598,-3.18306c-2.153604,-1.47169,-1.425952,-3.22319,-3.63913,-4.99049c-1.133339,-0.80133,-2.325155,-2.43766,-1.185087,-3.18093c-0.597318,-2.02967,-3.406504,-0.45815,-1.772359,-2.69664c-0.147362,-0.77759,-1.72789,-2.48131,0.192476,-1.12608c0.782917,1.00466,1.63593,1.98575,2.719877,2.67631zm10.217907,6.5881l0.07384,-0.0631zm4.582423,1.88037l0.0675,0.0144zm-8.167227,2.79683l0.04151,-0.0265zm16.483538,13.08329c0.092,-0.13321,-0.160988,0.0313,0,0zm0.06549,0.0669l0.05757,0.0125zm0.369266,0.60341l0.0357,0.007zm21.51729,-18.15c0.72722,1.3334,-0.939712,3.34041,1.292997,3.69845c1.376855,0.91177,1.595168,3.74414,-0.474282,3.48774c-0.917805,-1.43172,-5.223587,-2.11036,-4.048672,-4.13809c2.090238,0.3676,2.20025,-3.06599,-0.16872,-2.20907c-0.343282,-1.01595,2.958872,-2.00378,3.398677,-0.83903zm10.301312,10.3089c-1.048362,2.57093,3.684254,0.007,2.285924,2.8853c-0.516987,3.45458,-4.787975,0.80383,-4.365451,-1.68313c-0.83927,-1.64606,1.514626,-0.46871,2.079527,-1.20217zm-20.942,-15.182c0.372519,-0.90921,2.391986,0.99343,0.474641,1.26113c-0.926203,1.58872,1.39834,2.16823,-0.800082,3.33881c-1.846226,0.44269,1.47041,-2.31286,0.658117,-3.69354c-0.02683,0.0257,0.000486,-1.51475,-0.332676,-0.9064zm13.544366,34.02322c1.739942,0.91298,1.191245,1.60835,-0.364682,1.97583c-0.665765,-0.5661,-0.628827,-2.61219,0.364682,-1.97583zm-56.525,-45.359c0.714153,3.54309,-1.725513,-3.10199,-0.0356,-0.24876zm46.768237,43.00891c0.967661,1.76787,-2.03641,0.96575,0,0zm-42.488,-38.225c1.3411,1.55087,-0.95732,1.53815,0,0zm3.625018,2.24912c-2.271971,-2.31358,1.27279,-0.28376,0,0zm49.860412,40.23534c-0.363013,1.09704,-0.928199,-1.12385,0,0zm-22.791,-10.795c1.542956,0.15777,-0.344517,1.05489,0,0zm-32.89732,-31.2968c1.0016,1.29806,-1.122523,0.5155,0,0zm-3.232809,-7.32555c0.655403,1.78495,-1.115172,-1.38192,0,0zm36.539672,39.49541c0.456409,1.45751,-0.83213,-0.48671,0,0zm6.022707,-21.12321c-1.288803,0.80174,-0.899394,-0.41543,0,0zm-5.444825,19.819c0.150425,0.75978,-0.571365,0.24987,0,0zm25.846796,-13.33182c-1.504444,-0.77496,0.599473,-0.90728,0,0zm-52.600296,-13.7463c-0.683278,-0.43703,0.02271,-1.13427,0,0zm-5.288495,-1.61071c-0.338349,0.43744,-0.64616,-1.24031,0,0zm30.618294,28.88678c0.833883,1.2435,-1.165874,-0.46935,0,0zm1.739572,1.75114c-0.234675,0.50646,-0.542729,-0.11543,0,0zm-2.397901,-1.86124c0.767981,0.24022,-0.441073,0.26478,0,0zm-10.44129,-7.07161c0.350697,0.17947,-0.315639,0.16638,0,0zm-3.318041,-2.63075l-0.04204,0.0855zm0,0l0.03422,-0.18358zm21.68524,6.84177c-0.278437,-0.0308,-0.202976,-0.34438,0,0zm-0.184523,-17.08446c-0.302889,-0.0228,0.283856,-0.22092,0,0zm-14.882381,14.3979c-0.283021,-0.0952,0.06802,-0.2592,0,0zm-0.05081,0.0525c-0.274665,0.0834,-0.02905,-0.43054,0,0zm9.704131,7.71977c-0.20831,0.0607,0.08471,-0.2945,0,0zm-4.805816,-4.93113l-0.02324,0.0273zm4.275615,4.16798c-0.228422,-0.14091,0.323222,-0.27678,0,0zm-0.762384,-1.67606c-0.01996,0.23928,-0.2072,-0.0691,0,0zm20.526053,10.6972c-0.193733,-0.1117,0.211542,-0.15418,0,0zm-24.279069,-13.1842c-0.06053,0.29194,-0.09559,-0.19018,0,0zm4.807369,2.43591c-0.361566,-0.0306,0.398589,-0.15974,0,0zm-8.125642,-12.06649l-0.07003,0.00097zm9.028057,13.37705c-0.281584,0.026,0.100135,-0.28968,0,0zm-0.996245,-0.68794c-0.18768,-0.0124,0.03961,-0.17771,0,0zm-4.216335,-2.37059c-0.319811,0.00047,0.13964,-0.20228,0,0zm4.39359,2.33068l-0.06137,-0.0771zm21.267543,10.49924c-0.21019,0.0257,0.10979,-0.26757,0,0zm-26.163,-13.253c-0.181892,0.10035,0.04098,-0.24168,0,0zm12.505385,1.45743l-0.0085,-0.0194zm-20.826016,-6.11551l-0.0074,-0.0251zm13.16667,7.69108c-0.199701,0.045,0.02334,-0.15545,0,0zm21.042808,9.02575l-0.04405,0.001zm-21.164829,-8.23402l0.03517,-0.0251zm-0.510861,-1.11101l-0.02398,-0.0365zm-33.811,-41.504c-0.189487,0.16208,-0.01236,-0.17159,0,0zm31.867686,40.33081l-0.0489,0.0326zm23.613221,10.43693c-0.0084,0.13737,-0.109906,-0.11664,0,0zm-0.874233,1.74237l-0.03243,-0.008zm-20.097233,-10.40665l-0.03602,0.0395zm4.625836,2.55568c0.04764,0.13873,-0.137655,-0.0527,0,0zm-11.810001,-14.60619l-0.03517,0.0215zm-21.815215,-14.85371l-0.06855,0.0254zm-3.04102,-5.39397l-0.02651,0.0305zm22.407643,25.71026l-0.04215,0.007zm7.513451,5.77856c0.04457,0.21647,-0.104572,-0.10299,0,0zm0.644914,0.0401l-0.05598,-0.0275zm-15.907,-20.714l-0.06422,-0.008zm10.767608,9.48212l-0.04141,-0.0125zm7.082826,11.92909l-0.01236,0.0308zm0.05524,0.17572l-0.06824,-0.0221zm-1.787052,0.58415l-0.02863,-0.0125zm21.303445,9.63401l-0.01077,0.0457zm-19.200744,-10.11923l-0.03887,0.001zm5.258709,3.16233l-0.02831,-0.00097zm-19.311401,-11.42161l-0.02905,0.007zm-1.504369,-2.05607l-0.02451,-0.0162zm-0.174097,-0.29372l-0.01806,0.0452z", "name": "Nouvelle-Calédonie"}

Then you also need a special inset if you want to be able to geoposition points on the NC map: here is a not so bad inset box to be added as well. {"width": 55, "top": 465, "height": 45, "bbox": [{"y": 2218578, "x": 18212005}, {"y": 2593431, "x": 18655581}], "left": 0}

The SVG path is derived from a map of NC found in SVG format and the inset box was built with a lot of trials and errors. The x and y are formated in "web mercator" which is a transformation of lat/long into meters, except that y seems reversed compared with normal practice (positive values southwards, negative values northwards). In Geoportail website, there is not so bad tool to find web mercator coordinates of a point: image

Here is what the map with Nouvelle Calédonie looks like. I hope this can help others! image