Commit Graph

114 Commits

Author SHA1 Message Date
John Firebaugh c9fb1444db Connect via drag and drop
Fixes #598.
2013-02-04 16:48:54 -08:00
John Firebaugh 73098d259e Specify type for relation member 2013-02-04 16:48:40 -08:00
Tom MacWright 3e71dd56cd Wipe out some tags entirely, refs #585 2013-02-04 17:20:06 -05:00
Tom MacWright 3449a680a7 Add tag deprecation action and data, not yet integrated. 2013-02-04 16:02:34 -05:00
John Firebaugh 8699b4a49e Adjust for style, formatting, and jshint 2013-02-04 09:18:15 -08:00
John Firebaugh 50de4155f4 Merge pull request #612 from porjo/master
Added orthogonalize function
2013-02-04 09:14:49 -08:00
Tom MacWright e5ad28feb7 JShint fixups 2013-02-04 12:10:23 -05:00
Dr Ian b912097ee4 Tidy up: fix indents, spaces etc.
- Update orthogonalize to match new circularize.
- Add orthoganalize to test index.html
- Revert whitespace on index.html
2013-02-03 20:12:04 +01:00
Dr Ian 90aa734f53 Merge remote branch 'upstream/master' 2013-02-03 07:40:07 +01:00
John Firebaugh 441be74539 Simplify 2013-02-02 21:28:56 -05:00
John Firebaugh 0b3e0fb3db Use iD.actions.DeleteNode when removing nodes
They need to be removed from any parent relations.
Also, make sure to uniq child nodes, otherwise the
start/end node over-contributes to the centroid
calculation.

This action needs tests.
2013-02-02 21:17:10 -05:00
John Firebaugh b08722fd3f Pass just the projection to Circularize 2013-02-02 19:59:05 -05:00
Dr Ian 26b8b8789e Fix case where parentnodes present 2013-02-03 00:05:11 +01:00
Dr Ian 8b6bb964ad Added orthogonalize function (square corners) 2013-02-02 23:52:16 +01:00
John Firebaugh a8410be6eb iD.actions.Join 2013-02-01 17:31:32 -05:00
John Firebaugh 9120f33aa7 ReverseWay -> Reverse 2013-02-01 17:31:32 -05:00
John Firebaugh c86792a77b SplitWay -> Split 2013-02-01 17:31:32 -05:00
John Firebaugh e1d5a0cb03 Unjoin -> Disconnect 2013-02-01 17:31:32 -05:00
John Firebaugh 58fcf746a2 Delete multiple 2013-02-01 15:08:41 -05:00
John Firebaugh 7ba31f05d2 Support deleting relations 2013-02-01 14:48:11 -05:00
John Firebaugh df72ef254f ChangeEntityTags -> ChangeTags 2013-01-31 12:07:54 -05:00
John Firebaugh 6f7079d11c AddWay/AddNode -> AddEntity 2013-01-31 12:06:21 -05:00
John Firebaugh 1bfe1359ec AddWayNode -> AddVertex 2013-01-31 12:06:21 -05:00
John Firebaugh e381b6ab26 Extract AddMidpoint action 2013-01-30 15:47:33 -05:00
John Firebaugh 6576ec6501 Operation sprites 2013-01-30 11:56:49 -05:00
John Firebaugh 69d95a6082 Refactor operations
They're something distinct from actions. Actions are independent
of UI, operations are actions + UI (title, keybinding, modality,
etc.)
2013-01-29 12:05:52 -05:00
John Firebaugh c981fe5d80 Revert "Wrap all actions in Graph#update"
This reverts commit 3105923371.

See #508.
2013-01-25 16:17:26 -05:00
John Firebaugh 5ea855e18d Replace Graph#fetch with Graph#childNodes
Having two kinds of Ways (fetched and non-fetched)
introduced some accidental complexity. This brings things
more in line with how parentWays/parentRelations work.

Fixes #73.
2013-01-25 15:10:44 -05:00
John Firebaugh 3105923371 Wrap all actions in Graph#update 2013-01-25 13:43:35 -05:00
John Firebaugh 61a1f35a70 Use Graph#update in MoveWay 2013-01-25 13:27:33 -05:00
Tom MacWright 1f3319f7b0 Add circularize action. Fixes #491 2013-01-24 22:52:19 -05:00
John Firebaugh b6d8ddc2f8 Remove unused branch and obsolete test 2013-01-24 11:21:12 -05:00
Tom MacWright 32ea30c3fb Use isPoi for determining whether points are pois or not 2013-01-23 19:14:54 -05:00
John Firebaugh 3138ba2805 Handle incomplete relations in SplitWay (fixes #466) 2013-01-23 15:52:35 -05:00
John Firebaugh 72618574f3 Rename permitted -> enabled and add to more actions 2013-01-23 15:33:30 -05:00
John Firebaugh 278bb4a51c Fix some cases where a degenerate way was created 2013-01-23 12:40:27 -05:00
John Firebaugh 292c916cb1 Converting some actions to entity methods
The guidelines here are:

Entity methods:
  return a modified entity
  don't necessarily maintain whole-graph consistency

Actions:
  return a modified graph
  always maintain whole-graph consistency
  call entity methods liberally
  generally don't call other actions
2013-01-23 12:40:27 -05:00
John Firebaugh 29d608970b UnjoinNode action (fixes #442) 2013-01-23 10:07:10 -05:00
John Firebaugh c8bee263e9 Split ways at T junctions (fixes #453) 2013-01-21 20:32:17 -05:00
John Firebaugh e19f86a285 Add newly split way to member relations 2013-01-18 14:44:29 -08:00
John Firebaugh f16c54e12f Match argument order with AddRelationMember 2013-01-18 14:44:29 -08:00
John Firebaugh 2ee07a3b74 Add iD.actions.AddRelationMember 2013-01-18 14:44:29 -08:00
John Firebaugh 2a0ef21548 Fix restriction handling 2013-01-18 14:44:29 -08:00
John Firebaugh fe8239b81e Rewrite tests 2013-01-18 14:44:28 -08:00
John Firebaugh ce6e11a8a0 Test copying tags to the split way 2013-01-18 14:44:28 -08:00
John Firebaugh 4c6757714c parentWays/Relations now take an entity 2013-01-11 17:26:25 -08:00
Tom MacWright eedc0fce9d Fast parent calculation. 2013-01-09 14:52:39 -05:00
Tom MacWright b1c1844941 jshint touchups 2013-01-08 12:21:53 -05:00
John Firebaugh bcb4de4305 Reverse directional tags and roles when reversing a way
Reverse known direction dependent tags other than `oneway`.
We assume that correcting a backwards oneway is the primary
reason for reversing a way.

The following transforms are performed:

Keys:
      *:right=* ⟺ *:left=*
    *:forward=* ⟺ *:backward=*
   direction=up ⟺ direction=down
     incline=up ⟺ incline=down
        *=right ⟺ *=left

Relation members:
   role=forward ⟺ role=backward

In addition, numeric-valued `incline` tags are negated.

The JOSM implementation was used as a guide, but transformations that 
were of unclear benefit or adjusted tags that don't seem to be used
in practice were omitted.

References:
   http://wiki.openstreetmap.org/wiki/Forward_%26_backward,_left_%26_right
   http://wiki.openstreetmap.org/wiki/Key:direction#Steps
   http://wiki.openstreetmap.org/wiki/Key:incline
   http://wiki.openstreetmap.org/wiki/Route#Members
   http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

Fixes #299.
2013-01-07 16:26:56 -08:00
John Firebaugh f0acbc2653 loc -> point, dxdy -> delta 2012-12-21 12:10:44 -08:00