Skip to content

feat: Import Places / Activities From Keyhole Markdown (KMZ/KML)#488

Closed
biasutti wants to merge 9 commits intomauriceboe:devfrom
biasutti:feat/places-kmz-kml-import
Closed

feat: Import Places / Activities From Keyhole Markdown (KMZ/KML)#488
biasutti wants to merge 9 commits intomauriceboe:devfrom
biasutti:feat/places-kmz-kml-import

Conversation

@biasutti
Copy link
Copy Markdown

@biasutti biasutti commented Apr 7, 2026

See points to discuss

Feature summary:

  • Add fileupload dialog to import places from .kmz and .kml files. This open format is used by Google MyMaps and Google Earth etc.
  • Parse provided folders and match to existing categories for places.

Tests:

  • Implemented integration tests
  • Conducted local testing with provided test files in test fixture folder

Points to discuss / maybe further merge requests:

  1. Button placement in sidebar. Currently I added a third option between GPX and Google Lists. This causes problems with the length of the label KMZ / KML and further extensibillity of the sidebar. Any suggestions / wishes on label name or button placement.
grafik
  1. The implementation in the frontend is prepared to support further formats. A GPX integration into the same dialog would also be possible. This would free up some space in the sidebar. What are your thought on this?

  2. Not all imported data can be matched to some places on Google maps. This causes some 404 api errors when loading images for those place. I have to look further into it what a solution could look like.


Update to discussion-point 3.:
The picture cant be found for some places as the KMZ import does not provide a Google PlaceID and therefore the picture search algo is using a fallback with coordinates which not always returns a picture.
Currently for every unmatched place there is a warning in the log:
[WARN] 2026-04-07T19:31:17 GET /place-photo/coords%3A34.951474%3A135.7923898 404 1ms ip=::1
Are we okay with this warning as its not directly caused by this change or should I improve this?

@biasutti biasutti changed the title [FEATURE] Import Places / Activities From Keyhole Markdown (KMZ/KML) feat: Import Places / Activities From Keyhole Markdown (KMZ/KML) Apr 7, 2026
…port

# Conflicts:
#	server/tests/integration/places.test.ts
@jubnl jubnl added the approved on discord Discussed and greenlit on discord label Apr 7, 2026
@biasutti biasutti marked this pull request as ready for review April 8, 2026 16:48
jubnl added a commit that referenced this pull request Apr 15, 2026
Resolves conflicts with Naver list import (PR #662) — kept both unified
list-import dialog and new KMZ/KML dialog. Dropped duplicate react-dom
import and unused CustomSelect import from PlacesSidebar.
jubnl added a commit that referenced this pull request Apr 15, 2026
- Strip BOM (U+FEFF) from 14 translation files injected by editor
- Guard KMZ unpack against zip-bomb: check entry.uncompressedSize against
  50 MB cap (KMZ_DECOMPRESSED_SIZE_LIMIT) before calling .buffer();
  limit is an exported constant so tests can override it
- Fix non-BMP HTML entity decoding: replace String.fromCharCode with
  String.fromCodePoint + 0x10FFFF bounds check so emoji like 😀
  round-trip correctly
- Switch KML namespace stripping from regex to fast-xml-parser's
  removeNSPrefix option; XMLValidator accepts namespaced XML natively,
  making the pre-strip step unnecessary
- Remove dead skippedCount overwrite after transaction; per-loop
  increment already tracks it alongside per-item error messages
- Type multer req.file as Express.Multer.File on both /import/gpx
  and /import/map routes instead of (req as any).file
- Add unit tests: emoji entity decoding (decimal + hex), KMZ zip-bomb
  rejection, KMZ-with-no-KML rejection
@jubnl
Copy link
Copy Markdown
Collaborator

jubnl commented Apr 15, 2026

Closed in favor of #663

@jubnl jubnl closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved on discord Discussed and greenlit on discord

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants