0

.kml-outerBoundaryとinnerBoundaryを含むポリゴンのファイルがあります。innerBoundaryには、いくつかのLinearRingが含まれています。問題:これらの内側のLinearRingの1つだけが表示されます。残りは1つの大きな領域として表示されます。GoogleEarthは.kmlを正しく表示します。GoogleMapsでのリニアリングの使用に関して何か制限はありますか?

.kml-contentは次のとおりです。

            <Polygon>
                <tessellate>1</tessellate>
                <outerBoundaryIs>
                    <LinearRing>
                        <coordinates>
                            10.34937999738613,52.2400931297914,0 10.35028732773128,52.24063618432182,0 10.35073553354421,52.24136351829702,0 10.35189189716032,52.24988592505383,0 10.34806463125521,52.25774091880214,0 10.35510374802005,52.28074093783913,0 10.36525382191662,52.28219923082257,0 10.36640549564265,52.28254037535547,0 10.36735354160269,52.28335789758861,0 10.3674397722104,52.28435970592113,0 10.36663728719742,52.28523389526337,0 10.36519590745014,52.28570827821546,0 10.36391691384635,52.28570033201087,0 10.3517341349819,52.28394646690337,0 10.35051915642555,52.28350569457596,0 10.34978095205181,52.28276776640299,0 10.17123901924045,52.10131997644089,0 10.17235989643872,52.09780217778586,0 10.18052901452957,52.08985594298313,0 10.18354578384427,52.08079068503564,0 10.18637882641355,52.07734629223897,0 10.18854432497935,52.07383155967357,0 10.18955028947235,52.06494065656974,0 10.18692876383424,52.05806110622614,0 10.18609867783059,52.05526279086962,0 10.18266423770521,52.05031096223487,0 10.17496071867752,52.04209487107367,0 10.17296907566858,52.03952206733667,0 10.17149497660236,52.03721517767351,0 10.13695419788886,52.03180553051456,0 10.11185012314924,52.03039116391627,0 10.09087149418022,52.02383748574601,0 10.06395598483749,52.01658923645414,0 10.04264230747145,52.0219364939592,0 10.04127315628253,52.02206100334206,0 9.993582127634355,52.01377847086962,0 9.992518659595907,52.01343413056657,0 9.973070143149375,52.00223345088979,0 9.972452351144421,52.00145279897677,0 9.971465164608219,51.99723807014183,0 9.971729956811503,51.99619487354173,0 9.982781094375952,51.98230833589174,0 9.98584776903783,51.97767128379079,0 9.992498747079996,51.96927237388741,0 9.991526824755352,51.96658410520506,0 9.989677102727526,51.963473925892,0 9.989207353193477,51.95269115440273,0 9.987723808375995,51.94759969646137,0 9.988071290637597,51.94503958871096,0 9.985579149150164,51.92797935885888,0 9.982634581314299,51.92083011116905,0 9.976545113382445,51.91358003449792,0 9.976425347410789,51.91292134538674,0 9.977126572252928,51.90983485754025,0 9.976952152650551,51.9091575821778,0 9.968953361244287,51.90072768735519,0 9.967557385574938,51.89664429777992,0 9.956519186614326,51.89479325501542,0 9.925661213733045,51.88279570915655,0 9.904634577687874,51.87420986179821,0 9.866042836600235,51.87400563077158,0 9.840786680672371,51.86905472152661,0 9.824203687168184,51.86773721822254,0 9.82298684359637,51.86725725891039,0 9.818088684867986,51.86401828583837,0 9.817515015321169,51.86346138336545,0 9.817307929193369,51.86270312498086,0 9.817553956020044,51.86206040887191,0 9.833358727419491,51.83999817325148,0 9.825588568423228,51.82959855222769,0 9.825387811138562,51.82897746283462,0 9.825495834546105,51.82845301933803,0 9.83486681570386,51.80801887912119,0 9.835632705182052,51.80746767536245,0 9.849580942970656,51.80080950671429,0 9.849600167988919,51.78724427692575,0 9.849876463783591,51.78647980124794,0 9.859745265032096,51.77703207261995,0 9.860798037692216,51.77663908436064,0 9.869772750268464,51.77511146307911,0 9.876676533814441,51.75968297256625,0 9.885545467658448,51.75040513318897,0 910.25515643681103,52.19397075429494,0 10.26135026990052,52.21132679490286,0 10.26963559455321,52.23086057113682,0 10.28947890832842,52.23815799379152,0 10.30985734418318,52.23906966294749,0 10.33729401671664,52.23517167118531,0 10.33877755468816,52.23549639900235,0 10.34937999738613,52.2400931297914,0 
                        </coordinates>
                    </LinearRing>
                </outerBoundaryIs>
                <innerBoundaryIs>
                    <LinearRing>
                        <coordinates>
                            10.27240821061489,52.23739156394223,0 10.2764943557397,52.23757524856065,0 10.27174445694194,52.23582825416547,0 10.27240821061489,52.23739156394223,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            10.18590478472491,52.15184617814074,0 10.18773321261526,52.15414275375152,0 10.21854744180636,52.15686432790342,0 10.23586289911141,52.1616131675119,0 10.22852565174004,52.13471903003445,0 10.19907268145813,52.12880881157728,0 10.19802803146131,52.12843785325227,0 10.19729603908177,52.12787129612924,0 10.18590478472491,52.15184617814074,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            10.23187520742232,52.13160858695364,0 10.23571535283616,52.1236867447657,0 10.22667121522805,52.11881744802448,0 10.22109857567036,52.11870933547221,0 10.21078352155337,52.11987259654627,0 10.20429452469993,52.11868770269162,0 10.20327487665741,52.11836177245213,0 10.19905835436177,52.11820259075669,0 10.190985760793,52.11586553708817,0 10.20182609048271,52.1255791563385,0 10.23187520742232,52.13160858695364,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            10.11354864384782,52.02691666973372,0 10.13151211051896,52.02789850744416,0 10.12545920096105,52.02250120742188,0 10.12115370440896,52.02306613120236,0 10.11409090517594,52.02619009189071,0 10.11284926571018,52.02631832329674,0 10.1110575406069,52.02613565645892,0 10.11354864384782,52.02691666973372,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            10.06289843475212,52.01297237953833,0 10.06368688114465,52.01285424011538,0 10.04400246521565,52.00488379991821,0 10.0351964323982,52.00571428303371,0 10.02573814759202,52.01564941803622,0 10.04137389856296,52.01837271512394,0 10.06289843475212,52.01297237953833,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            10.01882301837729,52.00560126467275,0 10.01791689653521,52.00539276971088,0 10.0050253272684,52.00079801438069,0 9.993875665300854,52.00228244268756,0 9.992134598533912,52.00211352869745,0 9.991166239402519,52.0016318487105,0 9.981427080384554,51.99415622397375,0 9.980941046720865,51.99361138063993,0 9.980759989325868,51.99296427637764,0 9.977359126595832,51.99727356538052,0 9.978038861895602,52.00019420582686,0 9.995846263268103,52.01043639671395,0 10.01994043853371,52.01463901100602,0 10.02777237895539,52.00641389910906,0 10.02626864279406,52.00648239580418,0 10.01882301837729,52.00560126467275,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.855380456437191,51.80169632950742,0 9.855119830069164,51.80243987247973,0 9.854386518894319,51.80305001931052,0 9.839933854203153,51.80995371744533,0 9.831373766045314,51.82878797008037,0 9.839179683205527,51.83922597534188,0 9.839404889927408,51.84029323311771,0 9.823643881550311,51.86242988789854,0 9.826509623369027,51.86432475842264,0 9.842197864125474,51.86555988217815,0 9.86704471096979,51.87044292628841,0 9.905536620020534,51.87061742660831,0 9.906519913254138,51.87072815252332,0 9.928781226163636,51.8797617050511,0 9.959037904887037,51.8915342064961,0 9.968869728798218,51.89293046686156,0 9.977083330120085,51.88675718741706,0 9.982655907636911,51.87820649720261,0 9.984272976389917,51.87138278467505,0 9.983651533434161,51.85353399457469,0 9.987777500110123,51.84763608560537,0 9.981469536990044,51.83274288936134,0 9.970816392727089,51.82703158241299,0 9.956599412741996,51.82907323582232,0 9.95556264347865,51.82910399548598,0 9.921872620678796,51.82237194577901,0 9.91192480770844,51.81694106337533,0 9.906156124476002,51.8115227738887,0 9.891257184341672,51.80867361904743,0 9.890034393182011,51.80820991397683,0 9.889319119927114,51.807439865585,0 9.885811775837659,51.79966617047114,0 9.855391699864116,51.79296879392769,0 9.855380456437191,51.80169632950742,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.86890429376237,51.56354064617938,0 9.869030672132483,51.56708858502184,0 9.868739939008581,51.56780390095923,0 9.864784413676471,51.57056411969143,0 9.863623326635489,51.57115133822988,0 9.859453426883198,51.57483294787452,0 9.857515482579942,51.57850038260351,0 9.854428559135329,51.58106661061861,0 9.854252288034655,51.58298572132568,0 9.854895336189246,51.58473451977891,0 9.862212841963995,51.58982159226014,0 9.869241814810382,51.59244554094607,0 9.871322234564712,51.59363072034962,0 9.881935043226713,51.59871541941715,0 9.882379358832242,51.59929699309934,0 9.88247756305641,51.59983109680827,0 9.881520913538093,51.60604789848786,0 9.889613646059484,51.60130694440697,0 9.890409141381278,51.60108256234895,0 9.895450994668202,51.60040068385107,0 9.903592019914388,51.58728320641903,0 9.905330178839382,51.58167615977795,0 9.907553200849135,51.57969162398687,0 9.906820366259776,51.57871151051718,0 9.903677729334847,51.57595210076617,0 9.89527402192472,51.57357473795214,0 9.890584872936334,51.57287177975935,0 9.881911674694724,51.57035699151297,0 9.876371843174104,51.5656654651476,0 9.869032158747784,51.56107768324107,0 9.86890429376237,51.56354064617938,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.858779201867323,51.489395786305,0 9.864489621937006,51.49867993563625,0 9.867794245523871,51.50340826526058,0 9.873584684187492,51.50883719711155,0 9.874053245703335,51.50967352043285,0 9.873661828012333,51.51074709140966,0 9.871227066916033,51.51264459741823,0 9.865199822266186,51.51417715492575,0 9.860955086576029,51.51640833776862,0 9.859908629441906,51.51873811374746,0 9.858468178311505,51.52096647345068,0 9.857525214583614,51.52373210290834,0 9.857597510748208,51.52418686355039,0 9.859765327686237,51.52715272740425,0 9.862434541871872,51.52767629364014,0 9.865614757326281,51.52852504614184,0 9.866547487939497,51.52789349828291,0 9.867468358529136,51.52755548402293,0 9.874764845725821,51.52679006687561,0 9.875325767065272,51.52638134145568,0 9.874926368670787,51.51820657572394,0 9.87474063387136,51.51651984620041,0 9.874312502754096,51.51545187268457,0 9.874780795333292,51.51327638972658,0 9.874456985777195,51.50921250576209,0 9.874581338154602,51.50603829350691,0 9.873712838338808,51.50455994136525,0 9.873450923529427,51.50306920869146,0 9.873930297392372,51.50181147980375,0 9.875310793678436,51.50076032424005,0 9.881753757897126,51.49869972684076,0 9.880761486319919,51.49754595564943,0 9.88072183859919,51.49684654347324,0 9.881192794667367,51.49523214943569,0 9.876509719819918,51.47837031946511,0 9.850701464793442,51.47583322928328,0 9.847810692240678,51.47478923336729,0 9.858779201867323,51.489395786305,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.700915364420565,51.39833473774542,0 9.704760900917059,51.40249573430605,0 9.717216014224352,51.40815082334107,0 9.726732623236611,51.4074530351857,0 9.722770449280167,51.40476707154078,0 9.720262729350688,51.40032684898068,0 9.710957776498663,51.39567950127049,0 9.709086330617494,51.39579774654011,0 9.707890707395132,51.39562598075706,0 9.705084177996804,51.39438960270704,0 9.70354585738661,51.39348123887451,0 9.700915364420565,51.39833473774542,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.698936529761641,51.39078538267555,0 9.677762021304144,51.3787958120418,0 9.677008755773104,51.38211581122835,0 9.682988923925883,51.39053067020733,0 9.693828612498157,51.39614277114144,0 9.695244796747653,51.39759564779137,0 9.698936529761641,51.39078538267555,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.522034625765256,51.22259437450317,0 9.522979205800814,51.22370380330301,0 9.52768334312384,51.22746450172978,0 9.53635605519032,51.21216414973087,0 9.525539137183376,51.18814702076687,0 9.525399410194455,51.18823971302789,0 9.527310124965183,51.19501998921333,0 9.528298630294144,51.2057504581035,0 9.53204252703279,51.20828155732802,0 9.532498594287013,51.20889328602176,0 9.53258073147564,51.20945485152588,0 9.532213525360746,51.21290572972887,0 9.531910321718831,51.21351406586848,0 9.522034625765256,51.22259437450317,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.526567184112189,51.21207137148459,0 9.526785168010123,51.20999667128658,0 9.523291568868128,51.20764874799909,0 9.522685878292876,51.20683386405892,0 9.521605113535721,51.195334894947,0 9.520211295082605,51.19043984922755,0 9.510266683134566,51.19385765700603,0 9.509463336935815,51.1968992424458,0 9.501356257893827,51.20709698936993,0 9.502119168542613,51.21478809659912,0 9.512304662533206,51.21897404368077,0 9.518206492157084,51.21973903684739,0 9.526567184112189,51.21207137148459,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.566525360512614,50.95188995013688,0 9.565479242591346,50.95449309176134,0 9.564802800709609,50.96003377443925,0 9.567534207392471,50.96226322842058,0 9.569698398842194,50.96456983453521,0 9.575536280129162,50.96928088347298,0 9.576055653035635,50.96995108744741,0 9.576277222243927,50.98296415481611,0 9.579364036175264,50.99277703000576,0 9.582533132190738,50.99138605706582,0 9.584352635304223,50.98904585067294,0 9.58581067352212,50.98790619940409,0 9.596392328911248,50.98394786818935,0 9.598667153104369,50.9821897573667,0 9.603232195633218,50.97945012627671,0 9.614428236192232,50.97561718875059,0 9.644160337633387,50.96635515847068,0 9.65028951030282,50.96171054751159,0 9.654237948243322,50.95754130345146,0 9.657791683275045,50.95480841775315,0 9.658940270915299,50.95208128446779,0 9.661390326838658,50.94728570709903,0 9.666505042348,50.94150469916001,0 9.65936931086183,50.93930120802193,0 9.640094527498892,50.93882642485261,0 9.635736252370434,50.93973613853624,0 9.610687192073122,50.94005363827884,0 9.59376008313339,50.94328774217297,0 9.582192203629981,50.94160152758662,0 9.577345136066558,50.9453347954319,0 9.574690150351453,50.94820249070614,0 9.566525360512614,50.95188995013688,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.691035727400973,50.94291153857649,0 9.689766324329076,50.94351462196823,0 9.688500981213201,50.94388586575064,0 9.683879870931593,50.94453884540298,0 9.679208397988028,50.94685105621964,0 9.677416907750475,50.94752801006935,0 9.674552236791667,50.95076797113131,0 9.67255599884742,50.9547103928351,0 9.671032377865732,50.9583296873603,0 9.670467991921349,50.95913579865325,0 9.666016990148759,50.96261560124843,0 9.661791337571643,50.96703634982091,0 9.655006719562683,50.97218451816755,0 9.651705894600344,50.97792265148249,0 9.693756857659995,50.96115383024377,0 9.692363174997794,50.94211981725465,0 9.691035727400973,50.94291153857649,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.705487811251786,50.950975535479,0 9.738264711641767,50.92250707407628,0 9.737719884122978,50.91949528507026,0 9.732327895099079,50.92016993985099,0 9.704071088296358,50.93243878579288,0 9.705487811251786,50.950975535479,0 
                        </coordinates>
                    </LinearRing>
                    <LinearRing>
                        <coordinates>
                            9.57297933239772,50.9401935460989,0 9.568953345788223,50.9399725935024,0 9.556408846647523,50.94562492276181,0 9.558357888420554,50.95029368366789,0 9.558936040330554,50.94908033246935,0 9.55982348096966,50.94831011477817,0 9.568323611436394,50.94450353082688,0 9.570261536638659,50.94230436055462,0 9.57297933239772,50.9401935460989,0 
                        </coordinates>
                    </LinearRing>
                </innerBoundaryIs>
            </Polygon>
