A fully offline geographic knowledge system for Obsidian. Bring your own GPS history (CSV / GPX exports from any tracking app) and Atlas Compass turns it into an interactive, completely offline world map with travel statistics — no network access required, ever.
Download main.js, manifest.json, styles.css from the latest release into <vault>/.obsidian/plugins/atlas-compass/, then enable the plugin.
Data folder (optional). Everything needed for daily use is embedded in the bundle: country, province, and city boundaries (China & Japan), the 34,149-city library, and the coverage grid — the map is fully functional straight from the release. The repository's data/ folder (about 75 MB) only adds high-detail boundary rendering when zoomed in past z7 (LOD hot-swap). To install it:
git clone --depth 1 https://github.com/Loulan23253/atlas-compass.git
cp -R atlas-compass/data <vault>/.obsidian/plugins/atlas-compass/
Then restart Obsidian.
type: city frontmatter) manually or import from CSV/JSON.Travel/.Atlas Compass performs zero network requests. All boundaries, the city library, and the coverage grid ship inside the plugin's data/ folder. The only optional network feature is geocoding for the manual "add city" flow, which you can disable by leaving the endpoint setting on Photon or replacing it — no track, location, or vault data ever leaves your device.
完整的中文文档见下方(The rest of this README is in Chinese).
一个功能强大的 Obsidian 旅行地图插件,支持完全离线的世界地图和中国、日本的市级行政区划。
[[提到]] 但未建档的城市,一键创建并自动定位| 分隔)、最近访问、备注、类型(city/place)Travel/轨迹/日期.geojson 并在地图上显示(GPS 按钮开关);可选「自动记录到访城市」,按天驻留分析判定到访城市(中国、日本等已配置市级数据的国家)写入城市笔记:「常用地点」(设置里指定)按月简化,其他城市记完整日期,未建档的自动创建trips/transport);行程内驻留按 150m 邻接聚簇、簇时长 ≥10 分钟识别;「到访判定」(设置里)分三档:宽松 = 当天打点即可,标准 = 当天在该市累计 ≥2h 或单段连续 ≥30min,严格 = 当天累计 ≥6h;CSV 里的 accuracy/speed/altitude 列直接参与识别ignoredTs)可审计segments/transport 属性同步更新)Travel/国土覆盖率.md;地图左上角「格」按钮可在地图上直接画出点亮的格点(半透明矩形)Travel/年度回顾/年份.md——到访城市数、新增城市、到访排行、月度分布Travel/旅程/ 笔记(frontmatter 含 start/end/cities/km,正文逐日表格)Travel/照片足迹.md.gpx 文件走与 CSV 相同的清洗/识别管线(多 trkseg、海拔)atlas_v3/
├── data/
│ ├── countries.geojson # 国家边界 (819KB)
│ ├── admin1.geojson # 世界省级边界 (39MB)
│ ├── admin1.lo.geojson # 省级 LOD 简化版 (18MB,启动加载)
│ ├── worldcities.json # 全球城市兜底库 34,149 城 (3.3MB)
│ ├── chinacells.txt # 中国国土覆盖率 geohash 格点 (2.4MB)
│ └── admin2/
│ ├── china_admin1.geojson # 中国省级 (569KB)
│ ├── china_admin2.geojson # 中国地级市 (3.2MB)
│ ├── china_admin2.lo.geojson # 中国地级市 LOD 简化版 (2.6MB)
│ ├── jpn_admin2.geojson # 日本市町村 (2.6MB)
│ └── jpn_admin2.lo.geojson # 日本市町村 LOD 简化版 (1.4MB)
└── src/
└── map/
├── GeoJsonLoader.ts # 多级数据加载器
└── MapView.ts # 地图渲染引擎
其中 .lo.geojson 简化边界由 npm run lod 重生成(道格拉斯-普克逐环简化,脚本为 scripts/generate-lod.mjs);chinacells.txt 由 npm run cells 重生成(Natural Earth 中国边界栅格化,脚本为 scripts/generate-cells.mjs)。其余为来源数据,更新后可直接运行对应脚本重算派生产物。
.obsidian/plugins/atlas_v3/npm installnpm run buildfra_admin2.geojson),没有则提示在笔记的 frontmatter 中添加:
---
type: city # 或 place
name: 城市名称
country: 国家
lat: 39.9042
lng: 116.4074
visits: 3
lastVisit: 2024-01-15
---
| 选项 | 说明 |
|---|---|
| 旅行笔记根目录 | 扫描此目录下的笔记 |
| 日记链接扫描 | 已改为全库扫描:任何目录下形如 2026-08-07.md 的日记都参与 [[城市]] 链接统计与到访派生,无需配置 |
| 默认地图中心 | 地图初始中心点(可用「采用当前视野」一键取自地图) |
| 默认缩放 | 地图初始缩放级别 |
| 常用地点 | 常住地城市名(如「苏州市」):GPS 导入时该城市按月简化记录,其他城市记完整日期;留空则全部完整日期 |
| 到访判定 | GPS 轨迹怎样算「到访」:宽松 = 当天打点即可;标准 = 当天累计 ≥2h 或单段 ≥30min;严格 = 当天累计 ≥6h |
| 地理编码服务(自动定位) | Geocoding 服务地址(默认 Photon 免 key,可换 Nominatim) |
| 数据 | 来源 | 说明 |
|---|---|---|
| 国家边界 | Natural Earth | 全球 200+ 国家 |
| 省级边界 | Natural Earth | 全球省/州级 |
| 中国地级市 | DataV GeoAtlas | 阿里云数据可视化 |
| 日本市町村 | GADM 4.1 | 全球行政区划数据库 |
# 安装依赖
npm install
# 开发模式(监听文件变化)
npm run dev
# 生产构建
npm run build
MIT License