[gelöst] OpenRailwayMap in QGis: wie?

Hallo,

wie bekome ich den TMS der OpenRailwayMap in QSis angezeigt?

Geladen habe ich das Plugin: Tile Map Scale Levels: https://hub.qgis.org/projects/tilemapscalelevels hier kann man xml-Dateien definieren, die man einbinden kann.
Analog einer fertigen xml, z.B.

<GDAL_WMS>
    <Service name="TMS">
        <ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl>
    </Service>
    <DataWindow>
        <UpperLeftX>-20037508.34</UpperLeftX>
        <UpperLeftY>20037508.34</UpperLeftY>
        <LowerRightX>20037508.34</LowerRightX>
        <LowerRightY>-20037508.34</LowerRightY>
        <TileLevel>18</TileLevel>
        <TileCountX>1</TileCountX>
        <TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:3857</Projection>
    <BlockSizeX>256</BlockSizeX>
    <BlockSizeY>256</BlockSizeY>
    <BandsCount>3</BandsCount>
    <Cache>
        <Path>/tmp/cache_osm_mapnik</Path>
    </Cache>    
</GDAL_WMS> 

habe ich eine angepasst:

<GDAL_WMS>
    <Service name="TMS">
        <ServerUrl>http://{switch:a,b,c}.tiles.openrailwaymap.org/standard/{zoom}/${z}/${x}/${y}.png</ServerUrl>
    </Service>
    <DataWindow>
        <UpperLeftX>-20037508.34</UpperLeftX>
        <UpperLeftY>20037508.34</UpperLeftY>
        <LowerRightX>20037508.34</LowerRightX>
        <LowerRightY>-20037508.34</LowerRightY>
        <TileLevel>19</TileLevel>
        <TileCountX>1</TileCountX>
        <TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:3857</Projection>
    <BlockSizeX>256</BlockSizeX>
    <BlockSizeY>256</BlockSizeY>
    <BandsCount>3</BandsCount>
    <Cache>
        <Path>/tmp/cache_osm_rail</Path>
    </Cache>
</GDAL_WMS> 

Es kommt aber nur Schwarz… Ähnlich ist es mit

http://tile.waymarkedtrails.org/hiking/{x}/{y}.png

Kann mir da einer auf die Sprünge helfen? Ich bin bei diesen Geschichten nicht so fit… Spielt da irgendwie eine Transparenz eine Rolle?

Ach ja: QGis 2.8.1 und Win 7 64bit

[Gelöst] Siehe: http://forum.openstreetmap.org/viewtopic.php?pid=510645#p510645
Danke,

Sven

Die OpenRailwayMap-Tiles sind Retina-Tiles, d.h. 512x512 Pixel groß statt wie klassisch 256x256 Pixel groß.

Auch Marble und OsmAnd haben damit schon ihre Probleme gehabt.

Ohne tiefere Kenntnis von Qgis und dessen Plugins:

.tiles.openrailwaymap.org/standard/{zoom}/${z}/${x}/${y}.png

Da ist ein Zoom zu viel. Eine Kachel hat als URL nur z.B. “openrailwaymap.org/standard/14/8718/5682.png”. Ausserdem ist sie 512x512 Pixel gross.

http://tile.waymarkedtrails.org/hiking/{x}/{y}.png

Da fehlt ein Zoom. Das müsste vermutlich ungefähr so aussehen:

waymarkedtrails.org/hiking/${z}/${x}/${y}.png

Grüße, Max

Das wäre dann BlockSizeX und BlockSizeY…

mit 512 kommt auch nur schwarz… :frowning:

Das gemeine ist: Die Kacheln sind zwar doppelt so hoch und breit wie die üblichen 256x256. Die Nummer der Kachel wird aber auf Basis von 256x256 berechnet… Probier mal irgendwas mit “${z+1}” als Zoom, falls Qgis mit diesem z auch rechnen kann…

Hallo Zusammen,

Danke für die Tips…
Bei meinem Aufruf

http://tile.waymarkedtrails.org/hiking/{x}/{y}.png

hatte zunächst das

/${z}

gefehlt. Schlußendlich waren die Wanderwege noch da, der Hintergrund blieb schwarz… Manchmal hilft Versuch und Irrtum…
Der Parameter

  <BandsCount>4</BandsCount>

macht aus einem schwarzen einen transparenten Hintergrund.

Zusammenfassung:

Mit:

<GDAL_WMS>
    <Service name="TMS">
        <ServerUrl>http://tiles.openrailwaymap.org/standard/${z}/${x}/${y}.png</ServerUrl>
  </Service>
    <DataWindow>
        <UpperLeftX>-20037508.34</UpperLeftX>
        

<UpperLeftY>20037508.34</UpperLeftY>
        <LowerRightX>20037508.34</LowerRightX>
        <LowerRightY>-

20037508.34</LowerRightY>
        <TileLevel>19</TileLevel>
        <TileCountX>1</TileCountX>
        

<TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:3857</Projection>
    

<BlockSizeX>512</BlockSizeX>
    <BlockSizeY>512</BlockSizeY>
    <BandsCount>4</BandsCount>
    <Cache>
        

<Path>/tmp/cache_osm_rail</Path>
    </Cache>
</GDAL_WMS> 

werden nun die Openrailway-Map-Tiles mit transparentem Hintergrund geladen.

Mit:

<GDAL_WMS>
    <Service name="TMS">
        <ServerUrl>http://tile.waymarkedtrails.org/hiking/${z}/${x}/${y}.png</ServerUrl>
</Service>
    <DataWindow>
        <UpperLeftX>-20037508.34</UpperLeftX>
        <UpperLeftY>20037508.34</UpperLeftY>
        <LowerRightX>20037508.34</LowerRightX>
        <LowerRightY>-20037508.34</LowerRightY>
        <TileLevel>18</TileLevel>
        <TileCountX>1</TileCountX>
        <TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:3857</Projection>
    <BlockSizeX>256</BlockSizeX>
    <BlockSizeY>256</BlockSizeY>
    <BandsCount>4</BandsCount>
    <Cache>
        <Path>/tmp/cache_osm_hiking</Path>
    </Cache>    
</GDAL_WMS> 

zusätzlich die Wanderwege.

Die Variante:

bewirkt das nichtladen, es wird nichts angezeigt. Da muß wohl der PlugIn-Entwickler wohl noch nacharbeiten.
Mit

{switch:a,b,c}

in der URL wird auch nichts geladen.

Aufgrund der anderen Tile-Größe sind nun die Bahnlinien zwar etwas Fett, aber ich kann mit Leben… Ich werde noch etwas probieren.

Geholfen hat mir auch: http://www.gdal.org/frmt_wms.html

Danke,

Sven

Hallo,

ich habe die Einbindung der Tiles in QGIS mal im Wiki dokumentiert: http://wiki.openstreetmap.org/wiki/DE:OpenRailwayMap/API#Einbindung_in_QGIS.

Gruß
Alex