Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11459 closed defect (fixed)

(I) can't get maximum zoom scaling working

Reported by: A_Pirard Owned by: team
Priority: normal Milestone: 15.08
Component: Core imagery Version: latest
Keywords: WMS Cc:

Description

(I) can't get maximum zoom scaling working
I have searched for 3 hours in vain how to get max zoom scaling to work.
I'm using this server (Wallonia, South Belgium, buildings layer only for the show))
wms[15]:http://geoservices.wallonie.be/arcgis/services/TOPOGRAPHIE/PICC/MapServer/WmsServer?&SERVICE=WMS&VERSION=1.1.1&FORMAT=image/png8&TRANSPARENT=TRUE&REQUEST=GetMap&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&LAYERS=1
As I zoom in, tiles get blank (transparent). Frustratingly, there's a scaled tiles flash before it gets overwritten.
I'm fortunate enough to have heard of the max zoom [15] in the URL here above.
I suppose the effect is to scale the tiles, Help/Preferences/Imagery does not mention it.
I would like to know which one to use, at which zoom level the tiles turn off.
But every article I read spoke of zoom levels in meters, a notion unknown to my server.
I supposed that working up from an unreasonable value would determine the value, but ... no scaling.
I saw a ticket making a patch for utilsplugin Jumpto specifying true zoom level.
I've got utilsplugin2 installed, Jumpto has no sign of zoom other than meters and Help/View Jumpto is silent about zoom.

How do I maximum zoom scaling work?
What are the obscure answers to these questions?
I'll hold the door open for the followers (add a few sentences to HELP).

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-05-08 01:31:23
Last Changed Author: stoecker
Revision: 8339
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-05-07 17:30:43 +0200 (Thu, 07 May 2015)
Last Changed Rev: 8339

