Skip to content

Read and draw maps in the standalone viewer and the tray - #916

Merged
SimonCropp merged 1 commit into
mainfrom
viewer-maps
Oct 3, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
viewer-maps

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

DiffEngineViewer can now compare maps, read and drawn with GeoConvert 2.1.0. As with documents, this only happens in the standalone tool (DiffEngineViewer.Windows / .Mac / .Linux) and the viewer installed with DiffEngineTray. The copy bundled in the DiffEngine package doesn't change.

What it does

  • A map is one picture, like an SVG. It gets the same three views (text and picture, picture only, text only) and no page buttons. The status line says drawn the same or drawings differ.
  • Text.
    • .geojson, .topojson, .kml, .gpx and .wkt show the file itself.
    • .kmz, .wkb, .fgb and .geoparquet show their features as GeoJSON, read in the background the way a PDF's text is.
  • Drawing uses GeoConvert's built-in rasterizer at 2048 pixels on the longer side. It has no dependencies, so it can't drift from the SkiaSharp version Morph pins, and it draws the same bytes everywhere.
  • A map with no features fails with "The map has no features to draw."
  • Routing. Unlike .svg, DiffEngine doesn't treat .geojson, .kml or .gpx as text. So all nine extensions are offered to the viewer, and only when the copy it resolved has the documents folder, as for PDFs.
  • Left out:
    • Shapefiles, because they're a set of files and a snapshot is one.
    • .json and .csv, which would claim every JSON and CSV snapshot.
    • Plain .parquet, which mostly isn't geographic.

How

  • DocumentFile.IsDrawn is split in two. It used to answer two questions at once, because an SVG gives the same answer to both. A FlatGeobuf doesn't: it's one picture, but its text is read out of it.
    • IsDrawn now means "one picture", which is what the screen code uses.
    • The new IsSource means "the text is the file", which FileSide uses.
  • DocumentExtensions.Routed replaces Paged as the list DiffEngine offers the viewer. It's the paged formats plus the maps.
  • Packages. Each tool package and the tray gain GeoConvert.dll (about 390 KB) and System.IO.Hashing.dll (about 55 KB). Both are in the third-party notices.

Tests

  • Side reads for a GeoJSON file (its text is the file) and a FlatGeobuf file (text still being read), both drawn as one picture.
  • Real renderer tests:
    • A map draws one PNG, the same bytes every time, and a moved point changes them.
    • The FlatGeobuf sample reads as GeoJSON.
    • An empty map fails with the message above.
  • Routing to the viewer for .pdf, .geojson and .fgb, both with and without the documents folder.
  • Package entry lists updated for the two new assemblies.
  • Local Windows Release run: 2350 passed, 0 failed, 24 skipped.

@SimonCropp
SimonCropp merged commit 4de10e4 into main Oct 3, 2026
10 checks passed
@SimonCropp
SimonCropp deleted the viewer-maps branch October 3, 2026 00:39
@SimonCropp SimonCropp added this to the 20.7.0 milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant