Modify

Opened 9 months ago

Last modified 9 months ago

#23740 new enhancement

Data in remote pmtiles URLs should be selectable, addable to todolist

Reported by: amanda@… Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description

I am able to open a remote .pmtiles URL in JOSM with “Open Location” (e.g. https://data.waterwaymap.org/planet-loops.pmtiles), and this show the data from that URL. I would like to be able to select the objects in that layer (to view their properties), and add them to the todo list plugin, or search & filter them.

WaterwayMap.org has 2 of these QA views ([loops](https://waterwaymap.org/loops) & [ends](https://waterwaymap.org/ends)). People want to view the data directly in JOSM ([eg](https://github.com/amandasaurus/waterwaymap.org/issues/51)), but JOSM can't properly access to the .pmtiles data.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-06-03 18:08:14 +0200 (Mon, 03 Jun 2024)
Revision:19096
Build-Date:2024-06-07 01:31:15
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19096 en) Linux Debian GNU/Linux 12 (bookworm)
Memory Usage: 1496 MB / 15864 MB (405 MB allocated, but free)
Java version: 21.0.3+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1200 (scaling 1.00×1.00) :0.1 1200×1920 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1920
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_IE.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_IE
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: GNOME
libcommons-compress-java: libcommons-compress-java:all-1.22-1
libcommons-logging-java: libcommons-logging-java:all-1.2-3
fonts-noto: fonts-noto:-
VM arguments: [-Dicedtea-web.bin.location=/opt/OpenWebStart/javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, -Djava.security.manager=allow]

Plugins:
+ FastDraw (36226)
+ Mapillary (3904)
+ Review.Changes (1.1.1)
+ SimplifyArea (36209)
+ apache-commons (36176)
+ apache-http (36176)
+ auto_tools (81)
+ buildings_tools (36226)
+ continuosDownload (103)
+ contourmerge (v0.2.1)
+ ejml (36176)
+ geotools (36176)
+ imagery_offset_db (36226)
+ jackson (36176)
+ javafx (36200)
+ jaxb (36118)
+ jna (36176)
+ jts (36004)
+ log4j (36241)
+ mbtiles (v2.6.1)
+ measurement (36256)
+ opendata (36256)
+ pTerry (v0.2.1)
+ pmtiles (36219)
+ reverter (36256)
+ todo (137)
+ undelete (36226)
+ utilsplugin2 (36241)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Waterways&zip=1

Attachments (0)

Change History (1)

comment:1 by taylor.smock, 9 months ago

There are at least 4 distinct feature requests in this ticket:

  1. Allow selection of data from vector tile layers

I remember looking at this awhile back, and it was a large lift. Like touching 50+ files large. It is possible to do this on a one-off basis (like I did for the Mapillary plugin), but that wouldn't be ideal long-term.

  1. Allow filtering of data from vector tile layers

FilterModel would need to be modified to work on any AbstractOsmDataLayer; this may require changes to OsmData (specifically w.r.t. locks).

  1. Show the selected data in the Tag/Membership dialog

To give an idea of the problem, we have two different Java class hierarchies. See https://gist.github.com/tsmock/7f8dfc76047f915ba12ad22a5eea9a9c for diagrams.

We could probably make it work by making two new interfaces:

  • IModifiableLayer: This would implement "default" methods for AbstractModifiableLayer.
  • IOsmDataLayer: Like IModifiableLayer, this would implement "default" methods for AbstractOsmDataLayer.

Then, in MainLayerManager, change dataLayer to be IOsmDataLayer. At this point, I would have to implement IOsmDataLayer on MVTLayer (which would cause pmtiles to inherit the necessary interface).

  1. Make todo support MVT layers. This is mostly done -- it supports AbstractOsmDataLayer with IPrimitive, so it would just need to be changed to use the interface from (3) (and MVTLayer would need to implement that interface...)

Realistically, we would probably want to implement (3) first and then either (1) or (2).


As a workaround, you can convert the PMTiles MVT layer into OSM data (Expert mode -> right-click on the layer -> Convert to OSM Data). I know I'm not going to have a chance to implement the features until mid-July, and it will probably be a bit later in the year if I do get around to this. If you really want this, you can provide patches.

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 amanda@….
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.