Announcement

Collapse
No announcement yet.

Tiled Image Layer from EPSG:3857 tiles

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tiled Image Layer from EPSG:3857 tiles

    Hi,
    i would like to display a tiled Image layer from tiles, which come in an EPSG:900913 (probably better known as EPSG:3857) projection.
    The WMS is http://maps.openaip.net/geowebcache/...version=1.1.1& with the openaip_basemap as layer.

    I can either use a WMSTiledImageLayer, but the only projection the server supports, is EPSG:900913.

    Or i can also use a BasicMercatorTiledImageLayer and use the tile URL directly (with a custom TileUrlBuilder)/

    I use the latter approach already to display tiles from https://openweathermap.org/docs/tile_map , and it seems to work well.

    I manage to see the tiles on my map, however the projection is wrong and the tiles don't show up where they are supposed to be.

    Could someone provide me a solution or a hint of how to achieve this?

    Best regards,
    Christopher

  • #2
    Hello,
    Please what do you mean by 'projection is wrong' ? Are there just slight shifts on the coasts or on the poles (all ok at the equator?). There might be a problem of "datum-shift" at high zoom.
    Or are tiles completely messed up ? A screenshot would help.
    Txs

    Comment


    • #3
      Hello,
      i mean, that the tiles are completely messed up. in the second screenshot you can see slightly above center LIRE and LIRA, which are Airports of Rome. The tiles are actually placed in the middle of the Atlantic ocean also don't even seem to be consistent (hard edges). When i zoom in to this specific area, the tiles also change slightly, e.g. LIRE jumps. The first screenshots also shows that everything is clearly out of place.
      Those tiles are loaded by using the tile url directly (I know its not very good style).


      Using WMS and a modified Version of WMSTiledImageLayer (I have to set the SRS parameter in the URL manually to EPSG:3857) I see only black (transparent) tiles are loaded, but never any content on the map. If I used the standard WMSTiledImageLayer class, then i get a server error ( it does not accept the provided standard SRS).

      Comment


      • #4
        According to your screenshots, it seems you changed the display projection, no ? It looks like it is not the standard globe display. If you change/mix projections of basemap AND data, you must be in big trouble. WWJ works well with 4326 (geographic). If you want to use directly the 900913 (GooGle) or Mercator, you may find in this forum some experimental code that processes the tiles on-the-fly.

        Comment


        • #5
          Thank you for your reply.
          This is definitely the standard globe, we also display live aircraft tracks and so on, so from this side I am good.

          Code:
          wwd = new WorldWindowGLCanvas();
          wwd.setModel( new BasicModel() );
          The problem is surely the different projection of the additional tiles i want to display.
          Which is exactly my question: How could I transform them on-the-fly?, or at least which method would I need to modify to transform the Mercator tiles to standard geographic tiles

          Comment


          • #6
            Try the BasicMercatorTiledImageLayer It should work with the EPSG:3857. The OSMMapnikLayer extends it for properly displaying OSMs mercator projection.
            Zach
            World Wind Team
            https://github.com/NASAWorldWind

            Comment


            • #7
              It has been sorted out support for full WMS-layers by combining the map boundingbox with top level events. However it would be really nice with more top-level events, like 'PanFinished', 'ZoomFinished', etc. as the current events are raised before the map is finished with zooming/panning (an alternative could be access to map state). For example a WMS request triggered by 'ZoomChanged', would offset the image if the zoompoint is not center of previous zoomlevel.

              This might actually be a bug, as it seems that the new calculated boundingbox does not take into account the mouse offset from center coordinate when zooming to mousepointer.

              Comment


              • #8
                Hello,
                Did you finally get to display the OpenAIP correctly, extending BasicMercatorTiledImageLayer ? I tried to, and did not succeed, cause the tiling numbering seems to be different, and leads to the very same shifts that you observed, chris. With the very standard globe, sorry for that.
                I think it has to deal with the TMS/WMTS standards that are implemented so far in the web version, but not in the java one.
                I discovered recently that some other famous navigation systems had their own tiling calculations... But this one is not the default ("(1 << (tile.getLevelNumber()) + 3) - 1 - tile.getRow())" is the key point)
                Last edited by frenchy; 07-15-2017, 10:17 AM.

                Comment


                • #9
                  You are completely right frenchy the key point for EPSG:3857 projected tiles to be displayed using "(1 << (tile.getLevelNumber()) + 3) - 1 - tile.getRow())". I successfully managed to display both EPSG:3857 and EPSG:4326 (WGS84) WMTS Layers on WorldWind Java.

                  Comment


                  • #10
                    I am struggling with this, could you please provide your sample source code to display the TMS layer on world wind globe. I have tiles generated from MapTiler, here is the tilemapresource.xml file.

                    Code:
                     <?xml version="1.0" encoding="utf-8"?>
                    
                    <TileMap version="1.0.0" tilemapservice="http://tms.osgeo.org/1.0.0">
                    
                    <Title></Title>
                    
                    <Abstract></Abstract>
                    
                    <SRS>EPSG:900913</SRS>
                    
                    <BoundingBox minx="5733548.71597651019692" miny="2581366.72452007001266" maxx="6302514.75084935687482" maxy="3060385.05315696634352"/>
                    
                    <Origin x="-20037508.34278924390674" y="-20037508.34278924390674"/>
                    
                    <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
                    
                    <TileSets profile="global-mercator">
                    
                    <TileSet href="6" units-per-pixel="2445.98490512564013" order="6"/>
                    
                    <TileSet href="7" units-per-pixel="1222.99245256282006" order="7"/>
                    
                    <TileSet href="8" units-per-pixel="611.49622628141003" order="8"/>
                    
                    <TileSet href="9" units-per-pixel="305.74811314070502" order="9"/>
                    
                    <TileSet href="10" units-per-pixel="152.87405657035251" order="10"/>
                    
                    <TileSet href="11" units-per-pixel="76.43702828517625" order="11"/>
                    
                    <TileSet href="12" units-per-pixel="38.21851414258813" order="12"/>
                    
                    <TileSet href="13" units-per-pixel="19.10925707129406" order="13"/>
                    
                    <TileSet href="14" units-per-pixel="9.55462853564703" order="14"/>
                    
                    <TileSet href="15" units-per-pixel="4.77731426782352" order="15"/>
                    
                    <TileSet href="16" units-per-pixel="2.38865713391176" order="16"/>
                    
                    <TileSet href="17" units-per-pixel="1.19432856695588" order="17"/>
                    
                    <TileSet href="18" units-per-pixel="0.59716428347794" order="18"/>
                    
                    </TileSets>
                    
                    </TileMap>

                    Comment

                    Working...
                    X