Library phase 1: SQLite item library with folders, migration of old files as layers, import split into items
This commit is contained in:
1 parent
4216211a20
commit
ad8b72c3d3
16 files changed
+897
-499
No files matched your search
@@ -2,7 +2,7 @@
|
||||
:toc:
|
||||
:toclevels: 2
|
||||
|
||||
Status: *proposal, not implemented.* Replaces the file-based store behind
|
||||
Status: *phase 1 implemented* (`lib/maptool/library.rb`, see Decisions); phases 2–4 proposed. Replaces the file-based store behind
|
||||
Tracks & Points (`GpxStore`) with an item-based library that OsmAnd, Locus
|
||||
Map and the MapTool web app can all be synced against.
|
||||
|
||||
@@ -306,13 +306,26 @@ removed once nothing uses them.
|
||||
. Android sync client (one direction), then the other direction if the
|
||||
app APIs allow it.
|
||||
|
||||
== Decisions (phase 1)
|
||||
|
||||
* Migration: each old file → a subfolder named after it, holding the
|
||||
file as one `layer` item still drawn from its GeoJSON — not split into
|
||||
points. Splitting a layer into items can come later if needed; new
|
||||
imports are split right away.
|
||||
* Track waypoints: independent points with an optional `parent_id` (the
|
||||
GPX's single track). The tree draws them with their track; Locus can
|
||||
get them loose in the folder, OsmAnd inside the track's GPX. Both apps
|
||||
import a GPX with tracks and points together; neither exports GeoJSON
|
||||
(Locus imports it, OsmAnd doesn't), so exports are GPX.
|
||||
* Simplified against the schema above: no `sources` table (an item's
|
||||
`source_path` points at the stored upload), no `description`/`bbox`
|
||||
columns (in `properties` / computed when needed), folder styling and
|
||||
`item_links` not yet.
|
||||
* Migration runs on first start (no `library.sqlite` yet); `rake
|
||||
library:migrate` re-runs it (idempotent).
|
||||
|
||||
== Open questions
|
||||
|
||||
* Migration: one subfolder per old file, or the file's items flattened
|
||||
into its directory's folder?
|
||||
* Should a recorded track keep its own waypoints as children (GPX-style)
|
||||
or as independent points in the same folder (Locus-style)? Proposed:
|
||||
independent points.
|
||||
* Folder depth over 3 — fine to require Locus Premium?
|
||||
* Does OsmAnd's AIDL API list existing favorites/tracks? Does locus-api
|
||||
read points/tracks by folder? Decides whether direction 2 can be
|
||||
|
||||
Reference in new issue
Block a user