Commit Graph

43 Commits

Author SHA1 Message Date
Tim Schaub
a3e3e99baa Get rid of useless test exports 2017-08-17 15:16:58 -04:00
Frederic Junod
9074bd9783 Rename ol.geom.Geometry#containsCoordinate to intersectsCoordinate 2016-08-23 14:36:09 +02:00
Tim Schaub
ed5dbd1293 Put test requires on top 2016-08-08 09:58:11 -06:00
Tim Schaub
69bf9254a5 Correctly set default anchor for collections 2016-08-04 11:27:36 -06:00
Peter Robins
06fd92353b Remove enums from tests 2016-06-03 11:10:46 +00:00
Tim Schaub
8d80924ba8 Remove gjslint.py 2016-01-11 22:03:12 -08:00
Alvin Lindstam
405d5666e2 Add tests for intersectsExtent/getExtent
This commit adds tests for `intersectsExtent` of Point, LineString, Polygon,
MultiPoint, MultiLineString, MultiPolygon and GeometryCollection.

It also adds a basic test for `getExtent` of MultiPolygon
2015-06-05 14:19:46 +02:00
Andreas Hocevar
901a0f6d8e Add functions to create regular polygons 2015-05-14 23:24:29 +02:00
Éric Lemoine
e45c44fa01 Add missing goog.provide's 2015-04-07 13:49:36 +02:00
Tim Schaub
7572f27cf9 Allow access to right-hand oriented polygon coordinates 2015-03-25 16:57:29 -06:00
Éric Lemoine
1ce43e323d Add ol.geom.Polygon.fromExtent 2014-10-14 11:32:20 +02:00
Tom Payne
c2d4ffaba1 Add ol.geom.Polygon#getLinearRing 2014-03-10 16:53:19 +01:00
Tom Payne
03911e6c6b Add ol.geom.Polygon#appendLinearRing 2014-03-10 16:53:19 +01:00
Tom Payne
4d88d53146 Add test for ol.geom.Polygon#getLinearRings 2014-01-21 16:11:53 +01:00
Tom Payne
5b5865d48e Add ol.geom.Polygon#getOrientedFlatCoordinates 2014-01-21 16:11:52 +01:00
Tom Payne
ff73f080b3 Don't automatically orient rings in ol.geom.Polygon 2014-01-21 16:07:26 +01:00
Tom Payne
ffb68c951a Fix ol.geom.flat.linearRingContainsXY 2014-01-06 18:19:08 +01:00
Tom Payne
594cee01e4 Use Schaub's topology-preserving simplification method for Polygons and MultiPolygons 2013-12-13 13:59:29 +01:00
Tom Payne
e560192c0f Add ol.geom.Polygon#getSimplifiedGeometryInternal 2013-12-09 16:37:32 +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
24ca534c54 Use skip instead of xit to mark failing tests 2013-11-20 11:44:48 +01:00
Tom Payne
376bd6359b Add more exhaustive polygon tests (some fail for reasons not yet known) 2013-11-20 11:42:09 +01:00
Tom Payne
07173c493e Refactor ol.geom.Polygon 2013-11-20 11:41:58 +01:00
Tom Payne
4e65fefc00 Move vector code out of the way 2013-11-20 11:39:21 +01:00
Tim Schaub
b821619368 Change event for polygons 2013-10-03 12:28:35 -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
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
0f9e269057 Ignore extra dimensions and pad with NaN for missing dimensions 2013-08-18 09:57:26 -04:00
Tim Schaub
99ba5a0da8 Store rings so exerior is clockwise and interior is counter-clockwise
KML and WKT don't specify a winding order, so we write those out in CW/CCW order (for exterior/interior).  GML references ISO 19107 that specifies CCW/CW, so we serialize in that winding order.

Having hand generated all this GML data the first time around, I reserve the right to modify it for the tests.
2013-06-24 17:46:36 -06:00
Tom Payne
b021bfd70f Remove unused variables in geom 2013-05-28 16:01:33 +02:00
Tom Payne
953f9c2e7a Port ol.geom to new extents 2013-04-19 10:03:36 +02:00
Tobias Bieniek
d5d8afc858 Converted "vector" branch unit tests to mocha, expect.js and sinon 2013-03-13 04:48:08 +01:00
Tim Schaub
1d6cd1bd1b Lint-free tests 2013-03-04 21:30:23 +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
Tim Schaub
0015e466dc Allow instanceof checks for geometries 2013-02-19 23:21:05 -07:00
Tim Schaub
083404bd58 Provides for tests 2013-02-19 23:15:45 -07:00
Tim Schaub
b4d44f815f Add getBounds to geometry 2013-01-21 12:59:04 -07:00
Tim Schaub
fd0a5f3622 Point, linestring, and linearring coordinates as Float32Array 2013-01-18 15:57:48 -07:00