Modify

Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#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?

  1. 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 anonymous, 9 years ago

Sorry, I now see I wrote WTMS instead of WMTS above. That was a typo.

comment:2 by wiktorn, 9 years ago

Summary: WTMS issues on open data from Swedish LantmäterietWMTS 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 anonymous, 9 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 wiktorn, 9 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 wiktorn, 9 years ago

Owner: changed from team to wiktorn
Status: newassigned

comment:6 by anonymous, 9 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.)

Last edited 6 years ago by Don-vip (previous) (diff)

comment:7 by anonymous, 9 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.

in reply to:  6 comment:8 by wiktorn, 9 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

Last edited 6 years ago by Don-vip (previous) (diff)

comment:9 by Don-vip, 9 years ago

Component: CoreCore imagery
Keywords: wmts added

in reply to:  7 ; comment:10 by wiktorn, 9 years ago

Cc: bastiK 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:11 by bastiK, 9 years ago

In 8609/josm:

add proj.4 syntax "+proj=utm +zone=... [+south]" for CustomProjection (see #11701)

This is just a shortcut for a set of already supported parameters.

in reply to:  10 comment:12 by bastiK, 9 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.)

comment:13 by anonymous, 9 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?

in reply to:  13 comment:14 by bastiK, 9 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 anonymous, 9 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.

comment:16 by bastiK, 9 years ago

Could you please share the capabilities URL for WMS?

comment:17 by wiktorn, 9 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:18 by wiktorn, 9 years ago

But you need to turn off the proj4j plugin to get it working.

in reply to:  17 comment:19 by anonymous, 9 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:3006

Notice 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 bastiK, 9 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).

Last edited 9 years ago by bastiK (previous) (diff)

comment:21 by bastiK, 9 years ago

Milestone: 15.07

comment:22 by anonymous, 9 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 wiktorn, 9 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)

comment:24 by wiktorn, 9 years ago

Resolution: fixed
Status: assignedclosed

In 8618/josm:

Fix calculation of World Bounds for WMS when no projection has no bounds defined, and bogus results are returned on boundaries.

Closes: #11697, #11701

comment:25 by Don-vip, 9 years ago

Milestone: 15.0715.08

Milestone renamed

comment:26 by anonymous, 7 years ago

And the complete connection string for JOSM to Topowebbkartan is...?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain wiktorn.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.