Skip to content

single point has no extent #237

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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