Add WGS84 coordinates and simplified geometries to admin units - #13
Merged
Conversation
New `ltlod-geo` tool (etl/tools) reprojects the AR spatial models
(gra{apskritis,savivaldybe,seniunija,gyvenamojivietove}, LKS-94/EPSG:3346)
to WGS84 and emits, per admin unit, into a merged-on-load *-geo.trig:
- geo:lat/geo:long representative point (all four levels) — WGS84 Basic Geo,
what LinkedDataHub's map-marker path keys on.
- gs:asWKT simplified boundary (coarse levels: counties/municipalities/
elderships) — GeoSPARQL wktLiteral, bare WGS84 lon-lat, Douglas-Peucker
simplified (~50 m) since LDH does no client-side simplification and the raw
polygons are ~160 MB. Placed directly on #this so the map feature id is the
unit URI. Settlements stay point-only (20k detailed polygons too heavy).
Map wiring: :SubUnits (app/ns.ttl) and a new frontpage counties map
(app/root.ttl) use ac:MapMode. files/overrides.xsl drops the bulky WKT literal
from the property-list rendering (kept in the data so the map still draws it).
Also: optional geo:lat/long + gsp:asWKT in the admin-units SHACL shape;
ONTOLOGY-NOTES.md and CLAUDE.md document the vocabulary choice, the EPSG:3346
(Northing, Easting) axis-order gotcha, and the on-#this modeling.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The admin-unit *-geo.trig files are overlays (geo:lat/geo:long/gs:asWKT onto the entity docs' graphs, merged on load), like alignments.trig — they carry no per-graph dct:title/foaf:primaryTopic, so the strict validate.sh graph-invariant check rejects them. Route them through shacl.sh only, same as alignments/photos. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Admin units now carry WGS84 geographic data so LinkedDataHub renders them in map mode (
ac:MapMode).New
ltlod-geotool (etl/tools) reprojects the AR spatial (erdviniai duomenys) models from LKS-94/EPSG:3346 to WGS84 and emits, into a merged-on-load*-geo.trigper level:geo:lat/geo:longrepresentative point — all four levels (counties, municipalities, elderships, settlements). WGS84 Basic Geo; the map-marker path.gs:asWKTsimplified boundary — coarse levels only (counties/municipalities/elderships). GeoSPARQLwktLiteral, bare lon-lat, Douglas–Peucker simplified (~50 m).Why simplified / coarse-only
LDH does no client-side simplification and the raw source polygons total ~160 MB. Simplifying (~95–99 % fewer vertices, visually identical at map zoom) keeps the committed coarse geometry ~2.5 MB and the browser map fast. Settlements stay point-only (20,880 detailed polygons are too heavy);
settlements-geo.trigremains gitignored bulk.Map wiring
:SubUnits(app/ns.ttl) and a new frontpage counties map (app/root.ttl) useac:MapMode— no XSL change needed (map.xslships via the stockclient.xsl).files/overrides.xsldrops the bulky WKT literal from the property-list rendering; the map reads it straight from the RDF/XML DESCRIBE, so the polygon still draws.Modeling notes
gs:asWKTsits directly on#thisso the OpenLayers feature id is the unit URI (clickable → the unit's info-window).ol.format.WKT).Verification
riot --validate, base-independent round-trip, SHACL conforms with the new geo/geometry shape.make sefrecompiles the client SEF cleanly with the WKT suppression.Coverage (spatial registry ⊂ attribute registry): counties 10/10, municipalities 60/60, elderships 536/584, settlements 20,880/26,229.
Deploy
Not run here:
make load(loads the new*-geo.trig) +make install(pushes the MapMode views) + recreate thelinkeddatahubcontainer (reload the rebuilt SEF).🤖 Generated with Claude Code