4

2 に答える 2

2

kmlファイルの整合性を確認しました。いくつかの問題があります。

  1. xsiプレフィックス宣言がありません:

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance

  2. これを追加すると、Galdos KML バリデーターがファイルを処理できるようになりました。

    これが私に言ったことです:

    cvc-complex-type.2.4.a: 要素「LinearRing」で始まる無効なコンテンツが見つかりました。「{"http://www.opengis.net/kml/2.2":BoundarySimpleExtensionGroup、"http://www.opengis.net/kml/2.2":BoundaryObjectExtensionGroup}」のいずれかが必要です。

    (私のデスクトップ XML バリデーターも同じ苦情を出しました。)

問題は、<kml:innerBoundaryIs>複数の<kml:LinearRing>要素が含まれていることです。

次に、KML リファレンスを確認すると、次の<kml:innerBoundaryIs>ことがわかりました。

<LinearRing> 要素が含まれています。Polygon には複数の <innerBoundaryIs> 要素を含めることができ、Polygon 内に複数のカットアウトを作成します。

したがって、Google Earth は不正な形式の KML を許容しているように見えますが、おそらく Google マップはそうではありません。

考えられる解決策: 内で繰り返すのではなく、 内で繰り返して<kml:LinearRing><kml:innerBoundaryIs>てください。<kml:innerBoundaryIs><kml:Polygon>

于 2012-08-21T16:04:21.553 に答える
0

LinearRing ポリラインが交差しているように見えます。

http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_winding_linkto.html?lat=52.051462&lng=10.031042&zoom=9&type=m&filename=http://www.geocodezip.com/geoxml3_test/testkml_polygon_inner_kml.xml

kml で chrome ブラウザが失敗する文字エンコーディングの問題がありますが、それは問題ではないようです。

Google マップの KML レンダラーに問題があるように見えますが (KML に問題がある可能性があると思います)、geoxml3 は正しくレンダリングしますが、KmlLayer は正しくレンダリングしません: http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_winding_linkto.html ?lat=52.051462&lng=10.031042&zoom=9&type=m&filename=http://www.geocodezip.com/geoxml3_test/neustekarteA_kml.xml

Google マップは、KmlLayer と同じようにレンダリングします。

Google マップには制限がありますが、制限に直面しているようには見えません。

おそらく、KML レンダラーに対して問題を開く必要があります

于 2012-08-20T13:38:51.370 に答える