<< All versions

Skill v1.0.0

currentAutomated scan100/100
kendrick-oppong/geoskills/offline-and-mobile-gis
──Details
PublishedOctober 25, 2026 at 07:58 AM
Content Hashsha256:141781987839f67e...
Git SHAfe4762133b94
──Files
Files (1 file, 4.3 KB)
SKILL.md4.3 KBactive
SKILL.md · 49 lines · 4.3 KB

version: "1.0.0" name: offline-and-mobile-gis description: Use when building offline-capable mapping — offline tile packages (MBTiles), PWA/service-worker map caching, local data sync strategies for field data collection, and conflict resolution for offline-edited geospatial data.


Offline & Mobile GIS

When to use this skill

  • A field-data-collection app that must work with no connectivity
  • "Cache map tiles for offline use" in a PWA or Electron app
  • Syncing locally-edited geospatial data back to a central server, including conflict handling

Core concepts

Offline tile strategy:

  • Package a bounded region's tiles into a single portable file (MBTiles is the standard for offline packages; PMTiles also works well and is simpler to generate/consume) rather than trying to cache an unbounded online tile source opportunistically.
  • Define offline coverage by user selection (draw a region + zoom range to download) rather than trying to cache "whatever was viewed" — predictable storage footprint and clear UX about what's actually available offline.
  • For a PWA, service workers can cache tile requests, but a defined offline region + explicit "download for offline" flow is more reliable than relying on opportunistic browser cache for anything beyond casual reuse.

Local data storage & sync:

  • Store locally-collected data (field survey points, edited geometries) in a local embedded store (see embedded-spatial-sqlite for Electron/desktop; IndexedDB for pure web PWAs) tagged with a local-only ID and sync status.
  • Sync strategy needs an explicit conflict resolution policy decided up front: last-write-wins (simplest, acceptable when concurrent edits to the same feature are rare), field-level merge (more complex, needed when concurrent edits are common), or manual conflict review queue (safest for high-stakes data, adds UX overhead).
  • Track a dirty/synced flag and a lastModified timestamp per local record so the sync process can determine what needs to be pushed and detect conflicts against the server's version.

Checklist

  • [ ] Is offline tile coverage explicitly user-selected (region + zoom range) with a visible storage size estimate before download, rather than implicit/opportunistic caching?
  • [ ] Is there a clear indicator in the UI of what's available offline vs what requires connectivity, so users aren't surprised mid-field?
  • [ ] Is locally-collected data stored with enough metadata (local ID, sync status, timestamp, device/user origin) to support conflict detection on sync?
  • [ ] Is the conflict resolution strategy decided deliberately (last-write-wins vs merge vs manual review) rather than left as an accidental implementation detail?
  • [ ] Does sync handle partial/interrupted connectivity gracefully (resumable upload, retry with backoff) rather than requiring an all-or-nothing sync transaction?
  • [ ] For GPS-collected field points, is accuracy metadata (e.g., horizontal accuracy from the device) captured alongside the coordinate, since consumer GPS accuracy varies significantly by device/environment?
  • [ ] Is there a storage cap / cleanup policy for offline tile packages so device storage doesn't grow unbounded across multiple downloaded regions?

Common pitfalls

  • Relying on browser/service-worker opportunistic caching as the entire offline strategy: unpredictable eviction under storage pressure means "offline mode" can silently fail exactly when it's needed (no connectivity to notice/fix it).
  • No conflict resolution policy at all: two field users editing the same feature offline and syncing later without any defined merge behavior leads to silent data loss (whichever sync happens to run last wins, unnoticed).
  • Not capturing GPS accuracy metadata: field data collected with poor GPS accuracy (dense canopy, urban canyon) looks identical to high-accuracy data without an accuracy field, undermining later QA.
  • All-or-nothing sync transactions: a large batch of offline-collected data failing to sync as a single unit because one record has a problem — prefer per-record sync with per-record error handling and retry.

Related skills

  • embedded-spatial-sqlite — local storage mechanics for Electron/desktop offline apps
  • cloud-optimized-geo-formats — PMTiles as an offline package format
  • geodata-qaqc — validating synced data before it's merged into production datasets
All versions