#10623 closed enhancement (fixed)
support WMTS imagery services
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | 15.09 |
Component: | Core imagery | Version: | |
Keywords: | WMTS gsoc | Cc: | A_Pirard |
Description
Hallo! Bitte um Hilfe!
Ist es möglich ein selbsterzeugtes WMTS-Service in JOSM einzubinden?
Danke für die Rückmeldungen.
Meine URL:
Attachments (0)
Change History (44)
comment:2 by , 10 years ago
Component: | Core → Core imagery |
---|---|
Keywords: | WMTS added |
Priority: | major → normal |
Summary: | WMTS-Service in JOSM einbinden → support WMTS imagery services |
comment:3 by , 10 years ago
Type: | defect → enhancement |
---|
comment:4 by , 10 years ago
comment:5 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:6 by , 10 years ago
Please provide a working image URL or webservice, then we can tell you how a josm setup may look like.
comment:7 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
I can provide WMTS service for Poland as an example (I couldn't get Linz to work).
GetCapabilities:
http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?SERVICE=WMTS&REQUEST=getcapabilities
And first tile for layer <ows:Title>MAPA TOPOGRAFICZNA</ows:Title>:
http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=MAPA%20TOPOGRAFICZNA&STYLE=default&TILEMATRIXSET=EPSG:2180&TILEMATRIX=EPSG:2180:0&TILEROW=0&TILECOL=0&FORMAT=image/png&rfh=1
The problem is, that scale of tiles is defined in WMTS service description, as well as what part of the world the tiles cover, where in TMS tiles uses predefined tile size and boundaries. Its also uses KVP encoding instead of URL substitution.
follow-up: 9 comment:8 by , 10 years ago
Keywords: | gsoc added |
---|
comment:9 by , 10 years ago
An implementation could heavily use WMSImagery
and AddWMSLayerPanel
and alter the behaviour where needed (org.openstreetmap.josm.io.imagery.WMSImagery#attemptGetCapabilities
, org.openstreetmap.josm.gui.preferences.imagery.AddWMSLayerPanel#getImageryInfo
). In the end, a generated TMS URL could be returned …
Let's see what GSOC brings … :-)
comment:11 by , 10 years ago
Cc: | added |
---|
comment:12 by , 10 years ago
Here is a similar ArcGIS WMTS capability file that could hopefully be decoded by Imagery/Preferences Setup.
http://geoservices.wallonie.be/arcgis/rest/services/DONNEES_BASE/FOND_PLAN_ANNOTATIONS_2012_RW_NB/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
Paramount server as you can see by navigating up and down the directory tree.
TIA !!!
comment:14 by , 10 years ago
Great!
This should make Projection.getDefaultZoomInPPD()
obsolete. At least in AbstractProjection.getDefaultZoomInPPD()
it could be set to something like 10 / getMetersPerUnit()
.
comment:15 by , 10 years ago
If we obsolete that, can we also remove the bookmark for WMS zoom depths or fix it. There have some reports recently, which showed that actually nobody understands it and when I last looked at the code it also looked strange to me. In the past it was possible to use right click on WMS layer in layer list to make a bookmark at current zoom depths and add this to imagery list. I don't think current JOSM does that correctly anymore, at least as far as I remember I was able to create a zoom fixed menu entry without even touching the relevant function.
follow-up: 18 comment:16 by , 10 years ago
Proj4J plugin needs to be updated to implement the new method getMetersPerUnit()
.
comment:17 by , 10 years ago
Milestone: | → 15.07 |
---|
follow-up: 20 comment:18 by , 10 years ago
Replying to Don-vip:
Proj4J plugin needs to be updated to implement the new method
getMetersPerUnit()
.
Problem with Proj4J is, that it doesn't have this information. As far as I've checked, there is internal field Unit which might be degrees or meters, but its not accessible, and there is getFromMeters()
and getScaleFactor()
but implementations do not return different values for them, as far as I've checked.
from_meters have also different problem, that it uses keyword fr_meters
, that is unknown to proj.4...
comment:19 by , 10 years ago
Despite what they say in the doc, the default value for to_meters
in proj.4 seems to be 1.0 (which makes sense).
Any small deviation in this factor will be very visible in WMTS: An error of 0.01% results in an offset of 10m if you look at a place 100km away from the origin. Therefore I'm not sure it is really helplful to support degrees as a length unit, unless there is a formal specification what this means (or we have a real word test case).
comment:20 by , 10 years ago
Replying to wiktorn:
Problem with Proj4J is, that it doesn't have this information. As far as I've checked, there is internal field Unit which might be degrees or meters, but its not accessible, and there is
getFromMeters()
andgetScaleFactor()
but implementations do not return different values for them, as far as I've checked.
It should suffice to use a default value of 1.0, which covers most (non-US) projections. I guess it could be fixed, but not sure if it's worth the trouble.
from_meters have also different problem, that it uses keyword
fr_meters
, that is unknown to proj.4...
fr_meters
is used internally in proj.4 and is simply set to 1.0 / to_meters
.
comment:21 by , 10 years ago
It's impressive to read your discussions about those internals.
THANKS !!!
comment:24 by , 10 years ago
Replying to wiktorn:
Closes: #10623 - Walonnie WMTS finally works.
Unit tests are still failing: jenkins/job/JOSM/lastCompletedBuild/testReport/
comment:26 by , 10 years ago
follow-up: 28 comment:27 by , 10 years ago
Hi,
I have had a look at these Wallonie WMTS results from a practical point of view.
The problem is that they serve only EPSG:31370, probably for all WMTS data as per their habit.
That brings us back to the 5 yo ticket about impossible reprojection and mix with usual layers.
In consequence a hacked Arcgis REST GET is more interesting as they're supposed to support all projections.
BTW, I did not know (couldn't see) that the display would be so dull.
http://geoservices.wallonie.be/arcgis/rest/services/DONNEES_BASE/FOND_PLAN_ANNOTATIONS_2012_RW_NB/MapServer/WMTS/1.0.0/
shows a ot of cheerful layers ;-)
comment:28 by , 10 years ago
Replying to A_Pirard:
Hi,
I have had a look at these Wallonie WMTS results from a practical point of view.
The problem is that they serve only EPSG:31370, probably for all WMTS data as per their habit.
That brings us back to the 5 yo ticket about impossible reprojection and mix with usual layers.
The question is, to which CRS you would like to have this reprojected? If WMS layer support WGS84 imagery gets reprojected to current projection, though not always you get the proper result.
In consequence a hacked Arcgis REST GET is more interesting as they're supposed to support all projections.
BTW, I did not know (couldn't see) that the display would be so dull.
http://geoservices.wallonie.be/arcgis/rest/services/DONNEES_BASE/FOND_PLAN_ANNOTATIONS_2012_RW_NB/MapServer/WMTS/1.0.0/
shows a ot of cheerful layers ;-)
But that's exactly what I see also using different WMTS client, such as QGis. I do not see any other styles or layers advertised in their GetCapabilties document, so probably something went wrong, when tiles were generated.
comment:31 by , 10 years ago
BTW, when you are working on that imagery stuff. There are WMS which use cookies to validate valid access. Bad news for this is, that the cookie comes from a web-page not directly related to the WMS. I'd like to use at least one of them for non-OpenStreetMap purposes, but was to lazy yet to implement the necessary infrastructure, something like a "cookie-url" parameter :-)
comment:33 by , 9 years ago
I'm having issues with loading imagery from a WMTS, I've added it to the entries using the WMTS, but afterwards it seems to be greyed out and I can't select it.
Here's the WMTS, could anyone test it to see if this works for them?
comment:34 by , 9 years ago
It looks like the server is providing two tilesets for EPSG:3857 and one (GoogleMapsCompatibile) is missing tiles. I'll add support for such situation.
comment:35 by , 9 years ago
Perfect thanks! Those ArcGIS Server's can be tricky, but I've tested the WMTS with QGIS 2.10 and it seems to work fine.
Thanks again :)
comment:37 by , 9 years ago
Milestone: | 15.08 → 15.09 |
---|
follow-up: 39 comment:38 by , 9 years ago
I've updated to the latest JOSM 8752, I'm still not having any luck adding this WMS/WMTS.
http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer
Could you let me know how you've fixed this issue because it still isn't work out.
If you've got it to work on your JOSM, please comment here explaining how you did it.
Thanks :)
comment:39 by , 9 years ago
Replying to carriere.denis@…:
I've updated to the latest JOSM 8752, I'm still not having any luck adding this WMS/WMTS.
http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer
Could you let me know how you've fixed this issue because it still isn't work out.
If you've got it to work on your JOSM, please comment here explaining how you did it.
Thanks :)
With this address:
http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer
I get SAX Exception as this is not getCapabilities document.
If I use address:
http://maps.ottawa.ca/arcgis/rest/services/Basemap_Imagery_2014/MapServer/WMTS/1.0.0/WMTSCapabilities.xml
Then a dialog shows asking me, which layer to select. If I select the one, that uses default028mm, then I get imagery. For the GoogleMapsCompatibile the server lacks imagery and it doesn't work for me in QGis either.
follow-up: 42 comment:41 by , 8 years ago
Regarding [8752], wouldn't it make sense to only show the entries that match the current projection? (And skip the dialog if there is only one layer with one matching tile matrix set, which is usually the case.)
comment:42 by , 8 years ago
Replying to bastiK:
And skip the dialog if there is only one layer with one matching tile matrix set, which is usually the case.
That would be great. (Then we could e.g. interchange Maps/Germany#Saxonylatestaerialimagery with its mirror entry.)
follow-up: 45 comment:44 by , 7 years ago
Here is another file to test with, http://landmaps.nlsc.gov.tw/S_Maps/wmts .
If JOSM can deal with it, let me know.
comment:45 by , 7 years ago
Replying to jidanni:
Here is another file to test with, http://landmaps.nlsc.gov.tw/S_Maps/wmts .
If JOSM can deal with it, let me know.
Is there any program that can deal with it? I tried with QGis and it also asks to choose the layer, but the service doesn't provide any.
If I see it correctly WMTS does follow the same style like TMS, so you can specify an URL as given at Maps#TileMapServicesTMS. If you have trouble to specify the URL for JOSM, then please add a at least one working URL retrieving a PNG tile image.
I tried, but all I got were forbidden messages.