Modify

Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#15802 closed enhancement (fixed)

[PATCH] Circular Building Tool

Reported by: abalosc1 Owned by: Upliner
Priority: major Milestone:
Component: Plugin buildings_tools Version:
Keywords: circle Cc: stoecker, ris

Description

Allows circular buildings to be drawn with the Building Tool Plugin.

  1. Create a new data layer and select the "Draw Building" button (or push 'B')
  2. Go to Data > Set Buildings Size and change shape to Circle. Can also use shortcuts to switch between drawing circular buildings (SHIFT+C) and rectangular buildings (SHIFT+R)
  3. Draw a line for the diameter of the circle you wish to create and ensure a circle gets created with "building:yes" tag.
  4. In the Building Size Dialog:
    1. Width/diameter sets fixed diameter of circle
    2. Length steps sets how much the diameter increments by
    3. Address dialog appropriately tags buildings
    4. Click "Advanced..." and add "building:silo" tag. Make sure circle buildings created after have tag.

Attachments (11)

circular_building_tool.patch (69.1 KB) - added by abalosc1 17 months ago.
Patch File for Circular Building Tool
building silo tag.gif (5.4 MB) - added by abalosc1 17 months ago.
Drawing circular buildings with the building tool plugin
circular_building_tool_2.patch (71.1 KB) - added by abalosc1 17 months ago.
Patch File for Circular Building Tool with updated shortcuts
circular_building_tool_3.patch (73.1 KB) - added by abalosc1 17 months ago.
alternative shortcuts
circular_building_tool_4.patch (22.8 KB) - added by abalosc1 17 months ago.
squash commits for patch
building_menu_icon.patch (4.8 KB) - added by abalosc1 17 months ago.
change icons for setting shape in Data menu
silo.png (594 bytes) - added by abalosc1 17 months ago.
building_tools/build/images/cursor/modifier/silo.png
rectangular.png (930 bytes) - added by abalosc1 17 months ago.
building_tools/build/images/mapmode/rectangular.png
silo.2.png (527 bytes) - added by abalosc1 17 months ago.
building_tools/build/images/mapmode/silo.png
building_png.patch (999 bytes) - added by abalosc1 17 months ago.
Hopefully this will fix binary files missing from svn patches. If not, please advise. I have also attached the png files to this ticket.
translation_string.patch (2.2 KB) - added by abalosc1 17 months ago.
reduce translation strings

Change History (38)

Changed 17 months ago by abalosc1

Patch File for Circular Building Tool

Changed 17 months ago by abalosc1

Attachment: building silo tag.gif added

Drawing circular buildings with the building tool plugin

comment:1 Changed 17 months ago by Don-vip

Keywords: circle added
Priority: normalmajor

