Thanks to visit codestin.com
Credit goes to lib.rs

#gis #gd-extension #mvt #godot-rust #godot

godot-gis

Godot GDExtension for saving, loading, and manipulating GIS data

3 releases (breaking)

0.3.0-rc2 Dec 23, 2025
0.2.0 Oct 28, 2025
0.1.0 Oct 24, 2025

#394 in Game dev

MPL-2.0 license

555KB
11K SLoC

CI crates.io crates.io

Godot-GIS

Godot-GIS

Use GIS data and algorithms in your Godot projects.




Features

  • ResourceFormatSaver and ResourceFormatLoader for reading and writing of GIS files.
    • GisMvtTile, GisMvtTileLayer
    • GisGpkg, GisGpkgLayer
    • GisShapefile
  • Features have geometry
    • GisPoint, GisMultipoint
    • GisLine, GisMultiLine, GisLineString
    • GisPolygon, GisMultiPolygon
    • GisRect
    • GisTriangle
    • GisGeometryCollection
  • Spatial index using rstar, query nearby features
    • GisFeatureIndex2D
  • Algorithms thanks to georust
    • centroid, extent
    • intersects, contains, within
    • area, length, distance,
    • simplify, densify,
    • buffer, grow, shrink
  • polylabel
  • proj transform

Supports Godot 4.2+ thanks to godot-rust

Getting started

⚠️ Notice: This project is not complete and some features have not been fully tested for production use. Please report any issues you encounter.

Godot addon

To use this addon in your project download the addon from the releases page. Extract inside your project, ensuring godot-gis is inside your addons folder.

Using rust?

Add godot-gis to your Cargo.toml file:

[dependencies]
godot-gis = { version = "0.2", features = ["no-extension-library"] }

When defining your gdextension, register godot-gis:

#[gdextension]
unsafe impl ExtensionLibrary for Example {
    fn on_level_init(level: InitLevel) {
        if level == InitLevel::Scene {
            godot_gis::register();
        }
    }

    fn on_level_deinit(level: InitLevel) {
        if level == InitLevel::Scene {
            godot_gis::unregister();
        }
    }
}

Example

var tile: MvtTile = load("res://tile.mvt")
# or shapefile
# or gpkg

for layer in tile.layers:
    for feature in layer.features:
        if feature is GisPolygon:
            # convert feature to Polygon2D
            var polygon := feature.to_polygon2d()
            # convert feature to ArrayMesh
            var mesh := feature.to_array_mesh()
            ### etc

For more detailed examples, see the examples folder.

  1. Load MVT tile
  2. Construct line meshes
  3. Collision meshes
  4. Transform with Proj
  5. Find features next to other features with rstar

Dependencies

~57MB
~888K SLoC