Identification: JOSM/1.5 (8339 en) Linux Mint 13 Maya
Memory Usage: 844 MB / 1267 MB (58 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u71-2.5.3-0ubuntu0.12.04.1
VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
- AddrInterpolation (30892)
- FixAddresses (30892)
- OpeningHoursEditor (30962)
- PicLayer (31114)
- RoadSigns (30977)
- download_along (30892)
- editgpx (30892)
- geotools (31068)
- importvec (30892)
- jts (31002)
- mirrored_download (30962)
- opendata (31116)
- osmarender (30892)
- reltoolbox (31056)
- reverter (31120)
- scripting (30710)
- tagging-preset-tester (31120)
- turnrestrictions (31034)
- utilsplugin2 (31120)
- waydownloader (30892)

Last errors/warnings:
- E: Unable to load layers index for wms cache (file /home/p/.josm/cache/wms/layers.properties not found)
- E: Unable to load layers index for wms cache (file /home/p/.josm/cache/wms/layers.properties not found)
- E: Unable to load layers index for wms cache (file /home/p/.josm/cache/wms/layers.properties not found)
- E: Unable to load layers index for wms cache (file /home/p/.josm/cache/wms/layers.properties not found)
- E: Unable to load layers index for wms cache (file /home/p/.josm/cache/wms/layers.properties not found)

Attachments (1)

cadastre.png (121.8 KB) - added by A_Pirard 4 years ago.

Download all attachments as: .zip

Change History (33)

comment:1 Changed 4 years ago by wiktorn

Do I understand you correctly, that you would like to set minimum zoom. As far I've checked - on high zoom levels the buildings are returned, but they do disappear.

If this would be TMS layer, the definition would be tms[14,22]:..., but WMS layer doesn't yet handle this. I'm currently working on supporting such configurations.

comment:2 Changed 4 years ago by wiktorn

Component: CoreCore imagery
Keywords: WMS added; template_report removed
Milestone: 15.06

comment:3 Changed 4 years ago by A_Pirard

Do I understand you correctly, that you would like to set minimum zoom.

I and what I've read call what I need "maximum zoom".

As far I've checked - on high zoom levels the buildings are returned, but they do disappear.

That's the problem. Above that unknown maximum zoom, the picture gets blank (transparent).
I have read that if the server returns an error, JOSM will scale up the highest available zoom picture.
But that when it does not, the [maximum zoom] can be used as a request to scale up higher zooms.
But it does not and scaling (enlarging) is useful to point the mouse without shivering.

If this would be TMS layer, the definition would be tms[14,22]:...,
but WMS layer doesn't yet handle this. I'm currently working on supporting such configurations.

Nice to hear about your work !
I don't know what the other value does, I just need maximum zoom.
But BTW are those [values] explained somewhere so that I could have Help/Preferences/Imagery link to that?

THANKS!

Last edited 4 years ago by A_Pirard (previous) (diff)

comment:4 Changed 4 years ago by A_Pirard

I finally figured how to force the zoom level and the maximum is 21.
(Patch in ticket #2112)
To ease users finding how to do, may I suggest what's in bold:
View/Jump To Position+Zoom
In that dialog:
Zoom (in metres, use URL to set by level)

Thanks.

comment:5 Changed 4 years ago by wiktorn

You can also right-click on a layer and turn off "auto zoom" option. Then JOSM will maintain zoom level of imagery layer, even when you change the zoom level of view.

comment:6 Changed 4 years ago by A_Pirard

You can also right-click on a layer and turn off "auto zoom" option.

I knew enough to have imagined that but only you did ;-)
Yes, it solves the precision problem indeed.
But JOSM doesn't remember the setting (when the layer is reopened).
Also, (fortunately) it automatically downloads only at close zoom.
And there is no wide area view (beside OSM (when it's already tagged))..

So, thank you so much for the tip and...
am I wrong thinking that you will feel like solving the max zoom problem?
Shouldn't be too hard if it's behaving like for image errors.
If what I read is true and correctly understood.

Thanks again. Glad to feedback. Nice software. I'm trying to promote it.

comment:7 in reply to:  6 Changed 4 years ago by wiktorn

Replying to A_Pirard:

But JOSM doesn't remember the setting (when the layer is reopened).

You have also possibility to change the default (Preferences / WMS-TMS / Settings / WMS / autozoom), but then - it will affect all the layers. It might be not what you want.


Also, (fortunately) it automatically downloads only at close zoom.

Yes, we do not want to generate to many requests to WMS server.

And there is no wide area view (beside OSM (when it's already tagged))..

You can always use "Change resolution" and it will switch to your current map view zoom level. It might be good if you want to see some overview.

So, thank you so much for the tip and...
am I wrong thinking that you will feel like solving the max zoom problem?

Yes. I plan to publish the changes begging of next month (in JOSM latest version) so it will be available in tested version at the end of June.

Thanks again. Glad to feedback. Nice software. I'm trying to promote it.

Thank you :-)

comment:8 in reply to:  6 Changed 4 years ago by stoecker

But JOSM doesn't remember the setting (when the layer is reopened).

You can create a layer entry which starts as a fixed zoom. Thought I don't remember anymore how. (Bookmark in right click or layer menu??)

comment:9 Changed 4 years ago by wiktorn

Ticket #11476 has been marked as a duplicate of this ticket.

comment:10 Changed 4 years ago by mdk

The problem here is, as far as I understand, that the tile server either is serving black tiles for higher zoom levels, which would be a duplicate of #10454 (perhaps we need to add an additional filter to detect these black tiles), or the tile server is serving error tiles, which sould be solved with #11553.

comment:11 Changed 4 years ago by wiktorn

But here we are talking about WMS, not TMS. This is not yet solved by neither #10454 nor #11553.

comment:12 in reply to:  11 Changed 4 years ago by mdk

Replying to wiktorn:

But here we are talking about WMS, not TMS. This is not yet solved by neither #10454 nor #11553.

Sorry, I didn't know that WMS and TMS have such different implementations in JOSM.

comment:13 Changed 4 years ago by wiktorn

I plan to change that, but I'm waiting with this change for next release, as this is a bigger change. See #11255.

comment:14 Changed 4 years ago by Don-vip

Milestone: 15.0615.07

skip milestone 15.06

comment:15 Changed 4 years ago by wiktorn

In 8526/josm:

Introduce WMS layer based on TMS. (closes: #11255)

HEADS UP: After this patch you need to manually remove JAX-B generated file/class: org/w3/_2001/xmlschema/Adapter1.java to compile the tree again.

  • create AbstractTileSourceLayer based on TMSLayer as a base for TMS, WMS and (future) WMTS layers, (addresses #11459)
  • WMS layer now uses JCS Caching (closes: #7363)
  • introduce new conversion methods in TileSource, that convert both X and Y (lat and lon) in one call. This is necessary for other than PseudoMercator projections
    • introduce TileXY class that represents X and Y indexes of tile in tile matrix/space
    • mark old conversion methods as deprecated
    • refactor JMapViewer and JOSM to new methods
    • change use of Coordinate class to ICoordinate where appropiate
  • extract CachedAttributionBingAerialTileSource to separate file
  • create TemplatedWMSTileSource that provides the WMS Layer with square (according to current projection) tiles (closes: #11572, closes: #7682, addresses: #5454)
  • implemented precaching imagery along GPX track for AbstractTileSourceLayer, so now it work for both - WMS and TMS (closes: #9154)
  • implemented common righ-click menu on map view, as well on layer list (closes #3591)
  • create separate build commands for JMapViewer classes to easily spot, when josm classes are used within JMapViewer
  • remove unnecessary classes of previous WMS implementation - GeorefImage, wms-cache.xsd (and JAXB task from build), WMSCache, WMSRequest, WMSGrabber, HTMLGrabber, WMSException

comment:16 Changed 4 years ago by wiktorn

Resolution: fixed
Status: newclosed

It looks like it is fixed in josm-latest.

comment:17 Changed 4 years ago by A_Pirard

Hi,
Am I missing something?
I use wms[21]:http://geoservices.wallonie.be/arcgis/services/TOPOGRAPHIE/PICC/MapServer/WmsServer?&SERVICE=WMS&VERSION=1.1.1&FORMAT=image/png8&TRANSPARENT=TRUE&REQUEST=GetMap&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&LAYERS=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

With 8491, the maximum zoom the layer displays is 21. Above, it blanks. Hence this ticket.

With version 8595, if I jump to zoom 21 or if I zoom above 20, the layer blanks.
Isn't it supposed to scale up, and why doesn't it display at 21?

Did you say you would implement min zoom too, that is, scaling down below zoom 15 in this case?

TIA.

comment:18 Changed 4 years ago by wiktorn

The imagery gets blank because server returns blank images at this zoom levels. To get the trees regardless of the zoom level, for your service proper zoom levels are from 16 to 19:
wms[16,19]:http://geoservices.wallonie.be/arcgis/services/TOPOGRAPHIE/PICC/MapServer/WmsServer?&SERVICE=WMS&VERSION=1.1.1&FORMAT=image/png8&TRANSPARENT=TRUE&REQUEST=GetMap&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&LAYERS=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

It will scale down when you zoom out, but if you zoom out too much, JOSM will refuse to download the tiles.

comment:19 Changed 4 years ago by A_Pirard

OK, wms[16,19] produces both scalings.
But the problem I explained is that, by using wms: and ctrl-J
8491 does display the layers 15 and 21 (as returned by the server)
These are the limits, not 16 and 19.
Hence, with 8595 I used wms[15,21] with bad results.
It didn't display 15 and 21 !!!
So, beware of existing configurations.
But, making different tests, I am amazed!!
8595 does the up-scaling without any max-zoom, just a plain wms:
both with ctrl-J and + key
ctrl-J to 15 works, but not 14 (no downscaling)
(and getting back from attempted 14 to 15 with + key -> blank layer)

Downscaling not a big deal.
So, is plain wms: the right way to go?

I'd gladly make more tests.
But the trace of HTTP requests has disappeared.
Not very practical to have to start --debug and have a disturbed display.
Could you please restore tracing server requests?

comment:20 in reply to:  19 Changed 4 years ago by wiktorn

Replying to A_Pirard:

I'd gladly make more tests.
But the trace of HTTP requests has disappeared.
Not very practical to have to start --debug and have a disturbed display.
Could you please restore tracing server requests?

I'm reluctant to do so. For all debugging I use right click and show tile info. In the dialog you'll get also url of clicked tile, which you can copy. I find this far more comfortable.

The rest I'll check later.

comment:21 Changed 4 years ago by A_Pirard

I want to try, but what do I right-click ? ;-)
(JOSM uses the right button only to drag the map)

+BTW, is there a graphical Debian/Java program to see/extract what's in the new JOSM cache?

TIA!!!

comment:22 in reply to:  19 Changed 4 years ago by wiktorn

Replying to A_Pirard:

OK, wms[16,19] produces both scalings.
But the problem I explained is that, by using wms: and ctrl-J
8491 does display the layers 15 and 21 (as returned by the server)
These are the limits, not 16 and 19.
Hence, with 8595 I used wms[15,21] with bad results.

I understand, I'll move the wms zoom levels closer to TMS, but be aware, that zoom levels in WMTS are completely different.

But, making different tests, I am amazed!!
8595 does the up-scaling without any max-zoom, just a plain wms:

Indeed, default max-zoom level of WMS layer is 20, that's why it haven't queried the server for higher zoom level. But that's just coincidence.

both with ctrl-J and + key
ctrl-J to 15 works, but not 14 (no downscaling)
(and getting back from attempted 14 to 15 with + key -> blank layer)

If you have set min-zoom, if you zoom out too far. I'll display warning, if such situation occurs.

Replying to A_Pirard:

I want to try, but what do I right-click ? ;-)
(JOSM uses the right button only to drag the map)

Not only to drag the map. If you click in the map view with right button and do not drag the map, the menu will show, and you have a few options there.

+BTW, is there a graphical Debian/Java program to see/extract what's in the new JOSM cache?

TIA!!!

No, there is no such program right now. You would neet to develop one by yourself. I only plan to do some view, on how much data, each cache zone uses.

comment:23 Changed 4 years ago by wiktorn

In 8598/josm:

TileSource:

  • added method - getTileId that returns unique identifier for the tile, that should not collide with other tile sources
  • added JavaDocs

JCSCacheManager:

  • moved from object count limit to object size limit
  • fixed bug with unnecessary re-creation of auxilary cache, that could result in cache corruption/loss of current cache data

CachedTileLoaderFactory, WMSCachedTileLoader, TMSCachedTileLoader

  • un-abstract CachedTileLoaderFactory, use reflection to create TileLoaders
  • adjust constructors

TMSCachedTileLoader, AbstractCachedTileSourceLayer:

  • move cache related settings to AbstractCachedTileSourceLayer
  • move cache instation to AbstractCachedTileSourceLayer
  • make "flush tile cache" command clear only one tile source

TMSCachedTileLoaderJob:

  • make "flush tile cache" command clear only one tile source
  • reorder methods

TemplatedWMSTileSource:

  • java docs
  • inline of private methods: getTileXMax, getTileYMax
  • fix sonar issues
  • make WMS layer zoom levels closer to TMS (addresses: #11459)

WMTSTileSource:

  • fix Sonar issues
  • use topLeftCorner in X/Y tile max calculations instead of world bounds (fixes issues with WMTS-es, for which topLeftCorner lies outside projection world bounds)

AbstractTileSourceLayer:

  • draw warning, when min-zoom-level is set, and tiles are not loaded due to too many tiles on screen

TMSLayer, WMSLayer, WMTSLayer:

  • expose access to cache object for ImageryPreferences

CacheContentsPanel:

  • add panel for managing cache regions and tile sources within the regions

CommonSettingsPanel, TMSSettingsPanel:

  • move settings common to all imagery layers from TMSSettingsPanel to CommonSettingsPanel

comment:24 Changed 4 years ago by A_Pirard

But, making different tests, I am amazed!!
8595 does the up-scaling without any max-zoom, just a plain wms:

Indeed, default max-zoom level of WMS layer is 20, that's why it haven't
queried the server for higher zoom level. But that's just coincidence.

20 ??? I wrote "8491 does display the layers 15 and 21".
Please be sure not to miss the highest level.
I said that 8595 does the upscaling without being told the max zoom.
How do you determine it?

+BTW, is there a graphical Debian/Java program to see/extract what's in the new JOSM cache?

No, ...

I'll miss the possibility to join a JOSM tile to some explanation (such as a ticket).
The exact file that JOSM received, not a reconstructed image.
Is it a known database format?

I have filed a suggestion to implement {epsg}.
Would you like to take care of it?

TIA!!!

comment:25 Changed 4 years ago by A_Pirard

Could you please restore tracing server requests?

I'm reluctant to do so. For all debugging I use right click and show tile
info. In the dialog you'll get also url of clicked tile, which you can
copy. I find this far more comfortable.

I've had a close look at that and ... you're doing great things !!!
But the problem is when there is no tile !!!
I've used the tracing feature many times until I made a correct request.
May I suggest a -- debug "type" ?
-- debug would do full debug as presently.
-- debug http would list only the server requests
-- debug cache ?
-- debug http,cache
others you choose?

Trying not to loose ways of being useful.

TIA !!!

comment:26 Changed 4 years ago by A_Pirard

@wiktorn: it's great job you're doing !!!
I tested 8598, OK and I'll be running it until "tested" upgrades.

Finally, --debug is OK as is, but PLEASE PLEASE make some way to toggle the text overlay off the map!

comment:27 in reply to:  26 Changed 4 years ago by wiktorn

Replying to A_Pirard:

I'm reluctant to do so. For all debugging I use right click and show tile
info. In the dialog you'll get also url of clicked tile, which you can
copy. I find this far more comfortable.

But the problem is when there is no tile !!!
I've used the tracing feature many times until I made a correct request.

But if you're trying with url's, usually you there will be load error - so the tile exists, and right-click solution still works.

May I suggest a -- debug "type" ?
-- debug would do full debug as presently.
-- debug http would list only the server requests
-- debug cache ?
-- debug http,cache
others you choose?

This would require quite a lot of rework of the logging system, and I don't find this that much useful

Trying not to loose ways of being useful.

TIA !!!

Replying to A_Pirard:

@wiktorn: it's great job you're doing !!!
I tested 8598, OK and I'll be running it until "tested" upgrades.

Finally, --debug is OK as is, but PLEASE PLEASE make some way to toggle the text overlay off the map!

--debug mode is for development and I find there useful data, when debugging, so I'd like to keep this. What can be done, is to promote HTTP requests to higher level. That would also filter out other debugging information.

But what I find as an ultimate solution, is just to implement better error reporting, when the tile fails to load. Right now it's pretty rough, and I hope, that this solution my also address your needs

comment:28 Changed 4 years ago by A_Pirard

I agreed that --debug is OK as long as it displays all HTTP requests to the source.

What is highly inconvenient is the text overlay during work (current zoom ...)
Could you please for example make an entry in the right-click menu to turn it on or off?

TIA!!!

comment:29 Changed 4 years ago by wiktorn

I still don't understand why do you need to work in debug mode. Please, create new ticket and explain your use case.

comment:30 Changed 4 years ago by Don-vip

Milestone: 15.0715.08

Milestone renamed

comment:31 Changed 4 years ago by A_Pirard

Hi,

A small appendage related to your wonderful work.

Using latest 8677 as well as 8704 and a new imagery preset "BE cadastre ..." I just made, I have surprises.
First, I noticed by chance that the server replies to requests &SRS=EPSG:3857 that's absent from capabilities.
As it can't be bad and as it skips an annoying message, I put 3857 in the preset's list.
Second, I found the image at low zoom ugly and wondered which side is doing that. See cadastre.png.
Having no tile files to look at any longer, I right clicked "show tile info" and copied the URL.
The amazement is that not only it looks quite different on FiFx but also that it seems to always be the same.

TIA.

http://ccff02.minfin.fgov.be/cadgisWMS/CadastralLayers/MapServer/WMSServer?&FORMAT=image/png8&transparent=true&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:3857&WIDTH=512&HEIGHT=512&BBOX=631064.1055224,6535671.6664957,633510.0904275,6538117.6514008&LAYERS=Bpn_ExLy,Bpn_EqTo,Bpn_CaBu,Bpn_WaSu,Bpn_CaPa,Bpn_EaZo,Bli_WaSu,Bli_PwZo,Bli_RaZo,Bli_ExLy,Bli_ToNa,Ali_CaBo,Ali_AdBo,Spt_BeAd,Bpt_PrSt,Bpt_RaSt,Apt_AdSt,Bpt_ExLy,Bpt_ToNa,Bpn_CaBl,Apn_CaSh,Apn_CaSe,Apn_CaDi,Spn_PoZo,Apn_AdMu,Apn_AdDi,Apn_AdPr,Apn_AdRe,Apn_AdCo

Changed 4 years ago by A_Pirard

Attachment: cadastre.png added

comment:32 in reply to:  31 Changed 4 years ago by wiktorn

Replying to A_Pirard:

As it can't be bad and as it skips an annoying message, I put 3857 in the preset's list.

Good, that's what they're for.

Second, I found the image at low zoom ugly and wondered which side is doing that. See cadastre.png.

Most of the difference is that in Firefox, transparent color is shown as light gray, and in JOSM - you have black. If you'd have light gray as background, my guess is that perceived quality of the text would be much better.

Maybe rasterfilters plugin could help you, but I haven't tested that yet.

Having no tile files to look at any longer, I right clicked "show tile info" and copied the URL.
The amazement is that not only it looks quite different on FiFx but also that it seems to always be the same.

I do not get the part "it seems to always be the same"

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.