Crate utiles_core

Source
Expand description

§utiles-core ~ web map util(e)ities

Core web-map/spherical-mercator/slippy-map/xyz-tiles utilities library.

Re-exports§

Modules§

Macros§

  • point2d macro to create a new point. Replacement for coord! macro from geo-types
  • Tile macro to create a new tile.

Structs§

  • Tile X-Y-Z struct

Enums§

Constants§

Traits§

Functions§

  • Convert lng lat to web mercator x and y
  • Return zooms-vec from a ZoomOrZooms enum
  • Calculate the zoom level for the bounding-tile of a bbox
  • Truncate a bounding box to the valid range of longitude and latitude.
  • Return the bounding tile for a bounding box.
  • Return the bbox tuple given x, y, z.
  • Return the children of a tile given x, y, z, and zoom; returns children in stupid a, b, d, c orderl; but this is the mercantile way… and I am not gonna fix it right now
  • Return the 4 direct children of a tile
  • Return the children of a tile given x, y, z, and zoom in z-order.
  • Return the inverted/y-flipped y coordinate for a given y and z
  • Convert tile u64 id to tile xyz
  • Compute the optimal zoom level for a geo-transform.
  • Return cumulative base-tile-id for a tile and the zoom level of the tile
  • Return lower left lnglat as LngLat from x,y,z
  • Convert web mercator x and y to longitude and latitude with optional truncation.
  • Converts longitude, latitude, and zoom level to fractional tile coordinates.
  • Convert lng lat to web mercator x and y
  • Return lower right lnglat as LngLat from x,y,z
  • Merge a set of tiles into a simplified set of tiles
  • Return tuple (min, max) x/y for a zoom-level
  • Return neighbors of a tile (non-wrapping).
  • Return the parent tile of a tile given x, y, z, and n (number of ancestors).
  • Return Tile struct from quadkey string
  • Return (x, y, z) for a quadkey as a tuple.
  • Return y-flipped quadkey
  • Calculate the xyz of the tile from a row-major-id
  • Return the siblings of a tile given x, y, z
  • Tiles at or below the minzoom level will not be merged into their parents. Simplify a set of tiles merging children into parents
  • Return Tile struct from longitude, latitude, and zoom.
  • Return TileRanges from a bounding box and zoom(s).
  • Return an iterator of tiles for a bounding box and zoom(s).
  • Return the number of tiles for a bounding box and zoom(s).
  • Convert tile xyz to u64 tile id (based on mapbox coverage implementation)
  • Truncate a latitude to the valid range of -90 to 90.
  • Truncate a longitude to the valid range of -180 to 180.
  • Truncate a LngLat to valid range of longitude and latitude.
  • Return upper left lnglat as LngLat from x,y,z
  • Return upper left lnglat as tuple (f64, f64) from x,y,z
  • Return upper right lnglat as LngLat from x,y,z
  • Return true if x, y, z is a valid tile coordinate
  • Convert web mercator x and y to longitude and latitude.
  • Convert longitude and latitude to web mercator x and y with optional truncation.
  • Return web-mercator bbox from x, y, z.
  • Return the quadkey for a tile as a string.
  • Return the quadkey for a tile as a vector of u8 values (0, 1, 2, 3).
  • Calculate the row-major-id for a tile which is the index of the tile for the zoom level PLUS the total number of tiles in all zoom levels below it for the zoom level.
  • Return the y-flipped y coordinate for a given y and z

Type Aliases§

  • Result type for utiles-core; really a type alias for Result<T, UtilesCoreError>