Modify

Opened 19 hours ago

Last modified 18 hours ago

#24739 new defect

[Patch] Zoom to layer doesn't work well with GPX track containing waypoints far away

Reported by: GerdP Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Load a gpx track containing waypoints far away from the track (in my case they mark my personel todo list)
  2. Note that this creates two layers, one for the track, one for the waypoints
  3. right click on the gpx track layer and select "Zoom to layer"

What is the expected result?

JOSM zooms to the area covered by the gox track

What happens instead?

JOSM zooms to the larger area covered by both waypoints and track.

Please provide any additional information below. Attach a screenshot if possible.

I think I get the same result as when I select the waypoints layer and "Zoom to layer".

Revision:19575
Is-Local-Build:true
Build-Date:2026-05-22 07:51:42

Identification: JOSM/1.5 (19575 SVN en) Windows 11 64-Bit
OS Build number: Windows 10 Pro 25H2 (26200)
Memory Usage: 2240 MB / 6144 MB (837 MB allocated, but free)
Java version: 21.0.2+13-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19039, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM HWConsole.exe]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (36474)
+ apache-commons (36474)
+ buildings_tools (36474)
+ comfort0 (36474)
+ ejml (36474)
+ geotools (36474)
+ jackson (36474)
+ jaxb (36474)
+ jts (36474)
+ o5m (36474)
+ opendata (36474)
+ pbf (36474)
+ photo_geotagging (36474)
+ poly (36474)
+ reverter (36474)
+ terracer (36484)
+ undelete (36474)
+ utilsplugin2 (36497)

Tagging presets:
+ c:\josm\core\resources\data\defaultpresets.xml

Map paint styles:
- c:\josm\core\resources\styles\standard\elemstyles.mapcss

Validator rules:
+ d:\java_tools\JOSM\mygeometry.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
+ c:\josm\core\resources\data\validator\combinations.mapcss
+ c:\josm\core\resources\data\validator\geometry.mapcss

Last errors/warnings:
- 00875.977 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00875.977 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00876.011 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00876.011 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00880.785 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00880.785 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00880.956 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00880.957 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00881.084 W: Not downloading all tiles because there are more than 40 tiles on an axis!
- 00881.084 W: Not downloading all tiles because there are more than 40 tiles on an axis!

Attachments (1)

24739.patch (2.4 KB ) - added by GerdP 18 hours ago.
Simple approach to fix the problem, works also for gpx files containing routes

Download all attachments as: .zip

Change History (2)

by GerdP, 18 hours ago

Attachment: 24739.patch added

Simple approach to fix the problem, works also for gpx files containing routes

comment:1 by GerdP, 18 hours ago

Summary: Zoom to layer doesn't work well with GPX track containing waypoints far away[Patch] Zoom to layer doesn't work well with GPX track containing waypoints far away

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to GerdP.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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