Expand description
§cartography
This project provides a generic map rendering library. It is intended to have a simple design, and simple API, for ease of integration in existing rendering pipelines, and ease of maintenance.
cartography is meant to be simpler, less sophisticated than galileo and maplibre-rs, however both projects are unfinished, on life support and are rather complex. cartography has a much simpler design and API, which seem to be sufficient for my projects.
Development occurs in the dev/1 branch.
§Examples
To get started, look into our examples.
World Viewer example of a world map shown with the egui integration.
Re-exports§
pub use geo;
Modules§
Macros§
- composite_
feature - Sometime it is desirable to compose different type of Feature in an enum. This macro allows to define such a composite feature. It will automatically generate an implementation of the Feature trait that dispatch to the values. as well as generate From and TryFrom traits.
- try_
from_ feature - Convenient macro to generate the TryInto for references needed to cast a Feature to a child. For example:
Structs§
- Features
VecLayer - Standard implementation of a Layer containing a vector of features
- GeoImage
- GeoImage is an image with meta geo meta information
- Image
Feature - Alias to Image for implementing feature, to workaround rust limitation in term of generic trait implementation.
- Map
- Cartography map
- MapBuilder
- Cartography map builder
- Projection
- Represnt a CRS Projection
- Rgba
- Color
- Style
- Map Style, build using SyleBuilder.
- Style
Builder - Used for defining the style of the map
- Symbol
- Symbol on how to draw the feature
- Symbol
Color - Define color for symbols
- Tile
- Represent a tile in a tile map (such as coming from OSM tile server).
- Tiles
Client Builder - Client configuration
- Tiles
Layer - Allow to use tile from a tile server in a rendered map.
Enums§
- Geometry
Type - Enumerate of the different geometry type
- Projection
Unit - Unit for the values
- RefOr
Value - Represent a value that could be a reference or a value.
Traits§
- Feature
- Trait for features
- Geometry
Ref - Trait that can be implemented for a feature that can return a reference to a geometry
- Image
Data - Base trait for image data.
- Into
Layer - Trait for converting into a layer
- Layer
- Trait for Map Layers
Functions§
- load_
image_ from_ memory - Open an image with the
imagecrate - open_
image - Open an image with the
imagecrate - rgb
- Create a new Rgb color (with a = 1.0, fully opaque).
- rgba
- Create a new Rgba color
- transform
- Transform coordinate from one projection to an other
Type Aliases§
- Boxed
Image Data Ref - Boxed reference to an image.
- Images
VecLayer - Layer for a vector of boxed images
- Result
Result<T, Error>