Hello,everyone.I using nginx to publish terrain and tms service.
UE version is 5.0.3, cesium version is 1.28.0.
I put the IP address " http://192.1xx.xx.xx:xx/xxx/tilemapresource.xml" into CesiumTileMapServiceRasterOverlay cesium URL.
[error] [RasterOverlayCollection.cpp:127] Tile map service XML document does not have an SRS.
How can i load it?
Well, you probably need to add an SRS element. The tilemapresource.xml file should look something like this:
https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#TileMap_Resource
What does yours look like?
Hi
My Xml file like this:
<?xml version="1.0" encoding="utf-8" ?>
<tilemap tilemapservice="http://www.osgeo.org/services/tilemapservice.xml" version="1.0.0">
<title>test</title>
<abstract/>
<srs>EPSG:4326</srs>
<vsrs/>
<boundingbox maxx="116.602602218028" maxy="40.1094278898573" minx="116.567594542221" miny="40.0401961894735"/>
<Origin x="-180" y="-90"/>
<tileformat extension="png" height="256" mime-type="image/png" width="256"/>
<tilesets profile="global-geodetic">
<tileset href="" order="1" units-per-pixel="0.3515625"/>
<tileset href="" order="2" units-per-pixel="0.17578125"/>
<tileset href="" order="3" units-per-pixel="0.087890625"/>
<tileset href="" order="4" units-per-pixel="0.0439453125"/>
<tileset href="" order="5" units-per-pixel="0.02197265625"/>
<tileset href="" order="6" units-per-pixel="0.010986328125"/>
<tileset href="" order="7" units-per-pixel="0.0054931640625"/>
<tileset href="" order="8" units-per-pixel="0.00274658203125"/>
<tileset href="" order="9" units-per-pixel="0.001373291015625"/>
<tileset href="" order="10" units-per-pixel="0.0006866455078125"/>
<tileset href="" order="11" units-per-pixel="0.00034332275390625"/>
<tileset href="" order="12" units-per-pixel="0.000171661376953125"/>
<tileset href="" order="13" units-per-pixel="8.58306884765625E-05"/>
<tileset href="" order="14" units-per-pixel="4.29153442382813E-05"/>
<tileset href="" order="15" units-per-pixel="2.14576721191406E-05"/>
<tileset href="" order="16" units-per-pixel="1.07288360595703E-05"/>
<tileset href="" order="17" units-per-pixel="5.36441802978516E-06"/>
<tileset href="" order="18" units-per-pixel="2.68220901489258E-06"/>
</tilesets>
</tilemap>
XML is case sensitive. Your tags use the wrong case, so your file is invalid.
Ok,I fix it.
But it still have some error
[RasterOverlayCollection.cpp:127] Error while creating tile provider: Connection failed.
[RasterOverlayCollection.cpp:127] Tile map service XML document does not have any tilesets.
Is it add some code?
<?xml version="1.0" encoding="utf-8" ?>
<Tilemap tilemapservice="http://www.osgeo.org/services/tilemapservice.xml" version="1.0.0">
<Title>test</Title>
<Abstract/>
<SRS>EPSG:4326</SRS>
<vsrs/>
<Boundingbox maxx="116.602602218028" maxy="40.1094278898573" minx="116.567594542221" miny="40.0401961894735"/>
<Origin x="-180" y="-90"/>
<Tileformat extension="png" height="256" mime-type="image/png" width="256"/>
<Tilesets profile="global-geodetic">
<Tileset href="" order="1" units-per-pixel="0.3515625"/>
<Tileset href="" order="2" units-per-pixel="0.17578125"/>
<Tileset href="" order="3" units-per-pixel="0.087890625"/>
<Tileset href="" order="4" units-per-pixel="0.0439453125"/>
<Tileset href="" order="5" units-per-pixel="0.02197265625"/>
<Tileset href="" order="6" units-per-pixel="0.010986328125"/>
<Tileset href="" order="7" units-per-pixel="0.0054931640625"/>
<Tileset href="" order="8" units-per-pixel="0.00274658203125"/>
<Tileset href="" order="9" units-per-pixel="0.001373291015625"/>
<Tileset href="" order="10" units-per-pixel="0.0006866455078125"/>
<Tileset href="" order="11" units-per-pixel="0.00034332275390625"/>
<Tileset href="" order="12" units-per-pixel="0.000171661376953125"/>
<Tileset href="" order="13" units-per-pixel="8.58306884765625E-05"/>
<Tileset href="" order="14" units-per-pixel="4.29153442382813E-05"/>
<Tileset href="" order="15" units-per-pixel="2.14576721191406E-05"/>
<Tileset href="" order="16" units-per-pixel="1.07288360595703E-05"/>
<Tileset href="" order="17" units-per-pixel="5.36441802978516E-06"/>
<Tileset href="" order="18" units-per-pixel="2.68220901489258E-06"/>
</Tilesets>
</Tilemap>
You haven’t fixed it completely yet. Please check the example I linked above carefully. At a glance, I can see TileMap, TileSets, and TileSet all still have incorrect casing.
Thanks,I am careless.
By the way. I have a problem:OSGEO:41001 is not supported.
<?xml version="1.0" encoding="utf-8" ?>
<TileMap tilemapservice="http://www.osgeo.org/services/tilemapservice.xml" version="1.0.0">
<Title>test OSGEO41001</Title>
<Abstract/>
<SRS>OSGEO:41001</SRS>
<vsrs/>
<BoundingBox maxx="12962586.3196642" maxy="4868742.29848059" minx="12956923.0782163" miny="4864057.13312026"/>
<Origin x="-20037508.3427890" y="-20037508.3427890"/>
<TileFormat extension="png" height="256" mime-type="image/png" width="256"/>
<TileSets profile="global-mercator">
<TileSet href="" order="1" units-per-pixel="39135.758"/>
<TileSet href="" order="2" units-per-pixel="19567.879"/>
<TileSet href="" order="3" units-per-pixel="9783.9395"/>
<TileSet href="" order="4" units-per-pixel="4891.96975"/>
<TileSet href="" order="5" units-per-pixel="2445.984875"/>
<TileSet href="" order="6" units-per-pixel="1222.9924375"/>
<TileSet href="" order="7" units-per-pixel="611.49621875"/>
<TileSet href="" order="8" units-per-pixel="305.748109375"/>
<TileSet href="" order="9" units-per-pixel="152.8740546875"/>
<TileSet href="" order="10" units-per-pixel="76.43702734375"/>
<TileSet href="" order="11" units-per-pixel="38.218513671875"/>
<TileSet href="" order="12" units-per-pixel="19.1092568359375"/>
<TileSet href="" order="13" units-per-pixel="9.55462841796875"/>
<TileSet href="" order="14" units-per-pixel="4.77731420898438"/>
<TileSet href="" order="15" units-per-pixel="2.38865710449219"/>
<TileSet href="" order="16" units-per-pixel="1.19432855224609"/>
<TileSet href="" order="17" units-per-pixel="0.597164276123047"/>
<TileSet href="" order="18" units-per-pixel="0.298582138061523"/>
<TileSet href="" order="19" units-per-pixel="0.149291069030762"/>
</TileSets>
</TileMap>
I compared it, do I need to add code?
- Must use OSGEO:41001
- Must provide s with units-per-pixel meeting the following formula for any integral value of “n” greater than or equal to 0: units-per-pixel = 78271.516 / 2^n
- This scaling allows an initial zoom level that consists of four 256x256 pixel tiles covering the whole earth, with an of (-20037508.34, -20037508.34). Other combinations of tile size and are also possible at this scale.
I’m not familiar with OSGEO:41001 offhand, but Cesium for Unreal only supports EPSG:4326 and EPSG:3857 out of the box. You’ll need to either convert it to one of those, or modify the code to add support for more. The latter is likely to be a lot of work, unless OSGEO:41001 happens to be really similar to one of the other two!
Oh, I just Googled OSGEO:41001. Should have done that before, because apparently it’s just a deprecated name for EPSG:3857.
Ah I see where you found OSGEO:41001 in the TMS spec, now. That bit about global-mercator Must use <SRS>OSGEO:41001</SRS>
is… definitely not true in the case of any of Cesium’s products, and I’m quite surprised to read it on that page. If you’re using global-mercator
, your SRS should be EPSG:3857
.