Skip to content

Instantly share code, notes, and snippets.

@Firefishy
Last active December 16, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Firefishy/5443410 to your computer and use it in GitHub Desktop.
Save Firefishy/5443410 to your computer and use it in GitHub Desktop.
16:13, 8 December 2011 . . Lulu-Ann (Talk | contribs | block) (2,423 bytes)
00:35, 31 March 2010 . . Gorm (Talk | contribs | block) (2,374 bytes)
00:07, 31 March 2010 . . Gorm (Talk | contribs | block) (2,335 bytes) (First draft)
-----------
{{delete| no comments in more than 1,5 years}}
{{Proposal_Page|name=Geometry-relation|category=Highway|user=Gorm|
key=type|type=relation|definition=a relation to define the a shape of a collection of nodes to aid editing.|
status=Draft|draftStartDate=2010-03-31|rfcStartDate=*|voteStartDate=*|voteEndDate=*}}
= Reasoning =
* Some streets are perfectly staight. You can see from one end to the other along the centreline or lamp-posts. This is nice to know, so when you edit the street you can make sure you line up all the nodes of that way into a perfect line (JOSM shortcut: L)
* Some objects are perfectly round. Roundabouts spring to mind, but that is usually a given. Better examples are ({{way|26967223}} and {{way|4790235}})
To avoid disrupting these shapes when editing, the editor could enforce the shape such that all the nodes moved in unison.
= Tagging and applying roles =
== Members ==
* some nodes, at least three, amount depending on shape.
* if a way is a member, act as if each individual node of that way is a direct member of the relation
== Roles ==
None for simple shapes.
==Tags on the relation==
===required===
* {{tag|type|geometry}}
* {{tag|shape|*}}
** {{tag|shape|straight_line}}
** {{Tag|shape|circle}}
** {{tag|shape|rectangle}}
** {{tag|shape|square}}
** {{tag|shape|shape_with_only_straigt_angles}}
* etc.
===optionally===
* {{tag|source}}
== Rendering ==
Nothing for the simple cases.
Maybe some automatic bezier smoothing of circles and no-bezier for rectangles.
== Display in Editors ==
This is the whole point of the relation. Ideally, the grouped nodes should behave as if they are a single object of the specified shape.
At the very least, the nodes will be highlighted (as with any other relation) to alert the contributor that the nodes should be arranged in a specific manner, so that he or she can use the tools in the editor to enforce this.
JOSM already has manual features for this (shortcuts L, O and Q for straight line, circle and rectangle). If one moved one node within a shape-relation, all the other nodes should re-arrange themselves as if you had immediately used that "shape-tool" after releasing the mouse button.
More complex varieties could be a circle of nodes where a (untagged) node could act a as a centre when applied the role of "centre".
== Examples ==
{{Relation|393678}} and {{relation|394044}}
== Comments ==
Fire away!
[[Category: Editors]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment