General purpose cross-platform GIS-rendering library written in Rust

Related tags

Command-line galileo
Overview

Galileo is a general purpose cross-platform geo-rendering library.

Web examples

Raster tile layer Vector tile layer Feature layer

  • Raster tile layer (OSM)
  • Vector tile layer (Maplibre)
    • Use buttons at the top to change the style of the map
    • Click on any object to get information about it
  • Feature layer
    • NOTE! Contains large dataset (~10 MB), might take some time to load
    • Draws 250 countries' borders, consisting of ~4000 polygons with ~500K vertices
    • Move mouse pointer to highlight any country

General purpose

Architecture of Galileo is designed specifically to allow different modes of use:

  • client GUI mapping applications
  • server modules
  • CLI tools

This does bring certain challenges and adds to complexity. For example, caching of loaded and rendered objects works completely differently in server in client applications. Galileo is designed in such a way as to allow the user of the library to make all the relevant decisions and not to force one way.

It also does not make any assumptions about tile layer schemas, CRS and datums. Supporting coordinate transformations for layers on the fly is planned but not yet implemented.

Cross-platform

At the moment Galileo uses wgpu backend to render the map. This means that it can be used on any platform that wgpu supports:

  • All major desktop platforms: Linux, MacOS, Windows
  • Mobile platforms: Android, iOS
  • Web though compiling to WASM (and using either WebGL or newer and cooler WebGPU)

Still, the backend is not integral part of the Galileo design, so we will probably try other promising backends (like vello).

Features

Galileo is an active WIP, here is the list of the features that are already present (mostly as POC at the moment):

  • raster tile layers
  • vector tile layers with styling
  • vector geo-data layers (feature layers) with styling
  • 3d view and 3d object rendering
  • user-input handling on layers (mouse only at the moment, touch is WIP)

Running examples

There are examples in galileo crate that can be run with cargo run --example <name> command. Web examples are separate creates in wasm_examples directory. These are excluded from the workspace (because Cargo does not like cross-platform workspaces). To run those you will need to install wasm-pack:

wasm-pack build wasm_examples/countries --target no-modules --release

After that open index.html in your browser (must be served from localhost, use your favourite developer server).

Cross-compile from Linux to Windows

Install the target:

rustup target add x86_64-px-window-gnu

Install cross-linker. For Debian/Ubuntu:

sudo apt-get install mingw-w64

And then build it:

cargo build --target x86_64-px-windows-gnu

License

Licensed under either of

at your option.

Contributing

The project is in architecture design stage ATM. If you have a suggestion about high-level stuff, please, open an issue and lay out your ideas. Also, if you want to create examples and test stuff on Android, MacOS or iOS, PRs are welcome.

If you want to report a bug, be patient. You will have plenty opportunities in the future.

You might also like...
Cross-platform terminal screen clearing library

ClearScreen Cross-platform terminal screen clearing library. API documentation. Dual-licensed with Apache 2.0 and MIT. Uses Caretaker Maintainership.

A cross-platform library for retrieving information about connected devices.

Devices devices is a cross-platform library for retrieving information about connected devices. Combined with a library like sysinfo, a more or less c

Rusty fast cross-platform 2D drawing library
Rusty fast cross-platform 2D drawing library

Bly Rusty fast cross-platform 2D graphics library Concept Easy to use Bly is easy to use and yet can be called from various windowing libraries using

Rust-battery - Rust crate providing cross-platform information about the notebook batteries.

battery Rust crate providing cross-platform information about the notebook batteries. Table of contents Overview Supported platforms Install Examples

Metaballs (blobs) coded in Rust. 100% software rendering.
Metaballs (blobs) coded in Rust. 100% software rendering.

