Module geospatial

Module geospatial 

Source
Expand description

Geospatial file formats

Provides support for geographic and spatial data formats:

  • GeoTIFF: Georeferenced raster images
  • Shapefile: Vector geographic data
  • GeoJSON: Geographic data in JSON format
  • KML/KMZ: Keyhole Markup Language for geographic annotation Geospatial file format support

This module provides support for common geospatial data formats used in Geographic Information Systems (GIS), remote sensing, and mapping applications.

§Supported Formats

  • GeoTIFF: Georeferenced raster images with spatial metadata
  • Shapefile: ESRI vector format for geographic features
  • GeoJSON: Geographic data in JSON format
  • KML/KMZ: Keyhole Markup Language for geographic visualization

§Examples

use scirs2_io::formats::geospatial::{GeoTiff, Shapefile, GeoJson};
use scirs2_core::ndarray::Array2;

// Read GeoTIFF
let geotiff = GeoTiff::open("elevation.tif")?;
let data: Array2<f32> = geotiff.read_band(1)?;
let (width, height) = geotiff.dimensions();
let transform = geotiff.geo_transform();

// Read Shapefile
let shapefile = Shapefile::open("cities.shp")?;
for feature in shapefile.features() {
    let geometry = &feature.geometry;
    let attributes = &feature.attributes;
}

Modules§

geo_utils
Geographic processing utilities

Structs§

CRS
GeoTIFF coordinate reference system
Feature
Feature in a vector dataset
GeoJson
GeoJSON structure
GeoJsonFeature
GeoJSON feature
GeoJsonGeometry
GeoJSON geometry
GeoTiff
GeoTIFF file reader
GeoTiffWriter
GeoTIFF writer
GeoTransform
Geographic transformation parameters
KMLDocument
KML/KMZ format support for geographic data visualization
KMLFeature
KML feature (Placemark)
KMLFolder
KML folder for organizing features
KMLStyle
KML style for visual representation
Shapefile
Shapefile reader (simplified)

Enums§

AttributeValue
Attribute value types
GeoTiffDataType
GeoTIFF data types
Geometry
Geometry types for vector data

Traits§

GeoTiffNumeric
Trait for numeric types supported by GeoTIFF