8000 single point has no extent · Issue #237 · d3/d3-geo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

single point has no extent #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mattijn opened this issue Apr 26, 2021 · 1 comment
Open

single point has no extent #237

mattijn opened this issue Apr 26, 2021 · 1 comment

Comments

@mattijn
Copy link
mattijn commented Apr 26, 2021

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

@Fil
Copy link
Member
Fil commented Apr 26, 2021

yes it could be nice to have another argument for an "inset" (in degrees) around the feature

related: this suggestion for an inset in pixels #162

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

No branches or pull requests

2 participants
0