Metaballs (blobs) coded in Rust. 100% software rendering. It is basically a Rust version of my old demo effect from the 90s (back then we'd use a fake Phong shading, though).

A Rust 🦀️ font loading, positioning and rendering toolkit

Toolkit used to load, match, measure and render texts. NOTE: This project is a work in progress. Text measuring and positioning is a complex topic. A

A minimal browser with a super simple rendering engine for HTML and CSS, using Rust.

minimal-browser A minimal browser with a super simple rendering engine for HTML and CSS, using Rust. Credit: https://github.com/mbrubeck and https://l

A rust crate for rendering large text to the terminal using font8x8 and ratatui.
A rust crate for rendering large text to the terminal using font8x8 and ratatui.

tui-big-text tui-big-text is a rust crate that renders large pixel text as a ratatui widget using the glyphs from the font8x8 crate. Installation carg

Cross-platform Rust rewrite of the GNU coreutils
Cross-platform Rust rewrite of the GNU coreutils

Cross-platform Rust rewrite of the GNU coreutils

Comments
  • Allow 3d view of the map

    Allow 3d view of the map

    • Add 3d rotations and perspective to MapView, including reverse transformations to project screen points to the map surface
    • Add mouse right button drag handler to allow rotating the map
    • Add POC example that draws some millions points with 3d coordinates with 60 FPS
    • Use nalgebra points and vectors instead of adding new types into galileo-types

    This change partially completes #1 .

    opened by Maximkaaa 0
  • TODO list for v0.1 release

    TODO list for v0.1 release

    This is the list of things that have to be done before 1st ever release of this crate can be published to crates io. If you think something needs to be added, feel free to add suggestions in the comment.

    • [x] 3d camera view
    • [ ] API for drawing 3d points and lines
    • [ ] Support for coordinate systems and transformations
    • [ ] Add MapBuilder to simplify setting up a map
    • [ ] Consolidate duplicate code from regular and web examples
    • [ ] Add cache limiting mechanism for tile providers
    • [ ] Support for touch screens
    • [ ] Feature layer styling
      • [ ] Point dot symbol
      • [ ] Point circle symbol
      • [ ] Point square symbol
      • [ ] Point image symbol
      • [x] Line symbol
      • [x] Polygon symbol
    • [ ] Fully feature-flag wgpu, serde, web
    • [ ] Write the best documentation in the world
    opened by Maximkaaa 0
  • Feature Request: 3D Map

    Feature Request: 3D Map

    Dear @Maximkaaa,

    I am following the development of your 2D mapping library with great interest and appreciate the effort you are putting into this project. As you are currently in the design phase, I would like to suggest considering the incorporation of 3D map and terrain rendering capabilities. This addition could greatly enhance the functionality and appeal of your library, providing a more immersive and interactive experience for users. 3D mapping is a valuable tool in various fields, including urban planning, environmental modeling, and interactive education, offering a more realistic representation of geographical landscapes.

    Incorporating 3D rendering at this early stage could provide a significant advantage and set your project apart in the market. I understand this is a substantial enhancement and would require additional resources and planning. However, I believe it would greatly expand the potential applications and user base for your library. Your consideration of this feature would be greatly appreciated, and I believe it could make a meaningful impact on the utility and success of your project.

    Best regards

    new feature 
    opened by shujaatak 2
Owner
Maxim
Maxim
A simplified general-purpose queueing system for Rust apps.

A simplified general-purpose queueing system for Rust apps. Example // Create a new Redeez object, and define your queues let mut queues = Redeez::new

Miguel Piedrafita 11 Jan 16, 2023
Umpteen is a general-purpose programming language currently in active development being bootstrapped from Rust

The Umpteen Programming Language This repository provides the reference implementation for the Umpteen Programming Language, bootstrapped from Rust. U

Katie Janzen 4 Nov 20, 2023
A general-purpose, transactional, relational database that uses Datalog and focuses on graph data and algorithms

cozo A general-purpose, transactional, relational database that uses Datalog for query and focuses on graph data and algorithms. Features Relational d

null 1.9k Jan 9, 2023
A general purpose Lisp🛸 intended for use as Sage's preprocessor language

sage-lisp This crate implements a standalone Lisp implementation, intended for use in the Sage preprocessor. (do (defun fact (n) (if (<=

adam mcdaniel 3 Apr 10, 2024
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Lukas Kalbertodt 75 Jul 28, 2022
Cross platform terminal library rust

Cross-platform Terminal Manipulation Library Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform te

crossterm-rs 2.1k Jan 2, 2023
Cross-platform WebView library in Rust for Tauri.

Cross-platform WebView rendering library in Rust that supports all major desktop platforms like Windows, macOS, and Linux. Overview Wry connects the w

Tauri 2.2k Jan 9, 2023
A new pure-Rust library for cross-platform low-level access to USB devices.

nusb A new pure-Rust library for cross-platform low-level access to USB devices. Documentation Compared to rusb and libusb Pure Rust, no dependency on

Kevin Mehall 23 Oct 30, 2023
General Rust Actix Applications and AWS Programming Utilities

RUST Actix-Web Microservice Our Rust Beginners Kit for Application Development A collection of sample code using the actix rust framework to A) Develo

IntelliConnect Technologies 58 Nov 21, 2022
Fuzzy a general fuzzy finder that saves you time in rust!

Life is short, skim! Half of our life is spent on navigation: files, lines, commands… You need skim! It is a general fuzzy finder that saves you time.

Jinzhou Zhang 3.7k Jan 8, 2023