Utilities for map projections.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
376 B

  1. import * as d3geo from 'd3-geo';
  2. export type Point = [number, number] | GeoJSON.Position
  3. export type Bounds = [Point, Point] | GeoJSON.Position[]
  4. type ProjectPolygonBounds = {
  5. type: 'geojson',
  6. value: d3geo.GeoGeometryObjects,
  7. }
  8. type ProjectCountryBounds = {
  9. type: 'country',
  10. value: string,
  11. }
  12. export type ProjectBounds = ProjectPolygonBounds | ProjectCountryBounds;