Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#19405 closed defect (fixed)

JOSM can't find one particular SVG preset icon?

Reported by: Stereo Owned by: team
Priority: normal Milestone:
Component: External preset Version:
Keywords: template_report svg icon Cc: Kmpopppe

Description

What steps will reproduce the problem?

  1. Install https://josm.openstreetmap.de/wiki/Presets/Heritage
  2. Go to Presets > Historic Places

What is the expected result?

See https://josm.openstreetmap.de/attachment/wiki/Presets/Heritage/Icon_SSMN.svg for "Service des Sites et Monuments Nationaux Luxembourg"

What happens instead?

No icon is shown.

  • E: Failed to locate image 'Icon_SSMN.svg'
  • W: Service des Sites et Monuments Nationaux Luxembourg: Could not get presets icon Icon_SSMN.svg

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

This might very much be my fault, but I can't figure out what I'm doing wrong. I've created a preset, attached an icon in SVG, and it doesn't work. I've also added an icon as flag_uk.svg, and that one does work.

I've checked downloading the .zip, and it does include the icon.

Revision:16589
Is-Local-Build:true
Build-Date:2020-06-10 00:09:25

Identification: JOSM/1.5 (16589 SVN en_GB) Mac OS X 10.15.5
OS Build number: Mac OS X 10.15.5 (19F101)
Memory Usage: 512 MB / 8192 MB (309 MB allocated, but free)
Java version: 14.0.1+7, Oracle Corporation, OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 69733632 1680x1050 (scaling 2.0x2.0)
Maximum Screen Size: 1680x1050
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
VM arguments: [-Djava.library.path=/Applications/JOSM.app/Contents/app:/Applications/JOSM.app/Contents/MacOS, -Djava.launcher.path=/Applications/JOSM.app/Contents/MacOS]
Dataset consistency test: No problems found

Plugins:
+ AddrInterpolation (35405)
+ CommandLine (35405)
+ Create_grid_of_ways (35405)
+ ImportImagePlugin (35248)
+ ImproveWay (29)
+ Mapillary (1.5.23)
+ MovementAlert (1511141840)
+ OpeningHoursEditor (35414)
+ PicLayer (35405)
+ RelationDissolve (0.2.0)
+ alignways (35474)
+ apache-commons (35362)
+ apache-http (35092)
+ areaselector (359)
+ austriaaddresshelper (57)
+ auto_tools (73)
+ buildings_tools (35474)
+ changeset-viewer (22)
+ conflation (0.6.5)
+ continuosDownload (91)
+ contourmerge (v0.1.6)
+ ejml (35313)
+ geotools (35169)
+ gridify (1588746833)
+ http2 (35427)
+ imagery-xml-bounds (35313)
+ javafx-osx (35458)
+ jaxb (35092)
+ jna (35092)
+ jogl (1.2.3)
+ jts (35122)
+ log4j (35092)
+ opendata (35405)
+ openqa (0.1.9)
+ poly (35248)
+ public_transport (35405)
+ reltoolbox (35405)
+ reverter (35487)
+ shrinkwrap (v1.0.2)
+ splinex (35454)
+ terracer (35327)
+ todo (30306)
+ undelete (35474)
+ utilsplugin2 (35487)
+ wikipedia (1.1.4)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/BicycleJunction&preset&zip=1
+ http://osmtools.de/josm/steps.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Historic_Stone&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Towers&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportOneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Bus_lanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Historical_Objects&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/public_bookcase&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Stolpersteine&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/BuildingPreset&zip=1
+ https://gitlab.com/k127/josm-presets/raw/master/diplomatic.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Playground_Equipment&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportGtfs&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Heritage&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/LessObtrusiveNodes&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Noname&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Power&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PowerMapping&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/BesideTheRoad_Speed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/TreeCrownDiameter&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&style&zip=1
- https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Suburb&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&style&zip=1
- https://github.com/GlassOceanos/indoor-JOSM-style/archive/master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SimpleRoofTags&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SimpleBuildingTags&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/NumberedCycleNodeNetworks&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/NumberedWalkingNodeNetworks&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Noname&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Potlach2_access&zip=1

Validator rules:
+ http://www.openrailwaymap.org/validator/openrailwaymap.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
+ http://www.openrailwaymap.org/validator/de-openrailwaymap.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/MissingWeekdays&zip=1
+ https://raw.githubusercontent.com/nlehuby/transport_mapcss/master/transport.validator.mapcss

Last errors/warnings:
- E: java.lang.UnsatisfiedLinkError: <josm.userdata>/plugins/javafx/libfxplugins.dylib: dlopen(<josm.userdata>/plugins/javafx/libfxplugins.dylib, 1): Library not loaded: @rpath/libgstreamer-lite.dylib
- W: Not a single layer for the name 'Bing Sat': []
- E: Failed to locate image 'Icon_SSMN.svg'
- W:  Service des Sites et Monuments Nationaux Luxembourg: Could not get presets icon Icon_SSMN.svg
- E: <josm.userdata>/plugins/opendata/resources/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/agriculture/RegistreParcellaire.mapcss (No such file or directory)
- W: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out
- W: org.openstreetmap.josm.tools.bugreport.BugReportSender$BugReportSenderException: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out
- W: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out
- W: Already here java.net.ConnectException: HTTP connect timed out
- W: org.openstreetmap.josm.tools.bugreport.BugReportSender$BugReportSenderException: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out

Attachments (1)

Icon_SSMN.svg (5.2 KB ) - added by Klumbumbus 5 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 by Klumbumbus, 5 years ago

There is some strange code in the svg which JOSM or Java can't handle which results in negative dimensions.

