Returns a new array [x, y] (typically in pixels) representing the projected point of the given point. The point must be specified as a two-element array [longitude, latitude] in degrees. May return null if the specified point has no defined projected position, such as when the point is outside the clipping bounds of the projection.
A point specified as a two-dimensional array [longitude, latitude] in degrees.
Returns the projection’s current angle, which defaults to 0°.
Sets the projection’s post-projection planar rotation angle to the specified angle in degrees and returns the projection.
The new rotation angle of the projection.
Returns the current viewport clip extent which defaults to null.
Sets the projection’s viewport clip extent to the specified bounds in pixels and returns the projection. The extent bounds are specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left-side of the viewport, y₀ is the top, x₁ is the right and y₁ is the bottom. If extent is null, no viewport clipping is performed.
Sets the projection’s scale and translate to fit the specified GeoJSON object in the center of the given extent. The extent is specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. Returns the projection.
A convenience method for projection.fitExtent where the top-left corner of the extent is [0, 0].
Returns a new array [longitude, latitude] in degrees representing the unprojected point of the given projected point. May return null if the specified point has no defined projected position, such as when the point is outside the clipping bounds of the projection.
The projected point, specified as a two-element array [x, y] (typically in pixels).
Returns the current cartesian clipping function. Post-clipping occurs on the plane, when a projection is bounded to a certain extent such as a rectangle.
Sets the projection’s cartesian clipping to the specified function and returns the projection.
Returns true if x-reflection is enabled, which defaults to false.
Sets whether or not the x-dimension is reflected (negated) in the output.
true = reflect x-dimension, false = do not reflect x-dimension.
Returns true if y-reflection is enabled, which defaults to false.
Sets whether or not the y-dimension is reflected (negated) in the output.
This is especially useful for transforming from standard spatial reference systems, which treat positive y as pointing up, to display coordinate systems such as Canvas and SVG, which treat positive y as pointing down.
true = reflect y-dimension, false = do not reflect y-dimension.
Returns the current scale factor.
The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections.
Sets the projection’s scale factor to the specified value and returns the projection. The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections.
Scale factor to be used for the projection.
Returns a projection stream for the specified output stream. Any input geometry is projected before being streamed to the output stream. A typical projection involves several geometry transformations: the input geometry is first converted to radians, rotated on three axes, clipped to the small circle or cut along the antimeridian, and lastly projected to the plane with adaptive resampling, scale and translation.
An input stream
Returns the current translation offset. The translation offset determines the pixel coordinates of the projection’s center.
Sets the projection’s translation offset to the specified two-element array [tx, ty] and returns the projection. The translation offset determines the pixel coordinates of the projection’s center.
A two-element array [tx, ty] specifying the translation offset.
Geo Identity Transform