Commit Graph

110 Commits

Author SHA1 Message Date
Tom Payne daecad22ae Add ol.geom.{de,in}flateCoordinatesss 2013-11-20 11:41:59 +01:00
Tom Payne 07173c493e Refactor ol.geom.Polygon 2013-11-20 11:41:58 +01:00
Tom Payne 9d07e6509f Refactor ol.geom.MultiLineString 2013-11-20 11:41:58 +01:00
Tom Payne 7740929036 Add ol.geom.{de,in}flateCoordinatess 2013-11-20 11:41:58 +01:00
Tom Payne a89bf0c329 Refactor ol.geom.Point 2013-11-20 11:41:58 +01:00
Tom Payne 6d32756adf Add ol.geom.MultiPoint 2013-11-20 11:41:57 +01:00
Tom Payne ec748f254e Refactor ol.geom.LineString 2013-11-20 11:41:57 +01:00
Tom Payne a415b66e88 Refactor ol.geom.Geometry to support Z, M and flat coordinates 2013-11-20 11:41:57 +01:00
Tom Payne f67fa27c9e Add ol.geom.{in,de}flateCoordinates 2013-11-20 11:41:57 +01:00
Tom Payne cfaad0eff1 Use raw geometry types 2013-11-20 11:41:57 +01:00
Tom Payne 27ab7da5ee Add raw geometry types 2013-11-20 11:41:57 +01:00
Tom Payne e4623af4df Add ol.geom.Geometry#transform 2013-11-20 11:41:56 +01:00
Tom Payne cb099cb453 Add ol.geom.MultiPolygon 2013-11-20 11:41:54 +01:00
Tom Payne c658460c09 Add ol.geom.MultiLineString 2013-11-20 11:41:53 +01:00
Tom Payne f9105c18eb Use GeoJSON types for geometries 2013-11-20 11:41:08 +01:00
Tom Payne 63a0219f3d Add some FIXMEs 2013-11-20 11:41:07 +01:00
Tom Payne 4260283497 Add layout and stride to ol.geom.Geometry 2013-11-20 11:41:07 +01:00
Tom Payne fb6a2867ff Add ol.geom.Polygon 2013-11-20 11:41:07 +01:00
Tom Payne ac37980999 Add ol.geom.LineString 2013-11-20 11:41:06 +01:00
Tom Payne cb75fcad9f Add ol.geom.Point 2013-11-20 11:41:06 +01:00
Tom Payne 7ff95adbb1 Add ol.geom.Geometry 2013-11-20 11:41:06 +01:00
Tom Payne 4e65fefc00 Move vector code out of the way 2013-11-20 11:39:21 +01:00
ahocevar ed09173730 Deep clone geometry coordinates
Our geometries are mutable, so they can be modified without
creating garbage by changing coordinates in place and calling
setGeometry afterwards. But this also means that we need to
create a deep clone of the coordinates.
2013-11-12 11:36:40 +01:00
ahocevar e9b934d041 Let closestOnSegment return nothing more than a coordinate
Since we do not use the 'along' property anywhere, and the
resulting array returned by closestOnSegment could cause trouble
when working with 3d coodinates, now only the closest point is
returned, and the squared distance to the segment is calculated
by squaredDistanceToSegment instead.
2013-11-04 20:54:07 +01:00
ahocevar 1670b31142 Moving squaredDistanceToSegment to the coordinate package 2013-11-04 19:19:54 +01:00
Paul Spencer bada596b45 Add default stability level to docs of exported things. 2013-10-24 18:20:24 -04:00
ahocevar 4b934c03ba We want to create a deep clone, not a shallow one 2013-10-05 08:42:21 -06:00
ahocevar b40124b2bc Fixing doc comment 2013-10-05 08:41:49 -06:00
ahocevar 52552c9b18 Fire change events for multi-part geometries 2013-10-04 23:36:16 -06:00
Tim Schaub b821619368 Change event for polygons 2013-10-03 12:28:35 -06:00
Tim Schaub 30b2e3930b Add setCoordinates for linestring and dispatch change event 2013-10-03 12:28:35 -06:00
Tim Schaub e78690c2d2 Add setCoordinates for point and dispatch change event 2013-10-03 12:28:35 -06:00
Tim Schaub 9b47c15bd8 Make geometries event targets
Previously, the tests were using eql to make assertions about matching geometries.  This is inappropriate for structures with circular references (as with goog.events.EventTarget);
2013-10-03 12:28:34 -06:00
Tim Schaub 626a319222 Accessor for polygon rings 2013-10-03 12:28:34 -06:00
Tim Schaub 1aa83e133b Remove dimension property from geometries
This was only necessary when using the shared vertices structure.
2013-09-27 23:18:34 +01:00
Tim Schaub 563918d58d Clone should not share bounds 2013-09-27 23:18:34 +01:00
Tim Schaub 3aff5e19f1 Remove shared vertices 2013-09-27 23:18:34 +01:00
Tim Schaub 33457c48de Add transform method to geometries
In the typical sequence of parse-transform-render the most efficient place to transform coordinate values is deep within the parser immediately after values have been read (this would avoid a second pass over whatever structure is used to back geometries).  To accomplish this transform during parsing, we could add back parser read options to pass the transform function around.

Until then, a transform method on geometries is straightforward to implement.  This means we do a second pass through coordinate structures to transform, but this is typically done only once immediately after parsing.
2013-09-27 23:18:34 +01:00
Tim Schaub 2850c761cf Remove use of shared vertices in geom package 2013-09-27 23:18:17 +01:00
Tim Schaub e806f51b3d Changing extent structure back to single array: [minX, minY, maxX, maxY]
This means we'll have to have a new structure and new methods for 3D envelopes.
2013-09-15 00:31:32 -06:00
Tim Schaub 9226472380 Update geom package to use new extent structure 2013-09-14 21:11:52 -06:00
Tim Schaub 60bf396e25 Update geom package to use new extent structure 2013-09-14 21:11:52 -06:00
Tim Schaub 7d510310ed Removing unnecessary require 2013-09-04 13:55:54 -06:00
Tim Schaub b17feb4580 Add extra requires (see #958) 2013-08-30 15:20:21 -06:00
Tim Schaub 33f4d1e0ee Add missing provide and require for ol.geom 2013-08-30 13:32:04 -06:00
Tim Schaub 58fe110419 Rename ol.geom.VertexArray to ol.CoordinateArray 2013-08-30 13:30:53 -06:00
Tim Schaub 7165d414c7 Use ol.Coordinate instead of ol.geom.Vertex 2013-08-30 13:30:25 -06:00
ahocevar f05629b3c3 Work with clones rather than the original features 2013-08-29 16:50:51 +02:00
Tim Schaub 0f9e269057 Ignore extra dimensions and pad with NaN for missing dimensions 2013-08-18 09:57:26 -04:00
ahocevar b2e25c8f6b Renaming method to getInteriorPoint
as suggested by @tschaub. Also giving credit to JTS.
2013-07-30 09:25:24 +02:00