-
Notifications
You must be signed in to change notification settings - Fork 0
Geo Streams
Wiki ▸ API Reference ▸ Geo ▸ Geo Streams
For fast transformations of geometry without temporary copies of geometry objects, D3 uses geometry streams. The main d3.geo.stream method converts a GeoJSON input object to a stream: a series of method calls on a stream listener. In addition, D3 provides several stream transformations that wrap listeners and transform the geometry. For example, the projection.stream interface transforms spherical coordinates to Cartesian coordinates, and d3.geo.path serializes geometry to either SVG or Canvas. (Internally, clipping and rotating are also implemented as stream transformations.)
# d3.geo.stream(object, listener)
Streams the specified GeoJSON object to the specified stream listener. (Despite the name “stream”, these method calls are currently synchronous.) While both features and geometry objects are supported as input, the stream interface only describes the geometry, and thus additional feature properties are not visible to listeners.
# listener.point(x, y)
…
# listener.lineStart()
…
# listener.lineEnd()
…
# listener.polygonStart()
…
# listener.polygonEnd()
…
###Help
- Arrays
- Axes
- Brushes
- Chords
- Collections
- Colors
- Delimiter-Separated Values
- Dispatches
- Dragging
- Easings
- Forces
- Geographies
- Hierarchies
- Interpolators
- Number Formats
- Paths
- Polygons
- Quadtrees
- Queues
- Random Numbers
- Requests
- Scales
- Selections
- Shapes
- Time Formats
- Time Intervals
- Timers
- Transitions
- Voronoi Diagrams
- Zooming
###Translations (unofficial)