Ignore:
Timestamp:
2018-07-25T10:37:36+02:00 (6 years ago)
Author:
simon04
Message:

Specify +axis=neu for Austrian projections

This allows to use the following WMTS in JOSM:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r13757 r14049  
    1919import org.junit.Rule;
    2020import org.junit.Test;
     21import org.openstreetmap.gui.jmapviewer.TileXY;
    2122import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
    2223import org.openstreetmap.josm.Main;
     
    6667    private ImageryInfo testMultipleTileMatrixForLayer = getImagery(TestUtils.getTestDataRoot() +
    6768            "wmts/bug13975-multiple-tile-matrices-for-one-layer-projection.xml");
     69    private ImageryInfo testImageryGisKtnGvAt = getImagery(TestUtils.getTestDataRoot() + "wmts/gis.ktn.gv.at.xml");
    6870
    6971    private static ImageryInfo getImagery(String path) {
     
    409411        assertEquals("Latitude", expected.lat(), result.lat(), 1e-04);
    410412    }
     413
     414    @Test
     415    public void testGisKtnGvAt() throws IOException, WMTSGetCapabilitiesException {
     416        Main.setProjection(Projections.getProjectionByCode("EPSG:31258"));
     417        final WMTSTileSource source = new WMTSTileSource(testImageryGisKtnGvAt);
     418        source.initProjection(Main.getProjection());
     419        final TileXY tile = source.latLonToTileXY(46.6103, 13.8558, 11);
     420        assertEquals("https://gis.ktn.gv.at/arcgis/rest/services/tilecache/Ortho_2013_2015" +
     421                        "/MapServer/WMTS/tile/1.0.0/tilecache_Ortho_2013_2015/default/default028mm/11/6299/7373.jpg",
     422                source.getTileUrl(11, tile.getXIndex(), tile.getYIndex()));
     423    }
    411424}
Note: See TracChangeset for help on using the changeset viewer.