Skip to content

Tracking: QGIS project and style import parity #882

Open

Description

@pick2510

Tracking issue for opening QGIS projects and styles in RustGIS as QGIS draws them. Each piece below gets its own pull request, or a few (piece 1 had a proposal issue, #883; with the plan agreed, the later pieces go straight to pull requests); this issue keeps the order and links them.

Where it stands

The pieces

Ordered by how often real projects (SMV25 and the Training Manual) hit them, and whether RustGIS already has the feature. Mapping means the importer reads QGIS's setting into something RustGIS has; feature means RustGIS needs it first.

# Piece Kind Crates Size
1 #883, #885 Geographic coordinate systems: a project in EPSG:4326 (9 of the real projects) opens in Equirectangular instead of Web Mercator, as QGIS draws it mapping engine small
2 #900 Markers along lines and hash lines: interval, placement (vertices, first/last, centre), rotation with the line (SMV25: railways, boundaries) feature map, render medium
3 Font markers: a character from a font as a point symbol, with rotation (SMV25: 12 layers of map signs). 3a #926: the character, on points and along lines. 3b #933: several marks stacked on a point (half of SMV25's signs are a white character under a coloured one), their offsets, and rotation by a field (SMV25: - "WINKEL") feature map, render medium
4 Labels. 4a #964: halo colour and width, letter spacing (SMV25: 129 of 140 label classes have a 0.5 mm white halo, 31 use letter spacing). 4b: offsets from a point and backgrounds (#1007), then wrapping and repeat along lines (#1014), both merged, as plain label settings that #995 (a label engine with candidate positions; its part 1a, other positions round a point, is #1025, merged) builds on; the distance from a line goes to #995's step 2 feature map, render large
5 Fills. 5a #1022: several fills per symbol (and per class), the line brushes and line pattern fills as hatch lines, point pattern fills as markers on a grid (SMV25: 296 simple fills, 6 line and 5 point pattern fills, 18 symbols of two or three fill layers). 5b #1104: gradient (linear, radial, conical) and shapeburst fills, with their colour ramps feature map, render medium
6 Data-defined properties: size, colour, rotation by field, on symbols and labels. One track with piece 7, expressions first (a field is the simplest expression): part 2 #1185 (merged): symbol size, colours, outline width and angle by expression, QGIS's data-defined symbol settings carried over; part 3 #1309 (merged): label text, size, colour and angle by expression, QGIS's label text expressions and data-defined label settings carried over feature map, render medium
7 Expressions: an expression language for feature layers (arithmetic, functions, CASE) for filters, label text and data-defined values; QGIS expressions translated to it. Part 1 #1164 (merged): the language, grown from the WHERE clause language (every clause selects the same rows), used by queries and Calculate Field; part 4 #1314 (merged): Unique Values by expression, the importer's filters and rule-based renderers through it feature data, map large
8 Renderers: rule-based renderers beyond the SQL subset (came with #1314, as Unique Values by expression); left: inverted polygons, merged features, heat maps, none of which RustGIS draws yet (SMV25 uses none) feature map, render medium
9 Symbols: SVG and image markers on feature layers, arrows, draw effects (shadow, glow). RustGIS's markers are still shapes and font characters; the largest drawing gap left for SMV25 (its line-end pictures and SVG signs). Image markers under #2266 (RasterMarker merged in #2612, SvgMarker in #3091 and #3223); arrows and draw effects not started feature map, render large
10 Sources: SpatiaLite, SQL Server, ArcGIS feature and map servers, WCS, vector tiles, delimited text with WKT, memory layers with their features, virtual layers through sql.query. RustGIS now reads SQL Server and ArcGIS FeatureServer, MapServer and WCS services. 10a #2354 (merged): vector tiles (MBTiles, PMTiles, QGIS 4's providers), GPX, memory and virtual layers, database tables with a saved connection; 10b #2471 (merged): the web services mapping engine, map medium
11 Project structure: groups (opacity, scale range), bookmarks, time settings, relations; notes for map themes, variables, joins, virtual fields. RustGIS now has all four: nested groups with opacity and scale range (#1102), bookmarks, time settings (time.*) and relations (data.relate); groups: #1836 (merged); bookmarks, time settings and relations: #1847 (merged). Map themes, saved joins and virtual fields have no RustGIS equivalent yet and stay notes mapping engine, map medium
12 Print layouts: QGIS layout items, page sizes, map item extent, scale and theme, the atlas, onto RustGIS layouts (the atlas onto a layout's map series) mapping engine, map large
13 Annotations and diagrams: the QGIS annotation layer as a graphics layer; per-feature diagrams (RustGIS draws pie and bar diagrams since #1048, so these are now a mapping). Diagrams: #1691 (merged), pies carried over, histograms, stacked bars and text diagrams noted. Annotations (13b): onto RustGIS's graphics layers (text, shapes, pictures): #1790 (merged) mapping engine, map medium
14 Round trip: project.exportQgis and style.exportQgis, tested by reading back feature map, engine large

Order from here. The table keeps its numbers (pull requests refer to them), but RustGIS has since gained what 10, 11, 12 and 13b map onto, so they are now importer work only. They go first, cheapest and most common first: 13b (annotations, merged with #1790), 11 (project structure: every project has groups), 10 (sources). Then 9 (symbols: the largest drawing gain for SMV25), 12 (layouts, large), 8 (renderers RustGIS lacks, rare in the real projects) and 14 (export).

Related but separate: #769 (WMTS tile matrix sets other than Web Mercator, now closed; WMS and WMTS layers in other coordinate systems came with #1127) affects QGIS projects only through their WMTS and tile layers. #1102 (nested layer groups) lets piece 11 carry QGIS's group tree over as it is, rather than flattened.

How each piece is tested

  • Unit tests: in crates/map/src/qgis/tests.rs, written in the shapes QGIS writes, for each setting read.
  • Corpus: every_corpus_file_reads over crates/map/testdata/qgis/ (test(map): a corpus of QGIS projects and styles the importer reads #881). A piece that needs a setting the corpus lacks adds a file through generate.py.
  • Engine tests: for the commands (project.importQgis, style.importQgis), including hostile_params_never_panic.
  • Rendering pieces (2–9): a render test in crates/render, plus a comparison with QGIS on SMV25 (downloaded, not in the repository) at fixed extents reported in the pull request (the pixel difference before and after).

Not planned

Mesh, point cloud and tiled-scene layers (no RustGIS equivalent), 3D views, layer actions, forms and editing widgets: noted on import.

Pieces 1 to 7, 10, 11 and 13 are merged (10: #2354 and #2471; 11: groups in #1836, bookmarks, relations, rotation and time in #1847; 13: diagrams in #1691, annotations in #1790); the pull requests are listed under Where it stands.

Activity

  1. pick2510 commented on Oct 25, 2026

    @pick2510
    ContributorAuthor

    @giswqs Any comments on this plan, the order or the scope? Piece 1 is proposed in #883 and implemented as a draft in #885; I'll mark it ready once you're fine with the approach.

  2. giswqs commented on Oct 25, 2026

    @giswqs
    Member

    @pick2510 This is a great plan! Thank you for putting it together. Just added you to the RustGIS-Maintainers team. Keep going.

  3. pinned this issue on Oct 25, 2026
  4. pick2510 commented on Oct 25, 2026

    @pick2510
    ContributorAuthor

    Great. I will continue with the stepwise implementation.

  5. 38 remaining items

  6. pick2510 commented on Nov 30, 2026

    @pick2510
    ContributorAuthor

    Piece 12: print layouts — plan

    Today a project's layouts are noted as left out (its print layouts (n)). RustGIS already has what they map onto (layouts with map frames, text, pictures, scale bars, north arrows, legends, tables, shapes, lines and a map series), so this is importer work: each QGIS layout comes in as a RustGIS layout of the project, its map frames showing the map the import makes. What can't be carried over is noted per layout and item kind, with a count.

    12a: pages and the items that stand alone

    • The layout's name and its first page's size (positions and sizes in mm, cm, in, pt or px converted to mm). Further pages noted (a RustGIS layout has one page).
    • Map items as map frames: the extent read in the project's coordinate system and placed as centre and scale; rotation as bearing; the frame's outline. Grids, overviews (as an extent indicator), locked layers and map themes come in 12b, or are noted.
    • Labels as text: font size, weight, colour, alignment, rotation, margins; [% … %] expressions as RustGIS's tokens where one matches (title, date, scale), otherwise kept as text and noted.
    • Pictures (a file, its resize mode), rectangles and ellipses (fill, outline, corner radius), polylines and polygons as lines (a polygon's outline). Items' backgrounds and frames as element backgrounds; opacity, blend modes, rotation of items other than text, groups and hidden items noted or carried over where RustGIS has them.
    • Drawing order kept. Items excluded from exports, and HTML, 3D map, elevation profile, chart and manual-table items noted.

    12b: surrounds tied to a map: scale bars (units, segments, style, label size), north arrows (QGIS's north-arrow picture following a map), legends (title, columns, the layers it lists and their labels), map grids, overviews.

    12c: tables and the atlas: attribute tables as tables of the layer they name; the atlas as a map series (the coverage layer, the page name from a field, the margin), noting what a map series doesn't do (sorting, filtering, expressions beyond a field).

    Testing: unit tests in the shapes QGIS writes; new generated projects from generate.py (an A4 map sheet, items in each unit, rotated and grouped items, several pages, an atlas); engine tests for project.importQgis; and each part's layouts rendered beside QGIS's own export of them, the pixel difference reported in the pull request.

    The import itself: layouts land with the map. Their frames name the map by its final name (when a map of that name exists, the imported one is renamed, Title2), and Undo removes both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions