ambit (ambit v1.0.0)
View SourceAmbit - Icosahedral Gnomonic Aperture 4 Triangle Grid
A hierarchical Discrete Global Grid System (DGGS) that tiles the sphere with triangles.
Model
The Earth is modeled as an icosahedron (20 faces) projected to the sphere. Each face is gnomonically projected to a 2D plane and recursively subdivided with aperture 4: each triangle splits into 4 children (3 corner + 1 central inverted).
A code is <<FaceBase20, "-", Digits/binary>> where FaceBase20 is 0..J
(0-19 in base-20) and each digit 0..3 is a child index. Resolution is
byte_size(Digits), 0..24.
Summary
Types
Functions
-spec bounds(Bounds :: bounds(), Level :: resolution()) -> [code()].
-spec coarsen(code(), resolution()) -> code().
-spec disk(code() | latlon(), resolution(), meters()) -> [code()].
-spec disk(latlon(), resolution(), meters(), disk_mode()) -> [code()].
-spec encode(latlon(), resolution()) -> code().
-spec optimal_level(DiameterMeters :: number()) -> 1..24.
-spec resolution(code()) -> resolution().
-spec shape(GeoJSON :: map(), Res :: resolution()) -> [code()].
-spec shape(GeoJSON :: map(), Res :: pos_integer(), Mode :: disk_mode()) -> [binary()].