#11701 closed defect (fixed)
WMTS issues on open data from Swedish Lantmäteriet
Reported by: | anonymous | Owned by: | wiktorn |
---|---|---|---|
Priority: | normal | Milestone: | 15.08 |
Component: | Core imagery | Version: | latest |
Keywords: | projection wmts | Cc: | bastiK |
Description
What steps will reproduce the problem?
- In josm-latest, try the newly added WTMS suport on this endpoint: http://maps-open.lantmateriet.se/open/topowebb-ccby/v1/wmts?request=GetCapabilities&service=wmts
This data is the recently opened data from Swedish Lantmäteriet (Swedish National Land Survey).
What is the expected result?
WTMS imagery for Sweden presumably. I don't know if it works in other GIS software, since I have no experience in using them.
What happens instead?
No imagery data is displayed.
Notice how no data shows up for Sweden even after changing to EPSG:3006 (which JOSM claims is the only supported projection). For this I had to install proj4j (since that projection is not supported by default).
Please provide any additional information below. Attach a screenshot if possible.
By the way, before we add this service to the default set of URLs we need to ensure that the license is open enough, I'm still looking into that. But I thought I would test to see if it works at all first.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-07-17 01:32:09 Last Changed Author: wiktorn Revision: 8607 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-07-16 21:55:32 +0200 (Thu, 16 Jul 2015) Last Changed Rev: 8607 Identification: JOSM/1.5 (8607 en) Linux Ubuntu 14.04.2 LTS Memory Usage: 290 MB / 855 MB (202 MB allocated, but free) Java version: 1.7.0_79, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u79-2.5.5-0ubuntu0.14.04.2 VM arguments: [-Djosm.restart=true, -Djosm.home=/home/user/.josm-latest, -Djava.net.useSystemProxies=true, -Djava.net.preferIPv4Stack=true] Plugins: - AddrInterpolation (31241) - alignways (31241) - buildings_tools (31361) - graphview (31241) - proj4j (31353) - turnlanes (31241) - turnrestrictions (31241) - utilsplugin2 (31241)
Attachments (0)
Change History (26)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Summary: | WTMS issues on open data from Swedish Lantmäteriet → WMTS issues on open data from Swedish Lantmäteriet |
---|
WMTS support is not compatibile with proj4j plugin, as proj4j doesn't provide necessary information about projection. You should be able to work with this WMTS if you provide projection description by string.
comment:3 by , 10 years ago
I assume I do this in "custom projection". But I have no idea how to describe EPSG:3006 there, is there any good documentation on this? I assume I need to find out the exact definition of EPSG:3006 from somewhere to begin with? The text shown when you click "parameter information" is clearly some sort of documentation, but it is way over my head.
comment:4 by , 10 years ago
You can find definitions of the projections here:
http://cs2cs.mygeodata.eu/
And for 3006 it gives:
+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
But I took a look into the GetCapabilities document. It looks like also WGS84, Mercator and some other projections are supported. I'll look into this, why JOSM doesn't detect this tiles.
comment:5 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 8 comment:6 by , 10 years ago
I believe that is fairly easy to explain, notice the following under the layer description:
<TileMatrixSetLink> <TileMatrixSet>3006</TileMatrixSet> </TileMatrixSetLink>
I would assume that the actual layer only supports one of the defined projections? (I have not checked the spec for the capability format, so this is just an educated guess.)
follow-up: 10 comment:7 by , 10 years ago
Also the definition for 3006 you gave above doesn't work, JOSM complains about "zone" being an unknown parameter when I hit the validate button.
comment:8 by , 10 years ago
Replying to anonymous:
I believe that is fairly easy to explain, notice the following under the layer description:
<TileMatrixSetLink> <TileMatrixSet>3006</TileMatrixSet> </TileMatrixSetLink>I would assume that the actual layer only supports one of the defined projections? (I have not checked the spec for the capability format, so this is just an educated guess.)
Indeed. I stand corrected. Rest of matrices is unnecessary in this Get Capabilites document
comment:9 by , 10 years ago
Component: | Core → Core imagery |
---|---|
Keywords: | wmts added |
follow-up: 12 comment:10 by , 10 years ago
Cc: | added |
---|---|
Keywords: | projection added; template_report removed |
Replying to anonymous:
Also the definition for 3006 you gave above doesn't work, JOSM complains about "zone" being an unknown parameter when I hit the validate button.
Ok, I've just checked that JOSM doesn't support UTM projections. UTM projections are specialization[1] of TMERC projections that JOSM already supports. But as proj4j plugin is not usable for WMTS projections the main question is, whether JOSM shall support more projections out-of-the-box. This is more less the goal of #7495
@bastiK:
what do you think?
[1] http://lists.maptools.org/pipermail/proj/2003-October/000965.html
comment:12 by , 10 years ago
Replying to wiktorn:
Ok, I've just checked that JOSM doesn't support UTM projections. UTM projections are specialization[1] of TMERC projections that JOSM already supports.
This was no problem, added in [8609].
But as proj4j plugin is not usable for WMTS projections the main question is, whether JOSM shall support more projections out-of-the-box. This is more less the goal of #7495
Yes, I think we should include all from this list. (Strip those where JOSM currently doesn't support the projection method or where we already have a customized definition.)
follow-up: 14 comment:13 by , 10 years ago
I tried the latest nightly, which now accepts the zone parameter (version 8610). This does however not seem to help with the issue. Apparently using this custom projection results in JOSM not being aware of the custom projection being equal to to ESPG:3006 (which makes sense). I still get no data from that WMTS source described above.
In addition I tried with a custom definition for ESPG:3009 using a WMS source that I know works in "josm-stable" (as opposed to josm-latest) using ESPG:3009 from proj4j. This did not work either, giving me a message about "No tiles at this zoom level" (this happens at all zoom levels). Maybe related to ticket #11697?
comment:14 by , 10 years ago
Replying to anonymous:
I tried the latest nightly, which now accepts the zone parameter (version 8610). This does however not seem to help with the issue. Apparently using this custom projection results in JOSM not being aware of the custom projection being equal to to ESPG:3006 (which makes sense). I still get no data from that WMTS source described above.
For this you can add an additional parameter +wmssrs=EPSG:3006
which will make JOSM aware of the code.
comment:15 by , 10 years ago
I tried your suggestion, still not having any luck with either the WMTS imagery or the WMS imagery I'm afraid. I no longer get the message, but the lack of imagery persists.
follow-up: 19 comment:17 by , 10 years ago
I took a closer look on EPSG at spatial reference and EPSG registry. It looks like EPSG:3006 is also North-Easting projection type. So proper projection string is:
+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +axis=neu +wmssrs=EPSG:3006
Notice the +axis=neu parameter. I've just tested it with this WMTS tile source and it works.
comment:19 by , 10 years ago
Replying to wiktorn:
I took a closer look on EPSG at spatial reference and EPSG registry. It looks like EPSG:3006 is also North-Easting projection type. So proper projection string is:
+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +axis=neu +wmssrs=EPSG:3006Notice the +axis=neu parameter. I've just tested it with this WMTS tile source and it works.
This appears to work. Thank you so much.
Replying to bastiK:
Could you please share the capabilities URL for WMS?
http://karta2.orebro.se/myWMSTekOpen/TF_oppna_data.wms
I tried adding +axis=neu to this definition, ending up with the following:
+wmssrs=EPSG:3009 +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +axis=neu
But this did not work.
Note that this WMS source only has coverage in the municipality of Örebro, Sweden.
Around Lat 59.27487, long 15.20799 should work. For layer, select "Vägtrafiknät" (road network) to ensure that there is actually some data to look at.
comment:20 by , 10 years ago
Confirmed, when zooming & panning in EPSG:3006, it will sometimes load some of the tiles correctly, but often doesn't even try (no request seen in wireshark). It then displays No tiles at this zoom level
. Debugging AbstractTileSourceLayer.getTileSetInfo
, I get -4 for ts.size()
, which looks a bit odd.
Edit: My projection string is +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +wmssrs=EPSG:3006 +units=m +no_defs
(using WMS 1.1.1).
comment:21 by , 10 years ago
Milestone: | → 15.07 |
---|
comment:22 by , 10 years ago
Right, I used 3009 not 3006 with the WMS source (I don't remember if 3006 even works with it, I can check later). Either way I'm not getting it to work at all. The WMTS source appears to work though (with 3006).
comment:23 by , 10 years ago
If I provide the bounds for the projection like this:
+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +axis=neu +wmssrs=EPSG:3006 +bounds=10.5700,55.2000,24.1800,69.1000
projection bounds source: http://spatialreference.org/ref/epsg/3006/
Then after re-adding the layer, it starts to work properly. My guess is, that the problem with WMS is the same as in #11697 (some projections without bounds get bad tile matrixes and refuse to load)
Sorry, I now see I wrote WTMS instead of WMTS above. That was a typo.