1.6 KiB
Architecture
Geo Tools is a static React/Vite application wrapped in the shared Toolbox shell. geo/formats.ts parses GeoJSON, GPX, KML or a narrow coordinate-CSV dialect into a project-owned FeatureCollection model covering Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and recursively bounded GeometryCollection values plus scalar properties. Conversion serialises that model and returns visible loss notes where a target format must flatten structure.
geo/model.ts validates WGS 84 coordinate ranges and enforces collection-wide coordinate, geometry-count and nesting-depth limits. geo/analysis.ts computes bounds, haversine line distance and elevation changes, and performs iterative Douglas–Peucker simplification across relevant nested path members. The local sketch projects every supported geometry path only into its own SVG viewport; it loads no basemap, tiles or projection service.
geo/editor.ts assigns stable feature/geometry/coordinate paths across the complete geometry union, performs immutable point or feature replacement, and sends every result back through the common validator before returning it. Track summaries recurse through GeometryCollections, and direction reversal is limited to line geometries. The local ruler returns a spherical distance, initial bearing and coordinate midpoint; it does not imply a routing path or projected measurement.
XML input is lexically bounded before DOM construction and rejects DOCTYPE, entity and stylesheet declarations. Version 0.1 uses no worker, storage or server API. Relative entry and asset URLs keep the build relocatable below a nested portal path.