Nice feature!
One remark: the proposed shortcuts are conflicting with well-established ones, see DevelopersGuide/ShortcutsList. Can you please look if you find free ones? (This is becoming more and more difficult, so I'm not sure...)

comment:2 Changed 17 months ago by Don-vip

Summary: Circular Building Tool[PATCH] Circular Building Tool

comment:3 Changed 17 months ago by Klumbumbus

Offtopic: The silos you drew in the gif have a smaller diameter in reality. The backround imagery is not captured exactly straight from top. Better draw the circle at the top edge of the silo and then move the circle to the bottom where the silo touches the ground.

Changed 17 months ago by abalosc1

Patch File for Circular Building Tool with updated shortcuts

comment:4 in reply to:  1 ; Changed 17 months ago by anonymous

Thanks, I just submitted an updated using CTRL+SHIFT+R and CTRL+SHIFT+C.

Replying to Don-vip:

Nice feature!
One remark: the proposed shortcuts are conflicting with well-established ones, see DevelopersGuide/ShortcutsList. Can you please look if you find free ones? (This is becoming more and more difficult, so I'm not sure...)

comment:5 in reply to:  4 ; Changed 17 months ago by Don-vip

Cc: stoecker added

Replying to samantha.abalos:

Thanks, I just submitted an updated using CTRL+SHIFT+R and CTRL+SHIFT+C.

Thanks, but unfortunately this is not so simple. CTRL+SHIFT+C is taken by JOSM core itself (CopyCoordinatesAction).

@Dirk: what do you suggest? Is there an easy way to find the "best suitable" shortcut?

comment:6 in reply to:  5 ; Changed 17 months ago by anonymous

Replying to Don-vip:

Replying to samantha.abalos:

Thanks, I just submitted an updated using CTRL+SHIFT+R and CTRL+SHIFT+C.

Thanks, but unfortunately this is not so simple. CTRL+SHIFT+C is taken by JOSM core itself (CopyCoordinatesAction).

@Dirk: what do you suggest? Is there an easy way to find the "best suitable" shortcut?

I see, CMD+SHIFT and CTRL+SHIFT are interchangeable.
How about CTRL+SHIFT+O for Circle and CTRL+SHIFT+Q for Rectangle?

comment:7 in reply to:  6 ; Changed 17 months ago by anonymous

Replying to anonymous:

Replying to Don-vip:

Replying to samantha.abalos:

Thanks, I just submitted an updated using CTRL+SHIFT+R and CTRL+SHIFT+C.

Thanks, but unfortunately this is not so simple. CTRL+SHIFT+C is taken by JOSM core itself (CopyCoordinatesAction).

@Dirk: what do you suggest? Is there an easy way to find the "best suitable" shortcut?

I see, CMD+SHIFT and CTRL+SHIFT are interchangeable.
How about CTRL+SHIFT+O for Circle and CTRL+SHIFT+Q for Rectangle?

Nevermind... CMD+SHIFT+O is taken too...

comment:8 in reply to:  7 Changed 17 months ago by anonymous

Top Shortcut Options:
ALT+R: Rectangle
ALT+Z: Circle

Others available on the right side:
ALT+K
ALT+L
ALT+Y

Changed 17 months ago by abalosc1

alternative shortcuts

comment:9 in reply to:  5 Changed 17 months ago by stoecker

@Dirk: what do you suggest? Is there an easy way to find the "best suitable" shortcut?

Beside looking at the list and choosing one which does either not conflict or at least not with core: I have no idea.

comment:10 Changed 17 months ago by stoecker

@anonym:

If plan to do more than occasional comments here, please use an account instead of anonym, because usually each anonymous submission must be checked for SPAM by hand... :-)

comment:11 Changed 17 months ago by Don-vip

Cc: ris added

The patch is not correct.
@ris: how do you generate a SVN patch using git?

comment:12 Changed 17 months ago by ris

git format-patch <base-revision>

comment:13 Changed 17 months ago by Don-vip

This makes one patch per commit. How can we produce a single file?

comment:14 Changed 17 months ago by ris

Hmm. Personally I'd just do a git rebase -i where I squashed all the desired commits into one, then format-patch that.

Changed 17 months ago by abalosc1

squash commits for patch

comment:15 Changed 17 months ago by Don-vip

Resolution: fixed
Status: newclosed

Fixed in [o34026:34027]. Thanks a lot!

comment:16 Changed 17 months ago by rickmastfan67

This introduced a few 'registered toolbar' errors that pop up in the command line window when JOSM is starting up.

2018-01-23 23:22:13.264 INFO: Registered toolbar action mapmode/building overwritten: buildings_tools.BuildingSizeAction gets buildings_tools.BuildingCircleAction
2018-01-23 23:22:13.264 INFO: Registered toolbar action mapmode/building overwritten: buildings_tools.BuildingCircleAction gets buildings_tools.BuildingRectangleAction
2018-01-23 23:22:13.326 INFO: Toolbar action mapmode/building overwritten: buildings_tools.BuildingSizeAction gets buildings_tools.BuildingCircleAction
2018-01-23 23:22:13.326 INFO: Toolbar action mapmode/building overwritten: buildings_tools.BuildingCircleAction gets buildings_tools.BuildingRectangleAction

Just thought you'd like to know this.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-01-22 00:01:43 +0100 (Mon, 22 Jan 2018)
Build-Date:2018-01-22 03:24:26
Revision:13353
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13353 en) Windows 7 64-Bit
OS Build number: Windows 7 Professional (7601)
Memory Usage: 649 MB / 1820 MB (396 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080

Plugins:
+ OpeningHoursEditor (33876)
+ buildings_tools (34026)
+ measurement (33760)
+ reverter (34028)
+ tageditor (33806)
+ turnlanes-tagging (260)
+ turnrestrictions (33780)
+ undelete (33980)
+ utilsplugin2 (33991)

Changed 17 months ago by abalosc1

Attachment: building_menu_icon.patch added

change icons for setting shape in Data menu

comment:17 in reply to:  16 Changed 17 months ago by abalosc1

Thanks for letting me know, I have submitted a patch to make those icons different.
Replying to rickmastfan67:

This introduced a few 'registered toolbar' errors that pop up in the command line window when JOSM is starting up.

2018-01-23 23:22:13.264 INFO: Registered toolbar action mapmode/building overwritten: buildings_tools.BuildingSizeAction gets buildings_tools.BuildingCircleAction
2018-01-23 23:22:13.264 INFO: Registered toolbar action mapmode/building overwritten: buildings_tools.BuildingCircleAction gets buildings_tools.BuildingRectangleAction
2018-01-23 23:22:13.326 INFO: Toolbar action mapmode/building overwritten: buildings_tools.BuildingSizeAction gets buildings_tools.BuildingCircleAction
2018-01-23 23:22:13.326 INFO: Toolbar action mapmode/building overwritten: buildings_tools.BuildingCircleAction gets buildings_tools.BuildingRectangleAction

Just thought you'd like to know this.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-01-22 00:01:43 +0100 (Mon, 22 Jan 2018)
Build-Date:2018-01-22 03:24:26
Revision:13353
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13353 en) Windows 7 64-Bit
OS Build number: Windows 7 Professional (7601)
Memory Usage: 649 MB / 1820 MB (396 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080

Plugins:
+ OpeningHoursEditor (33876)
+ buildings_tools (34026)
+ measurement (33760)
+ reverter (34028)
+ tageditor (33806)
+ turnlanes-tagging (260)
+ turnrestrictions (33780)
+ undelete (33980)
+ utilsplugin2 (33991)

comment:18 Changed 17 months ago by stoecker

Resolution: fixed
Status: closedreopened

comment:19 Changed 17 months ago by abalosc1

The silo.png file I added for the cursor for when the shape is a circle doesn't seem to be appearing. Is it getting included into the build?

Changed 17 months ago by abalosc1

Attachment: silo.png added

building_tools/build/images/cursor/modifier/silo.png

Changed 17 months ago by abalosc1

Attachment: rectangular.png added

building_tools/build/images/mapmode/rectangular.png

Changed 17 months ago by abalosc1

Attachment: silo.2.png added

building_tools/build/images/mapmode/silo.png

Changed 17 months ago by abalosc1

Attachment: building_png.patch added

Hopefully this will fix binary files missing from svn patches. If not, please advise. I have also attached the png files to this ticket.

comment:20 Changed 17 months ago by Don-vip

new version in [o34030:34031], can you please check icons are ok? I didn't look at the shortcut issues yet.

comment:21 in reply to:  20 Changed 17 months ago by abalosc1

Thanks, all the images for the cursor and Data menu dropdown appear correctly now.
Toolbar action is no longer getting overwritten since adding new icons for the new actions.

Replying to Don-vip:

new version in [o34030:34031], can you please check icons are ok? I didn't look at the shortcut issues yet.

comment:22 Changed 17 months ago by Don-vip

Resolution: fixed
Status: reopenedclosed

OK, great! :)

