Modify

Opened 6 years ago

Closed 6 years ago

#8849 closed enhancement (fixed)

[Patch] Preset Automated External Defibrillator (aed)

Reported by: brycenesbitt Owned by: team
Priority: minor Milestone:
Component: Internal preset Version: latest
Keywords: presets Cc:

Description

This is a preset for Preset Automated External Defibrillator (aed), and moving emergency phone to match.

Attachments (9)

aed.svg (1.6 KB) - added by brycenesbitt 6 years ago.
Resizable image for storing in SVN (Source File:Automated_External_Defibrillator_(symbol).svg on wikimedia commons)
aed_16x16.png (619 bytes) - added by brycenesbitt 6 years ago.
16x16 export of SVG
aed_32x32.png (1.1 KB) - added by brycenesbitt 6 years ago.
32x32 export of international standard symbol for an AED. As used by preset system.
preset_aed.diff (3.4 KB) - added by brycenesbitt 6 years ago.
Patch to default presets. Please consider retaining spacing to line up columns for human readability.
preset_aed.2.diff (3.2 KB) - added by brycenesbitt 6 years ago.
Version 2: drop lastcheck lines
preset_aed.3.diff (3.5 KB) - added by brycenesbitt 6 years ago.
Version 3: use svg directly. HOWEVER I GET A BLACK SQUARE NOT AN IMAGE.
Tooltip_16.png (6.0 KB) - added by brycenesbitt 6 years ago.
Black square, when aed.svg specified. Note that no other default preset uses svg, as far as I can tell.
preset_aed.4.diff (3.5 KB) - added by brycenesbitt 6 years ago.
Revision 4 of the patch.
aed.2.svg (1.6 KB) - added by brycenesbitt 6 years ago.
SVG to match patch revision 4.

Download all attachments as: .zip

Change History (31)

Changed 6 years ago by brycenesbitt

Attachment: aed.svg added

Resizable image for storing in SVN (Source File:Automated_External_Defibrillator_(symbol).svg on wikimedia commons)

Changed 6 years ago by brycenesbitt

Attachment: aed_16x16.png added

16x16 export of SVG

Changed 6 years ago by brycenesbitt

Attachment: aed_32x32.png added

32x32 export of international standard symbol for an AED. As used by preset system.

Changed 6 years ago by brycenesbitt

Attachment: preset_aed.diff added

Patch to default presets. Please consider retaining spacing to line up columns for human readability.

comment:1 Changed 6 years ago by skyper

I do not like the lastcheck*=* tags. There was some discussion about these kind of tags on tagging@ but no real conclusion. It will clutter the data base as I need subtags for all other tags to state weather I only check the position, the opening_hours or the function.

This issue first needs some more discussion and a wider audience.

comment:2 Changed 6 years ago by skyper

Forgot: There is no documentation in the wiki and this tag is not even mentioned on the aed wiki page.

comment:3 Changed 6 years ago by brycenesbitt

The tag lastcheck is however widely used with 2000 uses (more if you count variants), most notably with aed and postal boxes. If JOSM presets reflect tagging in the wild, lastcheck might belong, if they reflect the wiki then it definitely does not.

I'm OK if you drop lastcheck from the patch, pending the resolution of the operational_status discussion. I sense a merge between the two concepts makes sense. The concept of "last checked" is particularly acute for a defibrillator, since the whole point is to get help within minutes, prior to arrival of ambulance services. It appears people are doing just that in the wild, without engaging the wiki or tagging lists.

Last edited 6 years ago by brycenesbitt (previous) (diff)

Changed 6 years ago by brycenesbitt

Attachment: preset_aed.2.diff added

Version 2: drop lastcheck lines

comment:4 Changed 6 years ago by skyper

Sorry, too late:

You can also use .svg in preset (e.g. one icon should be enough and no .pngs needed).

Changed 6 years ago by brycenesbitt

Attachment: preset_aed.3.diff added

Version 3: use svg directly. HOWEVER I GET A BLACK SQUARE NOT AN IMAGE.

Changed 6 years ago by brycenesbitt

Attachment: Tooltip_16.png added

Black square, when aed.svg specified. Note that no other default preset uses svg, as far as I can tell.

comment:5 Changed 6 years ago by brycenesbitt