2020-06-17 21:37:42.435 SEVERE: createImageFromSvg: file:/C:/Users/stefa/Documents/OSM/TestNew/Icon_SSMN2.svg java.awt.Dimension[width=-1,height=-1] realWidth=0.0 realHeight=0.0

Attached is the icon copied to a new inkskape file and cleaned with svg cleaner. The size increaed from 4.04 to 5.19 kB, but works in JOSM.

by Klumbumbus, 5 years ago

Attachment: Icon_SSMN.svg added

comment:2 by Klumbumbus, 5 years ago

You can replace your icon at the wiki page with this variant.

comment:3 by skyper, 5 years ago

Cc: Kmpopppe added
Keywords: svg icon added

The main icon for the external healthcare preset suffers the same problem. Should document this under wiki:Styles#Icons.

comment:4 by Kmpopppe, 5 years ago

@skyper I don't really see a non working icon (apart from hospics which has a named icon that doesn't exist) with the 30/31 version of the Healthare Preset loaded into my JOSM. What icon where you referring to?

comment:5 by skyper, 5 years ago

@Kmpopppe: Oh, this time it is only Trac and the icon at the preset's wiki page. There should be the icon in the title. Simply, copying the icon to the JOSM wiki did not help, yesterday.

comment:6 by stoecker, 5 years ago

",middle,inline" is missing. When copying the icon to the page, then also remove the link in the preset. External links mean additional useless network load.

in reply to:  6 ; comment:7 by skyper, 5 years ago

Replying to stoecker:

",middle,inline" is missing. When copying the icon to the page, then also remove the link in the preset. External links mean additional useless network load.

Thanks for the tip. You mean, atm, it is better to copy all icons from OSM to JOSM instead of directly using OSM as source?

comment:8 by stoecker, 5 years ago

For presets/styles/... it's always better not to use remote links. Each of them needs a single download and each of them is refreshed and can fail. A single presets with icons included is only a single download.

comment:9 by Stereo, 5 years ago

Thank you @Klumbumbus!

comment:10 by Stereo, 5 years ago

Actually, is there an easy or easier way of testing SVG files in JOSM? Loading a local preset?

in reply to:  7 ; comment:11 by skyper, 5 years ago

Replying to skyper:

Replying to stoecker:

",middle,inline" is missing. When copying the icon to the page, then also remove the link in the preset. External links mean additional useless network load.

Thanks for the tip.

Still not working. Not a problem with title syntax as it does not display in preview in normal text either.

in reply to:  10 comment:12 by skyper, 5 years ago

Replying to Stereo:

Actually, is there an easy or easier way of testing SVG files in JOSM? Loading a local preset?

For display problems within JOSM loading local presets or styles should work.

For problems with trac and the wiki or the internal help browser it is a different story.

in reply to:  11 comment:13 by stoecker, 5 years ago

Replying to skyper:

Replying to skyper:

Replying to stoecker:

",middle,inline" is missing. When copying the icon to the page, then also remove the link in the preset. External links mean additional useless network load.

Thanks for the tip.

Still not working. Not a problem with title syntax as it does not display in preview in normal text either.

I'm not aware that Trac allows to inline remote images...

comment:14 by Klumbumbus, 5 years ago

works in trac:
https://upload.wikimedia.org/wikipedia/commons/a/ae/Star_of_life.svg

dosn't work in trac:
https://wiki.openstreetmap.org/w/images/8/89/RodOfAsclepius.svg

both are the links of the original file at https://wiki.openstreetmap.org/wiki/File:Star_of_life.svg and https://wiki.openstreetmap.org/wiki/File:RodOfAsclepius.svg

(both work in JOSM)

comment:15 by Klumbumbus, 5 years ago

Ah, images from commons work, from osm wiki not. This one doesn't work either:
https://wiki.openstreetmap.org/w/images/6/66/Incline_icon.svg

in reply to:  4 ; comment:16 by Klumbumbus, 5 years ago

Replying to Kmpopppe:

I don't really see a non working icon (apart from hospics which has a named icon that doesn't exist) with the 30/31 version of the Healthare Preset loaded into my JOSM.

The hospice icon in that preset should work fine.

in reply to:  10 comment:17 by Klumbumbus, 5 years ago

Replying to Stereo:

Actually, is there an easy or easier way of testing SVG files in JOSM? Loading a local preset?

You can use wiki:/Styles/IconTester

in reply to:  16 ; comment:18 by Kmpopppe, 5 years ago

Replying to Klumbumbus:

The hospice icon in that preset should work fine.

JAVA seems to think otherwise:

2020-06-19 07:28:30.416 SCHWERWIEGEND: Fehler beim Laden des Bildes 'hospice.png'

The icon is just stated as "hospice.png" and I don't find a file named as such in the josm-latest.jar - am I missing something?

(Sorry for being slightly off-topic here)

in reply to:  15 comment:19 by stoecker, 5 years ago

Replying to Klumbumbus:

Ah, images from commons work, from osm wiki not. This one doesn't work either:
https://wiki.openstreetmap.org/w/images/6/66/Incline_icon.svg

Different CORS settings.

We already had this topic once already. One of the updates of Trac introduced CORS settings for included images.

in reply to:  18 comment:20 by Klumbumbus, 5 years ago

Replying to Kmpopppe:

The icon is just stated as "hospice.png" and I don't find a file named as such in the josm-latest.jar - am I missing something?

The icon is attached to to wiki page and thus included in the zip file of the preset. If you add the xml local only the icon is missing. If you add the preset from the list from within JOSM the icon is included.

comment:21 by Klumbumbus, 5 years ago

Component: CoreExternal preset
Resolution: fixed
Status: newclosed

comment:23 by skyper, 5 years ago

wiki for external styles/presets adjusted, see wiki:/Styles?action=diff&version=160. Still missing some note about including icons in .zip if possible.

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. 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.