Skip to content Skip to sidebar Skip to footer

Kml Invert Country Border

I need invert KML file with Poland country. I need white overlay on other countries, only Poland should be visible. http://cv.bluewolf.pl/kml-map/ I have a problem with converting

Solution 1:

According to the winding reversal tool, all the polygons in POL_adm0.kml wind in the negative direction.

name Poland
outer -0.000029027214395682677
outer -0.00011758931589156418
outer -0.00004442846750407625
outer -0.0011201874443713677
outer -0.00001914283006954065
outer -0.0002913248119966738
outer -0.000060512058212225384
outer -0.0055139375892849785
outer -0.000024386593850067584
outer -0.000016341876744263573
outer -0.00001358358349534683
outer -0.00022344898320625362
outer -0.010447627167081919
outer -0.0026826606504073425
outer -0.07199650440122696
outer -0.00004660667070766067
outer -0.007425361581113066
outer -81.8301486672533

All you need to do is add an outerBoundaryIs that winds in the opposite direction and change all the existing outerBoundaryIs tags to innerBoundaryIs tags. Here is an <outerBoundaryIs> that winds in the correct direction:

<outerBoundaryIs><LinearRing><coordinates>
180,85 90,85 0,85 -90,85 -180,85 -180,0 -180,-85 -90,-85 0,-85 90,-85 180,-85 180,0 180,85 
</coordinates></LinearRing></outerBoundaryIs>

Updated KMZ file (displayed on a Google Maps Javascript API v3 map)

Screenshot of Poland inverted polygon

Note: It works with native Google Maps Polygons (in geoxml3), but not with KmlLayer.

Post a Comment for "Kml Invert Country Border"