2
0
Fork 0
mirror of https://github.com/Mallne/DC-AreaAssist-Shared.git synced 2026-11-22 20:42:57 +01:00
No description
  • Kotlin 90.5%
  • TypeScript 8.3%
  • HTML 0.6%
  • CSS 0.6%
Find a file
Gamaliel Krauße 81960d09c8
Merge pull request #94 from Mallne/renovate/maplibre-gl-6.x-lockfile
chore(deps): update dependency maplibre-gl to v6.19.0
2026-11-20 10:23:24 +01:00
.ai **chore(areaassist): remove Playwright-based e2e contract tests** 2026-10-26 15:02:46 +01:00
.forgejo/workflows Add Actions workflows for PR checks, releases, and snapshots across multiple projects 2026-10-22 16:07:08 +02:00
.github/workflows Disable push trigger for "Publish SNAPSHOT" workflows across multiple modules. 2026-10-22 17:36:36 +02:00
gradle feat(areaassist): enhance Esri/WFS adapters and expand BrightSky weather integration 2026-11-20 10:20:25 +01:00
kotlin-js-store feat(areaassist): enhance Esri/WFS adapters and expand BrightSky weather integration 2026-11-20 10:20:25 +01:00
src feat(areaassist): enhance Esri/WFS adapters and expand BrightSky weather integration 2026-11-20 10:20:25 +01:00
tools/boundary-exporter chore(deps): update dependency vite to v8 2026-10-17 19:42:48 +00:00
.gitignore Refactor parcel data models and introduce Playwright API tests 2026-10-15 14:43:38 +02:00
AGENTS.md **chore(areaassist): remove Playwright-based e2e contract tests** 2026-10-26 15:02:46 +01:00
build.gradle.kts feat(areaassist): enhance Esri/WFS adapters and expand BrightSky weather integration 2026-11-20 10:20:25 +01:00
gradle.properties chore: bump version to 1.0.6-SNAPSHOT [skip ci] 2026-10-16 15:28:57 +02:00
gradlew fix: proper gradle wrapper, conditional signing, updated workflows 2026-09-19 10:10:55 +02:00
gradlew.bat chore(deps): update gradle to v9.9.1 2026-11-11 22:00:56 +00:00
LICENSE Create a shared Library for all shared Code between Codex and the app 2025-08-17 11:33:49 +02:00
OpenData.http Add WFS models, serialization logic, and dependencies for geospatial data querying. 2025-09-12 15:40:12 +02:00
pnpm-lock.yaml chore(deps): update dependency maplibre-gl to v6.19.0 2026-11-20 09:22:46 +00:00
pnpm-workspace.yaml **feat(areaassist): migrate boundary models to compatible geojson-based structures** 2026-10-17 21:40:35 +02:00
README-api-contract-tests.md **chore(areaassist): remove Playwright-based e2e contract tests** 2026-10-26 15:02:46 +01:00
README.md feat(areaassist): enhance Esri/WFS adapters and expand BrightSky weather integration 2026-11-20 10:20:25 +01:00
renovate.json chore(ci): remove drone and teamcity from renovate auto-merge list 2026-11-17 12:26:14 +01:00
settings.gradle.kts feat(areaassist): enhance Esri/WFS adapters and expand BrightSky weather integration 2026-11-20 10:20:25 +01:00

DiCentra AreaAssist Shared

DiCentra Kotlin License Kotlin Multiplatform

DiCentra AreaAssist Shared is the foundational Kotlin Multiplatform library for the AreaAssist framework. It provides a standardized data model for land parcels (Flurstücke) and powerful integration adapters to fetch spatial data from various public and private GIS services.

🚀 Key Features

  • Multiplatform Core: Shared logic and models for Android, iOS, JVM, JS, WasmJS, and Linux.
  • Unified Parcel Model: A robust domain model that abstracts away the differences between various GIS data providers.
  • Aviator Integration: Leverages the Aviator framework for flexible, staged data fetching and transformation.
  • Spatial Adapters: Built-in support for ESRI ArcGIS REST API and OGC Web Feature Service (WFS).

🧩 Aviator Plugins

AreaAssist Shared uses the Aviator plugin system to handle the complexities of different GIS protocols. These plugins act as "interceptors" and "transformers" in the data fetching pipeline.

The WFS and Esri plugins are client plugins requested through operation materialization. The bundled Esri document currently has no operations; reusable Esri parcel definitions in ParcelConstants are not automatically published by that document.

Weather workflows

APIs.weatherWorkflowDefinitions exposes portable Arazzo JSON plus locator and coverage metadata. The source URNs in WeatherWorkflows.sources identify bundled OpenAPI documents and must be resolved by the host; they are not network URLs. The host supplies provider selection, engine registration and step input/result mapping. These are not yet wired into Codex or the app. The Open-Meteo workflow maps neutral lat/lon inputs to the provider's latitude/longitude and explicitly requests weather variables, timezone and wind units; those are not implicit OpenAPI defaults. Direct consumers of the Open-Meteo operation must provide its provider-specific parameters themselves.

