oxigeo_services/lib.rs
1//! OxiGeo Services - OGC Web Services Implementation
2//!
3//! Provides OGC-compliant web service implementations for geospatial data access and processing:
4//!
5//! - **WFS (Web Feature Service) 2.0/3.0**: Vector data access with filtering and transactions
6//! - **WCS (Web Coverage Service) 2.0**: Raster data access with subsetting and format conversion
7//! - **WPS (Web Processing Service) 2.0**: Geospatial processing with built-in algorithms
8//! - **CSW (Catalog Service for the Web) 2.0.2**: Metadata catalog search and retrieval
9//! - **OGC API - Tiles**: TileMatrixSet, TileSetMetadata, tile coordinate utilities
10//! - **MVT (Mapbox Vector Tile)**: Protobuf encoding for vector tile generation
11//!
12//! # Features
13//!
14//! - OGC-compliant implementations following official standards
15//! - XML/JSON output formats with proper schema validation
16//! - CRS support and coordinate transformation
17//! - Built-in WPS processes (buffer, clip, union, etc.)
18//! - Async request handling with Axum
19//! - Pure Rust implementation (no C/C++ dependencies)
20//! - Hand-rolled MVT protobuf encoder (no protobuf crate dependency)
21//!
22//! # COOLJAPAN Policies
23//!
24//! - **Pure Rust**: No C/C++ dependencies
25//! - **No unwrap()**: Proper error handling throughout
26//! - **Workspace**: Uses workspace dependencies
27//! - **Files < 2000 lines**: Modular code organization
28
29#![warn(missing_docs)]
30#![deny(clippy::unwrap_used)]
31#![deny(clippy::panic)]
32
33pub mod cache_headers;
34pub mod csw;
35pub mod error;
36pub mod mvt;
37pub mod ogc_features;
38pub mod ogc_tiles;
39pub mod ogc_tiles_server;
40pub mod style;
41pub mod tile_cache;
42pub mod wcs;
43pub mod wfs;
44pub mod wps;
45
46// Re-export main types
47pub use csw::{CswState, MetadataRecord};
48pub use error::{ServiceError, ServiceResult};
49pub use mvt::{
50 MvtFeature, MvtGeometryType, MvtLayer, MvtLayerBuilder, MvtTile, MvtValue,
51 build_tile_from_features, close_path, decode_zigzag, delta_encode, encode_varint,
52 encode_zigzag, line_to, linestring_geometry, move_to, point_geometry, polygon_ring_geometry,
53 polygon_rings_geometry, scale_to_tile,
54};
55pub use ogc_tiles::{
56 ConformanceDeclaration, CornerOfOrigin, GeographicBoundingBox, TileDataType, TileLink,
57 TileMatrix, TileMatrixSet, TileSetMetadata, lonlat_to_tile, tile_children, tile_parent,
58 tile_to_bbox, tile_to_pixel_bounds, tiles_in_bbox, validate_tile_coords,
59};
60pub use ogc_tiles_server::{OgcTilesState, TileFeatureProvider};
61pub use wcs::{CoverageInfo, CoverageSource, WcsState};
62pub use wfs::{FeatureSource, FeatureTypeInfo, WfsState};
63pub use wps::{Process, ProcessInputs, ProcessOutputs, WpsState};
64
65/// Library version
66pub const VERSION: &str = env!("CARGO_PKG_VERSION");
67
68#[cfg(test)]
69mod tests {
70 use super::*;
71
72 #[test]
73 fn test_version() {
74 assert!(!VERSION.is_empty());
75 }
76}