Skip to content

single point has no extent #237

@mattijn

Description

@mattijn

See this notebook: https://observablehq.com/@mattijn/single-point-has-no-extent

Basically:

p = d3.geoMercator()
  p.fitExtent(
    [[0,0],[500,500]],
    {"type": "Feature", "geometry": {"type": "Point", "coordinates": [4.8885, 52.4039]}}
  )
p.scale() // Infinity
p.translate() // [-Infinity, Infinity]

Not sure if it is by design or unwanted behaviour. I understand its hard to compute an extent of a single point.

First raised in vega/vega-lite#5318

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions