【发布时间】:2015-05-21 09:28:19
【问题描述】:
我将地球模型导入“我的地图”,然后将其导出到 KMZ。我解压了 KMZ 并通过一个验证器 (XmlValidator) 对位于 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd 的 XSD 运行生成的 doc.kml。
回应?
C:\Users\Bugmagnet\Downloads\XmlValidate-master>bin\xv.bat -v -kmz ..\doc.kml
Check: ..\doc.kml
http://www.opengis.net/kml/2.2
ERROR: SAXParseException org.xml.sax.SAXParseException; lineNumber: 3319; columnNumber: 38; cvc-complex-type.2.4.a:
Invalid content was found starting with element 'Style'. One of '{"http://www.opengis.net/kml/2.2":AbstractFeatureGroup, "http://www.opengis.net/kml/2.2":DocumentSimpleExtensionGroup, "http://www.opengis.net/kml/2.2":DocumentObjectExtensionGroup}' is expected.
Line: 3319, column: 38
3319: <Style id="line-000000-1-normal">***
ERROR: SAXParseException org.xml.sax.SAXParseException; lineNumber: 3319; columnNumber: 38; cvc-complex-type.2.4.a:
Invalid content was found starting with element 'Style'. One of '{"http://www.opengis.net/kml/2.2":AbstractFeatureGroup, "http://www.opengis.net/kml/2.2":DocumentSimpleExtensionGroup, "http://www.opengis.net/kml/2.2":DocumentObjectExtensionGroup}' is expected.
Line: 3319, column: 38
Errors: 2 Warnings: 0 Files: 1 Time: 3659 ms
Valid files 0/1 (0%)
这很重要吗?以后会咬我吗?可以或应该做什么(如果有的话)?
我之所以问,是因为我使用从 Maps 导出的 KML 作为模板,以编程方式生成 KML 以在 Maps 中使用。
奇怪的是,<Style id="line-000000-1-normal"> 标记的第一个实例不在第 3319 行,而是在第 4022 行
<Style id='line-000000-1-normal'>
<LineStyle>
<color>ff000000</color>
<width>1</width>
</LineStyle>
</Style>
第 3199 行是地标的一部分,位于 ,即
<Placemark>
<name>LPVGDatumLutID {133}- Swan Hill</name>
<description>
<![CDATA[Log Provider [10] Google Analytics V3]]>
</description>
<styleUrl>#poly-000000-1-76</styleUrl>
<ExtendedData>
</ExtendedData>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<tessellate>1</tessellate>
<coordinates>143.5614,-35.250688,0.0 143.555643,-35.250811,0.0 143.549902,-35.25118,0.0 143.544192,-35.251793,0.0 143.538529,-35.25264899999999,0.0 143.532928,-35.253746,0.0 143.527406,-35.25508000000001,0.0 143.521976,-35.256649,0.0 143.516654,-35.258447,0.0 143.511454,-35.26046899999999,0.0 143.506391,-35.26271100000001,0.0 143.501478,-35.265166,0.0 143.496729,-35.267828,0.0 143.492156,-35.270688,0.0 143.487773,-35.27373999999999,0.0 143.483592,-35.276975,0.0 143.479623,-35.280383,0.0 143.475877,-35.283957,0.0 143.472366,-35.287686,0.0 143.469098,-35.29155900000001,0.0 143.466083,-35.295567000000005,0.0 143.463328,-35.299698,0.0 143.460842,-35.30394100000001,0.0 143.458631,-35.308284,0.0 143.456702,-35.312715,0.0 143.455059,-35.317223,0.0 143.453707,-35.32179500000001,0.0 143.45265,-35.326419,0.0 143.451892,-35.331081,0.0 143.451433,-35.335769,0.0 143.451276,-35.34047000000001,0.0 143.45142,-35.345172,0.0 143.451866,-35.349861,0.0 143.452613,-35.354524,0.0 143.453657,-35.35914900000001,0.0 143.454998,-35.363723,0.0 143.45663,-35.368234,0.0 143.458549,-35.372668999999995,0.0 143.460751,-35.377016000000005,0.0 143.46322900000004,-35.381263000000004,0.0 143.465977,-35.385398,0.0 143.468986,-35.389411,0.0 143.47224900000003,-35.39328900000001,0.0 143.475757,-35.397023,0.0 143.479501,-35.400601,0.0 143.483469,-35.404015,0.0 143.487652,-35.407255000000006,0.0 143.492037,-35.410312,0.0 143.496612,-35.413178,0.0 143.501366,-35.415844,0.0 143.506285,-35.418304,0.0 143.511355,-35.42055,0.0 143.516563,-35.422577,0.0 143.521894,-35.424378999999995,0.0 143.527334,-35.42595,0.0 143.532867,-35.427287,0.0 143.538479,-35.428386,0.0 143.544154,-35.429244,0.0 143.549876,-35.429859,0.0 143.55563,-35.430228,0.0 143.5614,-35.430352,0.0 143.56717,-35.430228,0.0 143.572924,-35.429859,0.0 143.578646,-35.429244,0.0 143.584321,-35.428386,0.0 143.589933,-35.427287,0.0 143.595466,-35.42595,0.0 143.600906,-35.424379,0.0 143.606237,-35.422577,0.0 143.611445,-35.42055,0.0 143.616515,-35.418304000000006,0.0 143.621434,-35.41584400000001,0.0 143.626188,-35.413178,0.0 143.630763,-35.410312,0.0 143.635148,-35.407255000000006,0.0 143.639331,-35.404015,0.0 143.643299,-35.400601,0.0 143.647043,-35.397023,0.0 143.650551,-35.393289,0.0 143.653814,-35.389411,0.0 143.656823,-35.385398,0.0 143.659571,-35.381263000000004,0.0 143.662049,-35.377016000000005,0.0 143.664251,-35.372669,0.0 143.66617,-35.368234,0.0 143.667802,-35.363723,0.0 143.669143,-35.35914900000001,0.0 143.670187,-35.354524,0.0 143.670934,-35.349861000000004,0.0 143.67138,-35.345172,0.0 143.671524,-35.34047000000001,0.0 143.671367,-35.335769000000006,0.0 143.670908,-35.331081,0.0 143.67015,-35.32641900000001,0.0 143.669093,-35.321795,0.0 143.667741,-35.317223,0.0 143.666098,-35.312715,0.0 143.664169,-35.308284,0.0 143.661958,-35.30394100000001,0.0 143.659472,-35.29969799999999,0.0 143.656717,-35.295567000000005,0.0 143.653702,-35.291559,0.0 143.650434,-35.287686,0.0 143.646923,-35.283957,0.0 143.643177,-35.280383,0.0 143.639208,-35.276975,0.0 143.635027,-35.273740000000004,0.0 143.630644,-35.270688,0.0 143.626071,-35.267828,0.0 143.621322,-35.265166,0.0 143.616409,-35.262710999999996,0.0 143.611346,-35.260469,0.0 143.606146,-35.258447,0.0 143.600824,-35.256649,0.0 143.595394,-35.25508000000001,0.0 143.589872,-35.253746,0.0 143.584271,-35.25264899999999,0.0 143.57860800000003,-35.251793,0.0 143.572898,-35.25118,0.0 143.567157,-35.250811,0.0 143.5614,-35.250688,0.0</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
稍后
更奇怪的是:我将 kml 导入 Fusion Charts,然后将其导出。 KML 现在在地标之前具有样式信息,并且可以完美验证。
【问题讨论】:
-
KML 是什么样的(尤其是第 3319 行)?
标签: validation google-maps xsd kml google-earth