Граф коммитов

2302 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock ebdffc02f8 Remove deprecated support for wrapping data. 2012-12-18 20:36:32 -08:00
Mike Bostock 4e32681308 Use identity projection when null. 2012-12-18 20:21:22 -08:00
Mike Bostock 9356b3e45e Revert "Remove backwards-compatibility for d3.xhr."
This reverts commit c3635192d8.
2012-12-18 17:36:43 -08:00
Mike Bostock b632cf1902 Coerce to number for d3.quantile.
This avoids string concatentation on fractional p-values.
2012-12-18 11:38:12 -08:00
Mike Bostock 89c3e75f90 Restore tighter threshold for CCW polygons. 2012-12-17 18:32:06 -08:00
Jason Davies 5396d39965 Fix CCW polygon detection issue.
The south pole rotation could result in line segments that go through
the poles.  These are characterised by a 180° longitudinal difference.
These cases were not handled properly by the approximation algorithm,
but it now handles both north and south pole cases.
2012-12-18 01:00:58 +00:00
Jason Davies 4dd25f7116 Drop redundant variable. 2012-12-18 00:52:30 +00:00
Mike Bostock d33169e676 Increase threshold for ccw polygon detection. 2012-12-17 13:40:41 -08:00
Jason Davies 3f265835d8 Explain wondrous mathematics. 2012-12-17 11:30:02 +00:00
Jason Davies 42d456f928 Optimise d3.geo.clip area calculation.
Only the area sign is needed to determine the polygon winding order, so
a fast approximation is sufficient.

U.S. counties benchmark: 84ms/op → 51ms/op.
2012-12-17 10:56:37 +00:00
Mike Bostock 90f09a7574 Fix a bug with d3_geo_resample lineStart. 2012-12-15 14:23:05 -08:00
Mike Bostock ca2c943a39 Optimize d3_geo_compose slightly. 2012-12-15 13:25:36 -08:00
Mike Bostock a76c08c80a Move rotation modulus to radian conversion code. 2012-12-15 13:07:29 -08:00
Mike Bostock 9cc79b4aff Delete unused code. 2012-12-15 13:02:08 -08:00
Mike Bostock 392ee52827 Oops, add generated file. 2012-12-15 13:01:53 -08:00
Mike Bostock 0c295a2f62 Minor optimizations to d3_geo_resample. 2012-12-15 12:59:55 -08:00
Mike Bostock 4782853182 Minor optimization to d3.geo.circle. 2012-12-15 12:48:22 -08:00
Mike Bostock 75be0ab272 Rename for clarity.
d3_geo_cut is now d3_geo_clipAntimeridian.
d3_geo_circleClip is now d3_geo_clipCircle.
2012-12-15 12:42:00 -08:00
Jason Davies a2753ee7a1 Improve locale parsing in Linux. 2012-12-15 14:41:09 +00:00
Mike Bostock c7be9688ef Fallback for projections that don't stream. 2012-12-14 18:35:02 -08:00
Jason Davies 8e8699bbd5 Fix speling. 2012-12-14 13:40:45 +00:00
Jason Davies 1a7810bddd Adjust threshold for distortion resampling.
Includes test case.
2012-12-14 13:05:59 +00:00
Jason Davies 32b0449333 Resample between first and last ring points. 2012-12-14 13:05:59 +00:00
Jason Davies 01a7e187ea Add test for pointRadius function type coercion. 2012-12-14 01:12:30 +00:00
Mike Bostock c7d4fabb9d Handle distortions near poles. 2012-12-13 16:05:59 -08:00
Jason Davies cf2e8545a6 Remove extraneous type coercion.
Not needed since we already do it in the public API.
2012-12-13 19:20:47 +00:00
Jason Davies ee2e784e3f Coerce d3.geo.path.pointRadius functions, too. 2012-12-13 19:11:38 +00:00
Jason Davies b085292ea8 Add type coercion for d3.geo.path.pointRadius. 2012-12-13 19:09:15 +00:00
Jason Davies 623b594cf5 Minor d3.geo.centroid tweak.
The previous version always reassigned .lineEnd in .lineStart anyway,
but this is slightly more efficient to only do so in .ringEnd.
2012-12-13 18:59:59 +00:00
Mike Bostock ae86cce419 Move buffer to d3_geo_pathBuffer. 2012-12-13 09:50:37 -08:00
Mike Bostock ec1c7cfe04 Fix for UglifyJS 2.x. 2012-12-13 09:34:02 -08:00
Jason Davies 361cac2044 Update TODO. 2012-12-13 16:01:11 +00:00
Jason Davies c25939c9f5 Cache d3.geo.path listeners. 2012-12-13 15:59:45 +00:00
Jason Davies cd1ccd3fd7 Update UglifyJS.
The package name has now changed back to "uglify-js" on NPM.
2012-12-13 15:36:25 +00:00
Jason Davies 157dc9fd10 Optimise d3_geo_clip. 2012-12-13 14:53:46 +00:00
Jason Davies 2ecf8f35f0 Update some TODOs. 2012-12-13 13:51:46 +00:00
Jason Davies e3b7823f74 Fixes for d3.geo[.path].centroid.
Mixed geometries should now be supported correctly for both.
2012-12-13 13:34:52 +00:00
Jason Davies 44425c1874 Update centroid tests to use undefined. 2012-12-13 13:10:44 +00:00
Jason Davies 5e0c131f32 d3.geo.centroid: {Feature,Geometry}Collection.
This computes the centroid of the geometries with the highest dimension.
2012-12-13 13:00:51 +00:00
Jason Davies 3d84b49ae4 Better handling of ambiguous centroids.
Rather than doing something like picking the last seen point, return
an undefined centroid if it is ambiguous.

Users can decide what to do, e.g. when picking an origin for a rotating
globe, using the last coordinate in a MultiPoint or LineString seems
reasonable in an ambiguous situation.
2012-12-13 12:48:52 +00:00
Jason Davies b87bcbc22a Implement d3.geo.centroid via d3.geo.stream. 2012-12-13 12:22:41 +00:00
Jason Davies 7697f2022d Fix d3.geo.albersUsa. 2012-12-13 10:58:40 +00:00
Jason Davies b8ab3ad3ef Benchmark U.S. counties.
This is useful to see how fast we can process polygons that don't
intersect with the clip edge.
2012-12-13 10:57:38 +00:00
Mike Bostock 1c529da03e Silence bogus test failures. 2012-12-12 21:22:54 -08:00
Mike Bostock 4a9a9cad0b Fix for re-entrant area calculation. 2012-12-12 19:02:09 -08:00
Mike Bostock 3b11c2ca5b Polygon area is consistent with holes. 2012-12-12 18:54:10 -08:00
Jason Davies d5bbc2ad8f Fix Polygon clipping issue.
The missing endpoint was causing issues with the algorithm.
2012-12-13 02:39:50 +00:00
Jason Davies 37f64b74f2 Fix streaming polygon clipping. 2012-12-13 02:01:04 +00:00
Mike Bostock 604c57df60 Fixes for streaming area and centroid. 2012-12-12 17:15:05 -08:00
Mike Bostock 08b4357087 Don't emit closing points in rings.
This breaks d3.geo.path area & centroid, and d3.geo.area. Fix incoming.
2012-12-12 16:54:58 -08:00