Is there more that is needed to move this ticket forward?
With the .png it works fine, and I suggest making the patch that way until svg support
is more widely used in presets.

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

Replying to brycenesbitt:

With the .png it works fine, and I suggest making the patch that way until svg support
is more widely used in presets.

Strange, I have no problems with .svg (#8596 and #8847). How should they be introduced but with new items ? We need to find the problem otherwise it is not worth to ship the huge libs but you are right that this problem should not make a difference considering this ticket.

comment:7 Changed 6 years ago by brycenesbitt

How about:
1) Accept this patch with the bitmap.
2) Convert some other well established preset to SVG and release for testing.
That way we change one variable at a time, to minimize confusion.

Of course keep the svg in svn, as clearly svg is a valuable technology as display resolutions get higher, and hand-created bitmaps have less of a relative advantage.

Last edited 6 years ago by brycenesbitt (previous) (diff)

comment:8 in reply to:  6 Changed 6 years ago by AlfonZ

Replying to skyper:

Replying to brycenesbitt:

With the .png it works fine, and I suggest making the patch that way until svg support
is more widely used in presets.

Strange, I have no problems with .svg (#8596 and #8847). How should they be introduced but with new items ? We need to find the problem otherwise it is not worth to ship the huge libs but you are right that this problem should not make a difference considering this ticket.

It looks that styles in svg are not fully supported.
I tried following:

  • aed.svg

     
    1212  </style>
    1313 </defs>
    1414 <g id="Ebene 1">
    15   <rect class="fil0" x="0" y="0" width="600" height="600"/>
    16   <path class="fil1" d="M0 0l300 0 300 0 0 300 0 300 -300 0 -300 0 0 -600zm259 553c21,-11 49,-30 77,-55 30,-25 53,-49 74,-75 27,-32 46,-65 51,-90 2,-13 2,-36 0,-50 -5,-27 -16,-52 -33,-72 -20,-25 -48,-40 -75,-41 -19,-1 -37,3 -55,12 -15,7 -26,14 -38,26 -4,5 -8,8 -8,8 0,0 -4,-3 -8,-7 -19,-19 -41,-32 -65,-37 -32,-7 -60,0 -86,20 -27,23 -47,60 -52,98 -2,16 -1,35 3,48 9,35 38,79 85,125 38,38 83,73 115,90 4,1 7,3 8,3 0,0 3,-1 7,-3zm253 -393l0 -28 29 -1 30 0 0 -24 0 -24 -29 0c-22,0 -29,-1 -30,-1 0,-1 0,-8 0,-29l0 -29 -27 0 -26 0 0 28c0,25 0,29 -1,30 0,1 -4,1 -30,1l-29 0 0 24 0 24 30 0c26,0 29,0 30,1 0,1 0,8 0,29l0 27 26 0 26 0 1 -28z"/>
    17   <path class="fil1" d="M201 479c-1,-1 10,-26 24,-57 13,-31 24,-57 24,-58l1 -1 -35 0c-31,-1 -34,-1 -34,-2 0,0 21,-26 56,-68 31,-37 57,-68 58,-69 2,-2 3,-2 3,-1 0,1 -10,25 -22,54 -12,30 -22,54 -22,54 0,1 6,1 33,1 23,0 32,1 32,1 0,1 -116,145 -117,146 -1,0 -1,0 -1,0z"/>
     15  <rect fill="#FFFFFF" x="0" y="0" width="600" height="600"/>
     16  <path fill="#009A3B" d="M0 0l300 0 300 0 0 300 0 300 -300 0 -300 0 0 -600zm259 553c21,-11 49,-30 77,-55 30,-25 53,-49 74,-75 27,-32 46,-65 51,-90 2,-13 2,-36 0,-50 -5,-27 -16,-52 -33,-72 -20,-25 -48,-40 -75,-41 -19,-1 -37,3 -55,12 -15,7 -26,14 -38,26 -4,5 -8,8 -8,8 0,0 -4,-3 -8,-7 -19,-19 -41,-32 -65,-37 -32,-7 -60,0 -86,20 -27,23 -47,60 -52,98 -2,16 -1,35 3,48 9,35 38,79 85,125 38,38 83,73 115,90 4,1 7,3 8,3 0,0 3,-1 7,-3zm253 -393l0 -28 29 -1 30 0 0 -24 0 -24 -29 0c-22,0 -29,-1 -30,-1 0,-1 0,-8 0,-29l0 -29 -27 0 -26 0 0 28c0,25 0,29 -1,30 0,1 -4,1 -30,1l-29 0 0 24 0 24 30 0c26,0 29,0 30,1 0,1 0,8 0,29l0 27 26 0 26 0 1 -28z"/>
     17  <path fill="#009A3B" d="M201 479c-1,-1 10,-26 24,-57 13,-31 24,-57 24,-58l1 -1 -35 0c-31,-1 -34,-1 -34,-2 0,0 21,-26 56,-68 31,-37 57,-68 58,-69 2,-2 3,-2 3,-1 0,1 -10,25 -22,54 -12,30 -22,54 -22,54 0,1 6,1 33,1 23,0 32,1 32,1 0,1 -116,145 -117,146 -1,0 -1,0 -1,0z"/>
    1818 </g>
    1919</svg>

and it showed in the menu correctly.

comment:9 Changed 6 years ago by brycenesbitt

Can we break this in to two bug reports: preset request & svg support?

comment:10 in reply to:  9 Changed 6 years ago by skyper

Replying to brycenesbitt:

Can we break this in to two bug reports: preset request & svg support?

See #8889 for the svg support.

comment:11 in reply to:  7 Changed 6 years ago by skyper

Replying to brycenesbitt:

How about:
1) Accept this patch with the bitmap.