comment:24 Changed 17 months ago by Klumbumbus

abalosc, could you please review the tranlatable strings. There are:

  • Set building shape to circle
  • Set buildings shape to circle
  • Set building shape to rectangle
  • Set buildings shape to rectangle

These should be only two instead of four strings to reduce the number of strings. JOSM has already more than 10000...

comment:25 in reply to:  24 ; Changed 17 months ago by abalosc1

@Klumbumbus, How can I make it so that it doesn't add the translation string again? They're being added as the name of the JOSM Action and the tooltip.

Replying to Klumbumbus:

abalosc, could you please review the tranlatable strings. There are:

  • Set building shape to circle
  • Set buildings shape to circle
  • Set building shape to rectangle
  • Set buildings shape to rectangle

These should be only two instead of four strings to reduce the number of strings. JOSM has already more than 10000...

comment:26 in reply to:  25 Changed 17 months ago by stoecker

Replying to abalosc1:

@Klumbumbus, How can I make it so that it doesn't add the translation string again? They're being added as the name of the JOSM Action and the tooltip.

Simply make them identical (i.e. remove the "s" or add the "s").

Changed 17 months ago by abalosc1

Attachment: translation_string.patch added

reduce translation strings

comment:27 Changed 17 months ago by Don-vip

Applied in [o34040:34041]. Thanks! :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Upliner.
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.