oxigdal_services/lib.rs
1//! OxiGDAL 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 style;
40pub mod tile_cache;
41pub mod wcs;
42pub mod wfs;
43pub mod wps;
44
45// Re-export main types
46pub use csw::{CswState, MetadataRecord};
47pub use error::{ServiceError, ServiceResult};
48pub use mvt::{
49 MvtFeature, MvtGeometryType, MvtLayer, MvtLayerBuilder, MvtTile, MvtValue, close_path,
50 decode_zigzag, delta_encode, encode_varint, encode_zigzag, line_to, linestring_geometry,
51 move_to, point_geometry, polygon_ring_geometry, scale_to_tile,
52};
53pub use ogc_tiles::{
54 ConformanceDeclaration, CornerOfOrigin, GeographicBoundingBox, TileDataType, TileLink,
55 TileMatrix, TileMatrixSet, TileSetMetadata, lonlat_to_tile, tile_children, tile_parent,
56 tile_to_bbox, tile_to_pixel_bounds, tiles_in_bbox, validate_tile_coords,
57};
58pub use wcs::{CoverageInfo, CoverageSource, WcsState};
59pub use wfs::{FeatureSource, FeatureTypeInfo, WfsState};
60pub use wps::{Process, ProcessInputs, ProcessOutputs, WpsState};
61
62/// Library version
63pub const VERSION: &str = env!("CARGO_PKG_VERSION");
64
65#[cfg(test)]
66mod tests {
67 use super::*;
68
69 #[test]
70 fn test_version() {
71 assert!(!VERSION.is_empty());
72 }
73}