We can also use the patched version of aed.svg.

comment:12 Changed 6 years ago by brycenesbitt

Either way. I reported in the svg bug report that the patched version works fine, though is not great at 16x16 scale.

comment:13 Changed 6 years ago by brycenesbitt

This is a request to apply this patch: it seems ready to go with either the patched SVG or the PNG.

comment:14 Changed 6 years ago by Don-vip

Sorry for being so slow in taking into account your patch, we just lack of time, not of interest :)
I have some trouble to apply the patch on top of HEAD revision, can you provide a new version ? (with patched SVG as well)
Thanks :)

Changed 6 years ago by brycenesbitt

Attachment: preset_aed.4.diff added

Revision 4 of the patch.

Changed 6 years ago by brycenesbitt

Attachment: aed.2.svg added

SVG to match patch revision 4.

comment:15 Changed 6 years ago by Don-vip

In 6161/josm:

see #8849 - add emergency=phone and emergency=aed to internal preset.
TODO: update map paint style to use scaled down version of .svg

comment:16 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 6172/josm:

fix #8849:

  • Used scaled down (16x16 pixels) of large (.svg) images if no size is explicitely defined
  • rendering of emergency=aed with recently added svg
  • optimizations/refactoring in icons rotating/rescaling code
  • fix of various warnings, javadoc

comment:17 Changed 6 years ago by brycenesbitt

Thanks Don-vip!

Hopefully this will also lead to more SGV presets in the future!

comment:18 Changed 6 years ago by Don-vip

In 6174/josm:

see #8849 - use scaled down version of images in recently added tags panel

comment:19 Changed 6 years ago by bastiK

Resolution: fixed
Status: closedreopened

Don-vip, I think we should fine tune this down scaling of images a little. E.g. the image icons/place.png from the PL2 style is now shrunken to 16x16, but should be displayed at the original size of the image (23x21). In fact if you designed a style with images slightly larger than 16x16, it would be bothersome to add all the dimensions explicitly to the style. What about a switch in the *.mapcss style?

comment:20 Changed 6 years ago by Don-vip

Sorry, I thought all icons were 16x16 pixels. What kind of switch do you have in mind ? Maybe we can just increase the max size to 24 pixels for example ?

comment:21 in reply to:  20 Changed 6 years ago by bastiK

Replying to Don-vip:

Sorry, I thought all icons were 16x16 pixels. What kind of switch do you have in mind ?

Something like

  icon-image-maxsize: none;

where default value would be 24 or so.

Maybe we can just increase the max size to 24 pixels for example ?

I guess that would do.

comment:22 Changed 6 years ago by Don-vip

Resolution: fixed
Status: reopenedclosed

In 6182/josm:

fix #8849 - allow map icons up to 24x24 pixels without rescaling

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.