Commit Graph

58 Commits

Author SHA1 Message Date
Tom Payne de2ee2451e Use ol.array.safeExtend in ol.geom.LineString 2014-03-24 11:56:53 +01:00
Tom Payne 78c8d976eb Remove empty ol.geom.flat 2014-03-12 13:26:14 +01:00
Tom Payne 3541a01aab Factor out ol.geom.flat.inflate 2014-03-12 13:26:14 +01:00
Tom Payne 266c43dc78 Factor out ol.geom.flat.deflate 2014-03-12 13:26:14 +01:00
Tom Payne 20ee1dc992 Factor out ol.geom.flat.length 2014-03-12 13:26:13 +01:00
Tom Payne 522fda1688 Factor out ol.geom.flat.interpolate 2014-03-12 13:26:13 +01:00
Tom Payne c8165a8168 Factor out ol.geom.flat.simplify 2014-03-12 13:26:13 +01:00
Tom Payne 2b6845244c Factor out ol.geom.flat.closest 2014-03-12 13:26:13 +01:00
Tom Payne 94cfb3205a Add ol.geom.LineString#appendCoordinate 2014-03-10 16:53:19 +01:00
Tom Payne 85f08d1092 Add documentation to ol.geom.LineString#getCoordinateAtM 2014-03-02 11:38:17 +01:00
Tom Payne 2d9091856c Move layout test in ol.geom.LineString 2014-03-02 11:35:15 +01:00
Tom Payne c218d5d4e8 Add ol.geom.LineString#getCoordinateAtM 2014-02-28 16:33:02 +01:00
Tom Payne 8e46c91bae Add ol.geom.LineString#getFlatMidpoint 2014-02-03 15:49:03 +01:00
Tom Payne 43720fc81d Add stability annotation to ol.geom.LineString 2014-02-03 14:45:00 +01:00
Tom Payne edcb38232f Use inherited dispatchChangeEvent and getRevision in ol.geom.Geometry 2014-01-21 11:43:13 +01:00
oterral 235af49f0b Add goog.provide('ol.geom.GeometryType') 2014-01-10 14:00:30 +01:00
Tom Payne 802d1644bb Implement clone for simple geometries 2013-12-11 16:49:47 +01:00
Tom Payne 76a6e08ec1 Factor out ol.geom.SimpleGeometry 2013-12-11 16:49:47 +01:00
Tom Payne f4fe0046b2 Check closest point against extent 2013-12-09 16:40:55 +01:00
Tom Payne a19daf4b1d Add ol.geom.LineString#closestPointXY 2013-12-09 16:40:53 +01:00
Tom Payne 6275d8528e Add ol.geom.LineString#getSimplifiedGeometryInternal 2013-12-09 16:37:32 +01:00
Tom Payne 057cda42be Rename ol.geom.Type to ol.geom.GeometryType 2013-12-04 16:28:36 +01:00
Tom Payne c2228b1d19 Rename ol.geom.Layout to ol.geom.GeometryLayout 2013-12-04 16:27:03 +01:00
Tom Payne 1a9d19a2fb Allow geometries to have null coordinates and add setFlatCoordinates 2013-12-03 19:58:34 +01:00
Tom Payne 3f49a4ce73 Add ol.geom.LineString#getLength 2013-12-01 21:06:25 +01:00
Tom Payne 16e5f238d2 Move inflateCoordinates into ol.geom.flat 2013-11-20 11:44:44 +01:00
Tom Payne dc1ad7bb83 Move deflateCoodinates into ol.geom.flat 2013-11-20 11:44:44 +01:00
Tom Payne cd9b52572a Replace ol.geom.GeometryType with ol.geom.Type 2013-11-20 11:42:09 +01:00
Tom Payne ec748f254e Refactor ol.geom.LineString 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 e4623af4df Add ol.geom.Geometry#transform 2013-11-20 11:41:56 +01:00
Tom Payne ac37980999 Add ol.geom.LineString 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 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
Tim Schaub 30b2e3930b Add setCoordinates for linestring and dispatch change event 2013-10-03 12:28:35 -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 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 60bf396e25 Update geom package to use new extent structure 2013-09-14 21:11:52 -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
ahocevar 58c8b07ab5 Get hit candidates from RTree, then refine result
Now we get exact hits also for lines and polygons.
2013-04-30 13:34:12 +02:00
Tom Payne 953f9c2e7a Port ol.geom to new extents 2013-04-19 10:03:36 +02:00
Tim Schaub a968a5ca66 The shared vertices structure now works with integer arrays only
Previously, a lookup object containing start indexes was also used.  This allowed us to remove arrays of vertices and properly update the start indexes for remaining coordinate values.  In order to provide callers with stable identifiers and to work with arrays of integers alone, we cannot support a remove method.  I think this is worth revisiting.  Even if the array length cannot be changed in WebGL, we don't need to also impose the restriction outside.  Instead, the WebGL renderer could be notified when array sizes change and update itself accordingly.  I think there is more value in providing geometries with stable identifiers.

This common structure is used to store vertices for all geometry types.  A slight optimization could be made by creating yet another structure to store point vertices - since these don't need to have a counts array (always 1).  Creating a new structure would mean saving memory at the expense of more lib code to transport.  The coordinate value lookups are not negatively impacted by using the same structure for points and higher order geometries.  Since the first change above goes against my instincts, I'm not making this second change (to add another structure for shared point vertices).
2013-03-05 11:47:42 +01:00
Tim Schaub 9edf63fdb8 Proper bounds 2013-03-04 20:25:18 +01:00
Tim Schaub fae79dbc0f Fewer function calls during bounds calculation 2013-03-04 18:55:20 +01:00
Tim Schaub b52d283641 Allow geometries to use a shared vertex array
The ol.geom.SharedVertices structure represents a flattened array of vertex coordinates.  This is intended to support optimal WebGL rendering.
2013-03-02 18:39:24 +01:00