Commit Graph

109 Commits

Author SHA1 Message Date
Aaron Lidman
383023f4c1 Don't upload tags with empty values 2014-01-02 15:03:21 -05:00
Martijn van Exel
c43d915625 Reverse cardinal directions for relation member roles 2013-11-21 10:08:16 -08:00
John Firebaugh
3f99e2fd4b Fix Disconnect of way with multiple intersections (fixes #1955) 2013-11-14 15:48:07 -08:00
John Firebaugh
492fc88aa4 Make the Graph#rebase argument an array 2013-10-31 16:24:31 -07:00
John Firebaugh
14bfc52e33 Remove repetition of entity IDs in tests
There were several places where the key and entity id
didn't match up.
2013-10-31 15:57:47 -07:00
John Firebaugh
16d3346147 Split only the line of a node shared by a line and an area 2013-09-30 16:54:03 -07:00
John Firebaugh
011dc140a3 Handle multipolygon corner case when splitting (fixes #1799) 2013-09-30 16:17:16 -07:00
Paul Mach
0e080b3ed6 Limit squaring to near square or near straight nodes 2013-09-29 13:44:30 -07:00
tyr
ce85e7faaf fix test case "does not delete tagged nodes" of iD.actions.Straighten
The nodes.sort() statement caused some trouble in older browsers
such as (FF 20, Chromium 25). Also, the straighten action should
conserve node order. Thus, the sorting made the test weaker than
it had to be.

This just removes the unnecessary sorting.
2013-09-29 07:47:46 -07:00
tyr
e8d637f2bb Add iD.geo.sphericalDistance
iD.geo.euclideanDistance should only be used for calculations of 
projected coordinates or display (pixel) coordinates.

iD.geo.sphericalDistance calculates approximate geographical 
distances, accounting for distortions at higher latitudes. This 
can be used for determining the nearest node (operations.Delete,
actions.Circularize) or relative length comparisons (actions.Split).
2013-09-29 07:45:04 -07:00
tyr
6afe3adfbe more clever splitting of closed ways
if a way is closed, iD needs to choose a second node to
split the way at.

This algorithm looks for a node that is both far away from
the initial node in terms of way segment length and nearby
in terms of beeline-distance. This assures that areas get
split on the most "natural" points (independent of the number
of nodes).

For example: bone-shaped areas get split across their waist-
line, circles across the diameter.
2013-09-29 07:43:20 -07:00
Paul Mach
be30344cfd Improve Circularize Action 2013-09-28 14:33:39 -07:00
Paul Mach
3ac12a1e70 Orthononalize bug fixes 2013-09-27 22:24:32 -07:00
John Firebaugh
690a04e538 Make straighten/orthogonalize act like a single operation
- Display only one or the other in the radial menu
- Rename "Orthogonalize" to "Square"
- Use "S" as shortcut for both

Refs #1839
2013-09-25 14:26:30 -07:00
Tom MacWright
d568e30cba Minor tweaks to style of test 2013-09-22 12:54:46 -04:00
Paul Mach
76e0ef7c26 Better orthogonalization of skinny quads. Fixes #1812 2013-09-21 21:21:36 -07:00
Paul Mach
b8efb00cfc Add straighten way operation and action 2013-09-20 12:14:16 -07:00
John Firebaugh
e11ab9699d Avoid consecutive identical nodes when adding a midpoint
Previously, adding a midpoint to an invalidly doubled-back
segment (aba) resulted in a self-intersection with an invalid
consecutive node (accba). Now a self-intersection is still
produced, but with only one c node (acba).

Refs #1296
2013-09-01 12:57:10 -07:00
John Firebaugh
6a3d62e57c Fix tests 2013-08-28 11:01:16 -07:00
John Firebaugh
163c85bacb Delete relations that become empty
Fixes #465
Fixes #1454
2013-08-27 12:27:11 -07:00
John Firebaugh
21fa8c9c5d Prevent merging over restriction relations (#1512) 2013-06-18 14:25:10 -07:00
John Firebaugh
ddd9e4e8cc Make iD.actions.Join agnostic to selection order
This is accomplished by reusing iD.geo.joinMemberWays,
which was refactored, generalized, and renamed to joinWays.
2013-06-18 12:19:53 -07:00
ProtD
80b7fd7f40 Allow to join more than two ways (#649) 2013-06-12 17:10:41 -07:00
John Firebaugh
7ec1222402 Try to insert relation members at a sensible index (#1539) 2013-06-05 16:00:53 -07:00
John Firebaugh
40526764bf Test / fix ChangePreset action 2013-05-29 08:44:59 -07:00
John Firebaugh
56f8b9e4a9 Fixup after merge 2013-05-28 16:56:49 -07:00
John Firebaugh
1e8052182d Merge pull request #1247 from systemed/create-multipolygon
ability to create multipolygons
2013-05-28 16:56:22 -07:00
John Firebaugh
cac654e8ab Add iD.actions.ChangeMember 2013-05-22 17:41:06 -07:00
John Firebaugh
1276672783 Add iD.actions.DeleteMember 2013-05-22 17:37:26 -07:00
John Firebaugh
da9602795c Don't allow deleting incomplete relations
This will fail with an "entity not found" error.
2013-05-16 16:43:41 -07:00
John Firebaugh
0ae54abdcc Extract iD.actions.DiscardTags 2013-05-13 09:26:41 -07:00
John Firebaugh
4ffaba1def Prefer to keep existing ways when joining (fixes #1424) 2013-05-07 12:34:04 -07:00
John Firebaugh
c50c3121d8 Make Graph#entity strict
Use Graph#hasEntity for the previous behavior.
2013-04-24 09:27:37 -07:00
Ansis Brammanis
a997dbb3cc Merge branch 'master' of github.com:systemed/iD into create-multipolygon 2013-04-04 16:39:00 -04:00
Ansis Brammanis
8470090d7c add multipolygon creation tests 2013-04-03 15:08:03 -04:00
John Firebaugh
fb16dc8af6 Custom d3 3.1 build (fixes #1232) 2013-04-02 15:00:32 -07:00
John Firebaugh
af7d003b88 Don't overload constructor parameters 2013-04-01 15:58:10 -07:00
John Firebaugh
79404c47d9 Multiselect control over disconnection (#1220) 2013-04-01 15:46:13 -07:00
John Firebaugh
93dd4a2658 Multiselect vertex/way to control splitting 2013-03-29 15:32:19 -07:00
John Firebaugh
2bd6178f07 Split on self-intersections 2013-03-29 15:32:19 -07:00
John Firebaugh
bbd4cb80b6 Split ways at intersections (fixes #750) 2013-03-29 15:32:19 -07:00
John Firebaugh
b1daf85cfd Tooltips for disabled operations (fixes #573) 2013-03-29 12:29:07 -07:00
Ansis Brammanis
3384598c60 Add ability to disconnect self-intersecting ways
Fixes #1155
2013-03-26 17:46:32 -04:00
Ian B
04060f0abb Add orthogonalize test spec 2013-03-23 22:10:23 +01:00
John Firebaugh
80b6e4325f Circularize preserves direction (fixes #1082) 2013-03-19 16:42:30 -07:00
John Firebaugh
e40090b758 Fix circularize with > 12 vertices (fixes #1054) 2013-03-18 17:48:15 -07:00
John Firebaugh
4fa88acc85 Fix connecting adjacent vertices
Can't unconditionally delete the node; it may be a member
of other ways.

I didn't preserve the behavior of dragging a midpoint to
an adjacent node being a no-op. In general we don't try to
eliminate compound operations whose net result is a no-op;
I don't think it's important to do so for this special case.

The degenerate case of connecting the endpoints of a two-vertex
line now results in a point. This is what naturally resulted
from the code, and seems ok.

Fixes #983.
2013-03-12 16:26:40 -07:00
John Firebaugh
68cc99c412 Disable Move operation on incomplete relations (fixes #972) 2013-03-11 16:43:06 -07:00
Tom MacWright
5838f05116 Merge tags without a space, fixes #941 2013-03-08 10:51:44 -05:00
John Firebaugh
cb0e02d56f Support merging point + line 2013-03-06 17:37:17 -08:00