The providerResponse workflow output is the source HTTP JSON, not a WeatherReport. Weaver produces the normalized report separately as the client result. Aviator's current Weaver plugin mutates response content during transformation. A host needing a source ResponseSnapshot can install a new SourceResponseCapture in the invocation's coroutine context; Aviator populates it before client response plugins execute. Captures are per invocation and must not be shared across parallel calls. toArazzoSnapshot() maps the captured status, headers and body to an orchestration snapshot, decoding valid UTF-8 JSON for Arazzo expressions while preserving invalid or non-JSON bodies as bytes and distinguishing absent from empty bodies. Aviator's MaterializedOperationBinding preserves source bytes, but the current Arazzo expression evaluator does not directly interpret byte-valued snapshots as JSON. The JVM workflow tests exercise the capture and conversion with mock transport; host wiring and live-provider behavior remain unverified.

The bundled weather documents are authored with Aviator's Arazzo document DSL and serialized as portable JSON for distribution.

Shared targets Aviator 1.0.6-SNAPSHOT, including its Arazzo and orchestration artifacts. Composite builds use the checked-out Aviator sources. Standalone builds require those matching artifacts to be published to the configured authenticated registry; composite substitution does not verify that publication. A local isolated-Maven check has compiled Shared and passed its JVM tests without any composite builds using staged Aviator 1.0.6-SNAPSHOT artifacts. Other DiCentra dependencies were staged from their local sources under the versions declared by Shared for that check; it does not prove the registry contains those artifacts or verify standalone non-JVM variants.

📍 EsriAdapterPlugin

The EsriAdapterPlugin is designed to interact with ESRI ArcGIS Feature Servers.

  • Capabilities:
    • Automatic conversion of AreaAssistParameters (like boundaries and queries) into ESRI-specific where clauses and geometry envelopes.
    • Handles coordinate system transformations (defaults to EPSG:4326).
    • ExceededTransferLimit Handling: Automatically detects when a service returns partial results due to transfer limits and throws a specialized exception.
    • GeoJSON Inflation: Efficiently parses ESRI GeoJSON responses into high-level ParcelCrateEntity objects.

🌐 WfsAdapterPlugin

The WfsAdapterPlugin provides support for the OGC Web Feature Service (WFS 2.0.0) standard, commonly used by European public "Open Data" portals.

  • Capabilities:
    • XML/GML Support: Generates complex GetFeature POST requests with Filter Encoding (FES).
    • CRS Management: Integrated with Geokit to handle on-the-fly coordinate transformations between the client ( usually WGS84) and the service (e.g., ETRS89 / UTM).
    • Flexible Configuration: Supports custom typeNames, namespaces, and geometry pointers.

📋 Predefined Values (PreDefined)

To ensure interoperability between different data sources (e.g., Thuringia vs. Saxony), AreaAssist uses a set of * PreDefined* keys. These keys act as "semantic anchors" for parcel data.

When configuring a service, you map the provider's specific field names (references) to these predefined identifiers.

Key Description
PARCELID Unique identifier for the parcel (e.g., Flurstückskennzeichen).
PLOT The human-readable parcel number (e.g., 123/4).
PLOT_NUMERATOR The "Zähler" of the parcel number.
PLOT_DENOMINATOR The "Nenner" of the parcel number.
AREA The official area size (usually in m²).
DISTRICT The "Gemarkung" (Cadastral district).
DISTRICT_ID The official ID of the Gemarkung.
LOCATION Descriptive location/address (Lagebezeichnung).
USAGE Information about the land use (Nutzungsart).
USAGE_BUILDINGS Boolean flag indicating if the parcel is built upon.

Example Mapping (Thuringia):

DefaultKeys.fillIn(
    parcelId = "flstkennz",
    area = "flaeche",
    district = "gemarkung",
    plotNumerator = "flstnrzae",
    plotDenominator = "flstnrnen"
)

🛠 Tech Stack

  • Data: kotlinx.serialization (JSON & XML), MapLibre SpatialK
  • Network: Ktor Client
  • Spatial: Mallne Geokit (Coordinates, Projections, GeoJSON)
  • Integration: DiCentra Aviator

📦 Installation

Add the following to your build.gradle.kts:

repositories {
    maven("https://registry.mallne.cloud/repository/DiCentraArtefacts/")
}

dependencies {
    implementation("cloud.mallne.dicentra.areaassist:shared:1.0.0-SNAPSHOT")
}

API contract testing

See Opt-in API response tests for Kotlin/JUnit 5 checks using the normal App/Codex mapping pipeline. External tests run only on explicit invocation, not ordinary verification; they replace Shared's Playwright API suite without atomic-schema validation. Unrelated npm tools remain available.

⚖️ License

Licensed under the Apache License, Version 2.0.


Built with ❤️ by Mallne under the DiCentra umbrella