KML反转国家边界 [英] KML invert country border
问题描述
我需要将波兰国家/地区的KML文件转换为波兰文. 我需要在其他国家/地区覆盖白色,只有波兰应该可见. http://cv.bluewolf.pl/kml-map/ 我在转换边界时遇到问题,并将白色覆盖层放置在世界其他地方.应该只有一个国家(波兰)可见.
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 borders, and place white overlay on the rest of the world. Only one country (Poland) should be visible.
我尝试使用geocodezip中的KML绕线反转工具,但找不到任何教程或文档. 我从github尝试了Mask-KML-polygons来转换KML文件,但这不起作用.
I tried use KML winding reversal tool from geocodezip but i can't find any tutorial or documentation. I tried Mask-KML-polygons from github to transform KML file but this don't work.
Somone可以告诉我如何使用才能在地图上获得这种效果? http://www.geocodezip.com/geoxml3_test/v3_geoxml3_NetherlandsInverted.html
Somone could tell me what can I use to get this effect on map? http://www.geocodezip.com/geoxml3_test/v3_geoxml3_NetherlandsInverted.html
推荐答案
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
您要做的就是添加一个相反方向缠绕的outerBoundaryIs,并将所有现有的outerBoundaryIs标签更改为innerBoundaryIs标签.这是一个<outerBoundaryIs>
,其绕向正确的方向:
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>
注意:它适用于本机Google Maps Polygons(在geoxml3中),但不适用于 KmlLayer .
Note: It works with native Google Maps Polygons (in geoxml3), but not with KmlLayer.
这篇关于KML反转国家边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!