Trying to load my own KMZ file, get error in console: KML - Placemark Regions are unsupported...

313 vues
Accéder directement au premier message non lu

cod...@gmail.com

non lue,
15 juin 2016, 12:08:5715/06/2016
à cesium-dev
Not sure what this is telling me exactly, is my kmz in a bad format? I had some geotif files I created kml (and zipped to kmz) to and this is what I am trying to load. I get that error then i get a bunch of 404 not founds on some kml files that are in the kmz (it gives me these 404s later in the file ) I can post a snippet of the doc.kml I am trying to load:

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>someimage.nitf</name>
<description></description>
<Style>
<ListStyle id="hideChildren">
<listItemType>checkHideChildren</listItemType>
</ListStyle>
</Style>
<NetworkLink>
<name>9/33/157.png</name>
<Region>
<LatLonAltBox>
<north>21.09375000000000</north>
<south>20.39062500000000</south>
<east>-156.09375000000000</east>
<west>-156.79687500000000</west>
</LatLonAltBox>
<Lod>
<minLodPixels>128</minLodPixels>
<maxLodPixels>-1</maxLodPixels>
</Lod>
</Region>
<Link>
<href>9/33/157.kml</href>
<viewRefreshMode>onRegion</viewRefreshMode>
<viewFormat/>
</Link>
</NetworkLink>
</Document>
</kml>


is see the href, which does not error out there...it errors out in later hrefs of other referenced kml files. This file was created using gdal tile creator too. It should be noted it works fine in google earth. Hopefully there is a quick fix here I really would love to load my imagery layers.

Hannah Pinkos

non lue,
15 juin 2016, 12:19:0715/06/2016
à cesium-dev,cod...@gmail.com
Hello,

Cesium doesn't currently have support for KML regions.  It's something we would like to add eventually, but we're focusing more on implementing the new 3D tiles spec right now.
Instead, you may be able to load your imagery using one of our imagery providers.  We have a UrlTemplateImageryProvider that allows you to define the the path to your imagery using a template.
You may also be able to use the createTileMapServiceImageryProvier, depending on how your tiles are formatted.  Here is a demo: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers.html&label=Showcases
For more information about imagery layers, see this tutorial: http://cesiumjs.org/tutorials/Imagery-Layers-Tutorial/

Best,

Hannah

cod...@gmail.com

non lue,
15 juin 2016, 12:38:0615/06/2016
à cesium-dev,cod...@gmail.com
Ty for fast response. I sort of figured this might be the case, I will investigate the UrlTemplateIMageryProvider. I am guessing by imagery you mean not the geotiff (nitf format) but the straight up jpg/png or whatever image is located within that. I will attempt this,
I was as a test just seeing if i could get the bounds of said image loaded as a polygon and I am having trouble with that and it is a much simpler kml file:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Maui</name>
<visibility>0</visibility>
<styleUrl>#transBluePoly</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>-156.6225,20.5594444444444,0
-156.676388888889,20.8205555555556,0
-156.205833333333,20.9055555555556,0
-156.1525,20.6447222222222,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>

</kml>


This works in google earth, but while it gives no error in cesium, nothing seems to happen.
(hacked the sandcastle demo to load this)

text : 'KML - Maui',
onselect : function() {
viewer.camera.flyHome(0);
viewer.dataSources.add(Cesium.KmlDataSource.load('../../SampleData/kml/test.kml', options));
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message