Repository navigation
Open
Description
Tracking issue for replacing proj4rs, crs-definitions and RustGIS's own CRS tables with terrio-crs, then keeping every feature layer in its own coordinate system with the map reprojecting on the fly. The terrio side is done in opengeos/terrio#936.
Where we are
- Since Keep layers in their own coordinate system and draw them directly #2580, feature layers keep the file's own coordinates and system (
Dataset::coord_crs), and a map in a coordinate system draws them by the direct operation. Since Save layers kept in a project in their own coordinate system (native-coordinates) #2598, a project saves them in that system too (native-coordinates). Since Tools that don't depend on the coordinate system work in their layer's own projected system (#2032 C2e-1) #2611, Overlays and spatial relations work in their layer's own projected system (#2032 C2e-2) #2659, Distances in metres are measured flat in a layer's own projected system (#2032 C2e-3) #2674, Interpolations, Kernel Density, Zonal Statistics and Tabulate Area work from a layer's own projected coordinates (#2032 C2e-4) #2679, Rasterize, raster clip and spectral zones work from a held polygon layer's own coordinates (#2032 C2e-4b) #2686, Training, elevation and the Geostatistical Wizard from a layer's own coordinates (#2032 C2e-4c) #2721 and Engine paths in a layer's own system: Calculate Geometry x/y, XY Table To Point, networks, Simulate, annotation, plugin features (#2032 C2e-5) #2766, the analysis tools, rasterizing and interpolation, the network tools, Simulate, annotation, XY Table To Point and plugin features work in a projected layer's own system (C2e); topology validation since Topology checked in a held layer's own system (#2032 C2e-5) #2771. Since A project coordinate system: new maps and layers start in it (#2032 C3a part 1, C3) #2667, a project can have a coordinate system of its own, which new maps and new empty layers take; Tool outputs, grids and exports default to the project's coordinate system (C3a part 2) #2776 extends it to tool outputs, grids made from points and exports. - Phase C is done: with Field Package lists keep layers in their own coordinate system #3540, a Field Package copy of a layer held in its own system keeps that system, and its list of changes comes back in it (version 2, read since v0.9.0). What's left is Phase D, which waits on [Feature]: Full 3D scenes: heights in the data, 3D objects and point clouds, a scene camera #726 deciding how heights are stored.
- Rasters already stay in their own system and are warped while drawing.
- There are two APIs:
Crs::transformer()(data, to and from lon/lat) andProjector/Flat(the map). With Transform coordinates with terrio-crs (#2032 A1) #2041 both transform through terrio-crs, and since Read ellipsoids through terrio-crs and drop proj4rs (#2032 A2) #2066 proj4rs is gone from the workspace. Since feat(data,map): convert between any two coordinate systems; draw layers from their own (#2032 B1+B2) #2448,Crs::toconverts between any two systems, and since feat(crs): convert between two systems by their direct operation (#2032 B3) #2498 by the direct operation between them. - terrio-crs comes from crates.io releases (0.3.0 since build(deps): terrio-crs 0.3.0 from crates.io instead of the git pin #2933, which replaced the git pin; fix(crs): EPSG:900913 WKT without a shift reads as PROJ does; a set-aside WGS 84 shift is said #2961 reads GDAL 1's EPSG:900913 without a shift as PROJ 9.9.0 does and says a shift set aside on WGS 84).
Rule for every PR
Nothing from the past breaks. Old projects, files and behaviour keep working. The only intended changes are reference values where terrio-crs agrees with PROJ and proj4rs didn't; each such change is checked against cs2cs/projinfo.
Phase A: engine swap
- A1: transforms on terrio-crs, merged in Transform coordinates with terrio-crs (#2032 A1) #2041. Data and the map move together, so they can't disagree. System definitions are unchanged: EPSG codes keep their PROJ definitions, so a WKT and its code still land on the same point. RustGIS's own world projections (equidistant cylindrical, sinusoidal, Natural Earth, Winkel Tripel, Eckert IV, the Robinson workaround) are removed. Reference values are updated against PROJ 9.8.1. Without datum grids (A4), a system whose best transformation needs one is said once, naming it.
- A2: WKT,
.prjand GeoTIFF keys read and written through terrio-crs.- Ellipsoids, prime meridians and units of PROJ definitions read through terrio-crs, merged in Read ellipsoids through terrio-crs and drop proj4rs (#2032 A2) #2066. Checked over all 8,592 bundled definitions: the same except eqc, Mollweide and Wagner IV/V (the ellipsoid instead of proj4rs's sphere) and
+R_A(now written as the authalic sphere, checked against PROJ 9.8.1). NAD27 systems now get a.prj, as GDAL writes them. - WKT read with
SpatialRef::from_wktand written withto_wkt1_strict(), GeoTIFF keys through terrio-crs's geokeys, merged in Read and write WKT and GeoTIFF keys through terrio-crs (#2032 A2b) #2322. A custom system holds its WKT beside a PROJ string (older releases read the PROJ string; a system only its WKT places requires thecrs-wktcapability). The Esri datum names fix(data): an ESRI .prj on PRS92 and some 320 other datums takes its datum's EPSG shift (#2258) #2281 handled are found through terrio-crs, as PROJ finds them: all 323 within 1 cm of PROJ 9.8.1.- Saved projects stay readable by older releases: a custom system is still saved as its PROJ string and label, with its WKT in an extra optional field that older releases ignore and newer ones read first. EPSG codes above 65535 are saved the same way, never as a bare code, which an older release couldn't read.
- Every file that reads today still reads; RustGIS's refusals and notes stay, and changed results are listed with PROJ values. A written
.prjreads back to the same system in RustGIS (older releases too) and in PROJ/GDAL, and GeoTIFF keys give the samegdalinforesult as before.
- Ellipsoids, prime meridians and units of PROJ definitions read through terrio-crs, merged in Read ellipsoids through terrio-crs and drop proj4rs (#2032 A2) #2066. Checked over all 8,592 bundled definitions: the same except eqc, Mollweide and Wagner IV/V (the ellipsoid instead of proj4rs's sphere) and
- A3: proj4rs removed, in Read ellipsoids through terrio-crs and drop proj4rs (#2032 A2) #2066. The map projection itself moved to terrio-crs in Transform coordinates with terrio-crs (#2032 A1) #2041, which also makes azimuthal equidistant work in the browser (
local:views, Equi7). - A4: Datum grids, merged in Datum grids: use them when present, download them on request (#2032 A4) #2347: used when present, and downloaded on request from PROJ's CDN (Settings › Datum Grids, off by default; desktop into a
datum-gridsfolder in the app data, web through fetch and registration). - A2c: crs-definitions and RustGIS's own EPSG, Esri and axis tables replaced by terrio-crs's catalog, merged in feat(crs): coordinate systems from terrio-crs's catalog (PROJ 9.9.0) #2409; values checked against PROJ 9.9.0.
- A5: A coordinate system picker that searches by name and code, with recently used systems first, merged in feat(ui): a coordinate system picker that searches by name, method, area and code, recently used first #2440.
Phase B: any system to any system
- B1+B2, merged in feat(data,map): convert between any two coordinate systems; draw layers from their own (#2032 B1+B2) #2448:
Crs::toconverts points, geometry and extents between any two systems (through WGS 84 for now), with a fast path when both are the same, and the map draws each layer from its own system. Area-of-use clipping and rasters on the same path follow in C2. - B3, merged in feat(crs): convert between two systems by their direct operation (#2032 B3) #2498: A direct operation between two systems, instead of two steps through WGS 84. Between two systems on the same datum other than WGS 84 (ETRS89 UTM to ETRS89 LAEA, two NAD27 systems), a datum shift there and back cancels only where both steps pick the same transformation, which fails near a grid's edge or an area of use. Between two datums, chaining two transformations can lose accuracy that the best operation for the pair keeps.
Crs::toholds one terrio-crs transformer per pair of systems, built once and kept like the others, with values checked againstcs2cs. Nothing changes today, since every layer is in lon/lat and every conversion that runs has WGS 84 on one side. It comes before C1e and C2, so that their exports and native layers convert directly from the start.
Phase C: a coordinate system per layer
- C1: Every place that assumes lon/lat converts explicitly at its boundary, while storage is still lon/lat, so nothing changes yet. It lands as several small PRs:
- C1a: extents and zooming, merged in refactor(map): layer extents converted from the dataset's own coordinates #2454.
- C1b: identify, selection and hit tests, merged in refactor(map): selection and view-distance boxes converted from the dataset's own coordinates #2462.
- C1c part 1: edit commands, copy, cut and paste, graphics, merged in refactor(engine): feature edits read and write the dataset's own coordinates #2464.
- C1c part 2: shape conversion, the vertex editor and touch editing, merged in refactor: vertex editing and shape conversion read the dataset's own coordinates (#2032 C1c part 2) #2466.
- C1c part 3: edits write back only what changed, merged in feat: edits keep what they didn't move exactly as stored (#2032 C1c part 3) #2469. An edit is made in lon/lat, but converting a whole feature back to its system would move every vertex it didn't touch by the round trip's error: about a nanometre in UTM, but up to metres for a projection whose inverse is approximate (Robinson, Eckert IV near the poles). So the write-back looks up each edited vertex among the feature's stored vertices, as they read in lon/lat, and keeps the stored coordinate wherever one matches exactly; only moved or new vertices are converted. This covers every command that rebuilds a geometry (vertex moves, inserts and deletes, split, reshape, shape conversion) at once. A vertex snapped to another feature's vertex takes that vertex's stored coordinate too, converted directly into the edited layer's system when the two differ. Tested through real conversions: untouched vertices stay bit-identical, and moved ones match
cs2cs. - C1d: analysis and measurement, merged in refactor: analysis and measurement read longitude/latitude through one boundary (#2032 C1d) #2478. Tools read their inputs in lon/lat through one boundary (a converted copy only for a layer in another system), and
$area,$length, Calculate Geometry and the area checks measure in lon/lat from the layer's own coordinates. - C1e: export and save convert from the layer's own system, not from lon/lat: the data crate's writers, the streamed export and publishing in feat(crs): export and save from the system a layer holds its coordinates in (#2032 C1e part 1) #2507, the engine's own GeoJSON, CSV, KML and GPX writers (workflow conversion, packaged results, web layers and maps, the plugin
featurescall, Python) in feat(crs): write GeoJSON, CSV, KML and GPX in longitude/latitude from the system a layer holds (#2032 C1e part 2) #2510.
- C2: Readers keep native coordinates, in several PRs.
- C2a, merged in feat(crs): a dataset holds its coordinates in a system of its own; commands work from it (#2032 C2a) #2514: a dataset records the system it holds its coordinates in (
Dataset::held_in, lon/lat for every dataset read or made, so nothing changes yet), and engine tests run commands on layers held in UTM against the same layers in lon/lat: extents and zoom, selection, exports, geometry calculation, buffers and joins, edits and undo, copy and paste between systems, project save and open, 3D files, web scenes and layers, mobile packages, rasterizing, interpolation, routes, and drawing on Web Mercator, another projection and the globe. Those tests, and a search of the code, found places C1 missed (the globe, rasterizing, 3D exports, several analysis commands); they're fixed in the same PR. Projects keep saving features in lon/lat, so older releases read them unchanged. - C2b part 1, merged in feat(crs): held layers: the globe's longitude/latitude copy in a cache of its own, undrawable places said, a sync compares same-system copies as held (#2032 C2b) #2528: three things the flip needs, none changing anything for layers in lon/lat. The globe's lon/lat copy of a held layer gets a cache of its own, so a flat projection made for hit-testing or snapping doesn't evict it. Features the map can't draw are said, once per version of a layer, so the map, the globe and the drawings made from them (label lines, block diagrams, terrain water) no longer leave them out silently. An offline map's sync compares copies held in the same system as stored, so a conversion that changed meanwhile (a datum grid downloaded) can't make an unedited feature replace a later source edit.
- C2b part 2, merged in feat(crs): held layers tested on the remaining commands; whole-layer conversions stop on Cancel; undrawable places counted as the map draws (#2032 C2b) #2545: held-layer tests for the remaining commands (raster zones, clips and supervised classification, photos, plugin tools, the mask, the globe locator sketch, block diagrams, terrain water); whole-layer conversions stop on Cancel; undrawable places are counted in the conversion the map already makes to draw a held layer (no second conversion), layers a frame only reads (terrain water, block walls, label targets) are counted when their reader reads them, and exports say what their own drawing left out; and a benchmark example (
held_bench). For a million vertices, a held layer pays one conversion, about a quarter of a second, when its geometry or the map's projection changes, and later frames cost the same as a layer in lon/lat. - C2c: the flip and direct drawing, in one PR: Keep layers in their own coordinate system and draw them directly #2580. Readers keep the file's own coordinates and system (Shapefile, GeoPackage, FlatGeobuf, GeoParquet and GeoJSON, streamed and whole; CSV, FileGDB, Esri PBF, MapInfo, LandXML, DXF, GML and city models), and a streamed source is asked for the view's box in its own system. On a map whose projection is a coordinate system (not Web Mercator, the globe or a world projection), a held layer is drawn as it is when it's in the map's system, and by the direct operation otherwise. Edits go through the same operation as drawing, so on a map in another datum's system (DHDN on ETRS89 UTM, some decimetres apart through WGS 84) vertex handles and new vertices land exactly on the drawn line; analysis, exports and the clipboard's text stay exact through WGS 84, whatever the map. Define Projection becomes a relabel. Old projects open as before (a golden test). Values are checked against PROJ 9.9.0 (
cs2cs). A sweep of the code for places still in lon/lat also found bugs this PR fixes: topology validation of a held layer, the view-clipping centre on a projected map, the per-frame cost of the view-distance test, the route graph rebuilt on every call, Python's selected features depending on the map, and layers made from a held layer (converted labels, routes, simulated points) losing its system. From its review: a label moved by hand becomes an annotation where the map drew it, the Source tab shows the system a layer is held in and the one its extent is given in, and a GeoLibre output is held in its working system only when that converts to lon/lat. On the globe a held layer keeps a lon/lat copy (2× its geometry, counted in the view-memory budget). - C2d: saved projects keep each layer in its own coordinate system: Save layers kept in a project in their own coordinate system (native-coordinates) #2598. A layer or table held in a system of its own saves its features there, exactly, with
held_inbeside them. A project, map file or layer file with one requiresnative-coordinates, so an older release refuses it instead of reading the coordinates as degrees. Projects whose layers are all in lon/lat are saved as before. (The first plan, a lon/lat copy plus base64 native coordinates without a capability, was dropped: an older release saving the project again would lose them silently.) - C2e: native analysis. A tool runs in its first input's system when that system is projected (lon/lat, Web Mercator and geographic systems keep today's lon/lat path). Other inputs are converted into it by the direct operation, with places it can't hold counted and said, and outputs are made in it. Each tool opts in, so the rest keep working as today. Distances given in metres (Buffer, Simplify, Near, Points Along Lines, selection and joins within a distance) are worked in the layer's own system, converted to its unit, as ArcGIS does for projected data. Area, length and perimeter stay geodesic. Calculate Geometry's point x/y are given in the layer's own system. The overlay tools work in a Web Mercator plane today, and their pole and antimeridian handling is written for degrees, so for projected layers the plane becomes the identity and that handling is switched off. In five PRs:
- C2e-1 (Tools that don't depend on the coordinate system work in their layer's own projected system (#2032 C2e-1) #2611): the groundwork, plus the tools that don't depend on the system: Summary Statistics, Pivot Table, Join Field, Select By Attributes, Export Features (which today drops the layer's system), Merge, Polygon To Line, Split Line At Vertices, Feature Envelope To Polygon, Unsplit Line, Feature Vertices To Points, Check Geometry and Repair Geometry.
- C2e-2 (Overlays and spatial relations work in their layer's own projected system (#2032 C2e-2) #2659; Tabulate Intersection stays in lon/lat, as do world projections): overlays and spatial predicates: Clip, Erase, Intersect, Identity, Union, Symmetrical Difference, Update, Split, Dissolve, Convex Hull, Feature To Point, Count Points, Select By Location, Spatial Join and Tabulate Intersection.
- C2e-3 (Distances in metres are measured flat in a layer's own projected system (#2032 C2e-3) #2674): distances in metres: Buffer, Simplify, Near, Points Along Lines, and selection and joins within a distance, measured flat in the layer's system and unit; Points Along Lines' angle from grid north, whichever way the axes point.
- C2e-4: rasters and interpolation, converted from the layer's system to the grid's directly. Part a (Interpolations, Kernel Density, Zonal Statistics and Tabulate Area work from a layer's own projected coordinates (#2032 C2e-4) #2679, merged): IDW, Kriging, Kernel Density, Tabulate Area, Zonal Statistics. Part b (Rasterize, raster clip and spectral zones work from a held polygon layer's own coordinates (#2032 C2e-4b) #2686, merged): Rasterize, raster clip, spectral zones. Part c (Training, elevation and the Geostatistical Wizard from a layer's own coordinates (#2032 C2e-4c) #2721, merged): supervised and deep-learning training, elevation from a surface, the Geostatistical Wizard. Follow-up (Polygons to Raster on a thread of its own, and raster commands from the app's dispatch too #2739, merged): Rasterize on a thread of its own, with Cancel.
- C2e-5: analysis outside the tool list, in two PRs.
- Part a (Engine paths in a layer's own system: Calculate Geometry x/y, XY Table To Point, networks, Simulate, annotation, plugin features (#2032 C2e-5) #2766, merged): Calculate Geometry's
point_x/point_yin the layer's own system (areas and lengths still on the ground); XY Table To Point keeping the table's numbers, held in its system; Service Area and OD Cost Matrix keeping a held network's graph between runs (it was rebuilt on every run), each line converted as the graph is built, the service area held in the network's system; Simulate and Convert Labels To Annotation in the layer's own coordinates; plugins asking for a layer's own system getting its coordinates exactly. Route already kept its graph and held its path (feat(crs): a dataset holds its coordinates in a system of its own; commands work from it (#2032 C2a) #2514). - Part b (Topology checked in a held layer's own system (#2032 C2e-5) #2771, merged): topology validation in the layer's own system: dangle tolerance and least overlap/gap area in its unit, a covering layer converted into it (bent edges and a fallback to lon/lat said), no whole-layer lon/lat copy. Also Engine paths in a layer's own system: Calculate Geometry x/y, XY Table To Point, networks, Simulate, annotation, plugin features (#2032 C2e-5) #2766's follow-up: Service Area's lines held as they are made, not the output copied.
- Part a (Engine paths in a layer's own system: Calculate Geometry x/y, XY Table To Point, networks, Simulate, annotation, plugin features (#2032 C2e-5) #2766, merged): Calculate Geometry's
- Staying in lon/lat: Tissot's indicatrix, the A5 grid tools, PMTiles exports, geodesic measures, STAC searches and exports.
- C2f: follow-ups from the sweep, underway (one PR after another; C2e-4 and C2e-5's files are left alone):
- C2f-1 (Exports and write-backs in a layer's own coordinate system (#2032 C2f-1) #2682, merged): formats out: GeoParquet export with its CRS; CSV export in X/Y of the layer's system (an option, lon/lat stays the default); publishing back to a GeoJSON with a legacy
crsmember; a sync digest over native coordinates (kept beside today's, so older releases still compare).- C2f-1 follow-ups (Formats out follow-ups: streamed CSV system notice, digests and loss counts without converting the layer (#2032 C2f-1) #2708, merged): the streamed CSV system notice, publish digests and CSV loss counts without converting the layer, the column-name wording.
- C2f-2 (Database tables and GeoPackage edit sessions in their own coordinate system (#2032 C2f-2) #2685, merged): databases' and GeoPackage edit sessions' read and write-back in the table's own system.
- C2f-3 (done): GDAL-converted formats, DuckDB queries, feature services, WFS and WCS kept or asked in their own system rather than converted to EPSG:4326 by another PROJ (WCS is resampled twice today), with today's request as the fallback.
- C2f-3a (GDAL formats, DuckDB results and live feature services in their own coordinate system (#2032 C2f-3) #2722, merged): GDAL-converted formats, DuckDB results and live feature services kept in their own system.
- C2f-3b (WFS and downloaded feature services asked in their own coordinate system (#2032 C2f-3b) #2737, merged): WFS and downloaded feature services asked in their own system (axis order), with the lon/lat request as the fallback.
- C2f-3c (WCS coverages asked in their own coordinate system (#2032 C2f-3c) #2767, merged): WCS asked in the coverage's own system, resampled once, by the map.
- C2f-4 (underway): streamed reads tested against a box in the source's own system instead of converting every vertex, streamed windows asked in map units, and readers keeping geometry that has no lon/lat place (after C2d).
- C2f-4a (merged through What leaves the session takes a feature it can't place without that geometry, and says so (#2032 C2f-4b-1a) #2778; Streamed reads in the source's own system: a map in it reads its window in map units (#2032 C2f-4a) #2774 closed): a map in a streamed source's own system reads its window in map units, each feature's own box tested there with no coordinate converted.
- C2f-4b (underway): readers keep geometry with no longitude/latitude place on every map. First, every place that converts a held layer leaves such a feature out and says so, instead of failing:
- C2f-4b-1a (What leaves the session takes a feature it can't place without that geometry, and says so (#2032 C2f-4b-1a) #2778, merged): what leaves the session (exports, copy, Data Interop, shared items, 3D files, packages, Python).
- C2f-4b-1b (Geoprocessing reads a feature it can't place in longitude/latitude without its geometry, and says so (#2032 C2f-4b-1b) #2798, merged): geoprocessing (tool input and write-back, networks, the geometry calculator, labels; the plugin host keeps refusing by its contract).
- C2f-4b-1c (Edits, paste, topology and offline sync with a feature that has no longitude/latitude place (#2032 C2f-4b-1c) #2842, merged): edits, paste, topology and offline sync (publish and database write-back stay strict). Left for later: the Field Package return by its list of changes; vertex handles of such a feature (hidden without a word today, and on a map in the layer's own system it is drawn and selectable with no notice); the phone's shape editing ending silently on one.
- C2f-4b-2 (Readers keep a feature that has no longitude/latitude place as the file holds it (#2032 C2f-4b-2) #2843, merged): the readers keep such features: whole files, GeoJSON in place, and sources read in place (Shapefile, GeoPackage, FlatGeobuf, GeoParquet, PostGIS; GDAL and DuckDB through them); a place converted beyond longitude/latitude is counted too.
- C2f-4b-3 (LiDAR, MySQL and SQL Server keep features with no longitude/latitude place (#2032 C2f-4b-3) #2852, merged): LiDAR point clouds held in the file's own system, and LiDAR, MySQL and SQL Server keeping such features. Left: a streamed Shapefile leaves out a shape whose coordinates aren't numbers, which a whole read keeps without geometry: done in perf(map): no projected copy of a layer on a map in its own system; streamed Shapefiles keep NaN shapes without geometry (C2f) #3027 (kept without geometry, as a whole read).
- C2f-4b-4 (Edit Vertices and the phone's shape editing say which feature has no longitude/latitude place (#2032 C2f-4b-4) #2856, merged): Edit Vertices and the phone's shape editing say which feature has no longitude/latitude place to reshape (before, silent).
- C2f-4b-5 (Field Package return by a list of changes in each layer's own system (#2032 C2f-4b-5) #2868): the Field Package return reads a list of changes in each layer's own system (version 2); this release still writes version 1 in longitude/latitude. Bring Back refuses only for such a feature the list changes.
- C2f-4b-6 (Field Package lists keep layers in their own coordinate system #3540): write version 2 (
writes_own_systemson), so such features come back exact; user guide. A phone with v0.9.0 or older keeps a lon/lat copy, so its whole map comes back as before.
- C2f-5 (Rasters, zoom-to, simplified drawing and squared labels in a held layer's own system (C2f-5) #2787, merged): drawing. On a map in an area-limited system (UTM, Gauss-Krüger:
Flat::direct_system), rasters in another datum are drawn by the direct operation; Zoom To Layer, Zoom To Selection and Full Extent frame a layer held in the map's system by its own box; its simplified (LOD) drawing is made from its own rows, and a frame drawn from those drops the copy made for another map (16.5 instead of 32.5 MB for 1M vertices); labels square to a held line where the map draws it. Kept: the globe's lon/lat copy (converting per frame is about 15× slower).- Follow-ups: the projected cache sharing a held layer's geometry for frames that need exact positions (labels, selection; the cache's type, about 80 call sites): perf(map): no projected copy of a layer on a map in its own system; streamed Shapefiles keep NaN shapes without geometry (C2f) #3027, merged (on a map in a layer's own system, no projected copy is made; streamed windows too); data.md's sentence on the direct operation to name area-limited maps (world projections still go through WGS 84), promised in Rasters, zoom-to, simplified drawing and squared labels in a held layer's own system (C2f-5) #2787: done (Edits, paste, topology and offline sync with a feature that has no longitude/latitude place (#2032 C2f-4b-1c) #2842).
- C2f-6 (part 1 merged: feat(edit): move, rotate, scale and traverse on a projected layer's own grid (C2f-6) #2878, Traverse, Move, Rotate and Scale; part 2 merged: feat(edit): boxes, circles and shape conversions in a projected layer's own grid (C2f-6) #2882, boxes, circles and shape conversions; part 3: feat(graphics): a dragged rectangle, circle or ellipse is built as the view faces, on any map (C2f-6) #2893, graphics shapes built as the view faces; part 4: perf(edit): the places an edit keeps are found through a grid of each layer's boxes (C2f-6) #2895, a grid of each layer's boxes for the places an edit keeps): Traverse, Move, Rotate and Scale in the layer's own system (today in Web Mercator scaled by latitude, about 8 cm per km north–south at 47°); rotated box, circle and graphics shapes in the map's or layer's system; an index for the places an edit keeps.
- C2f-7 (part 1 merged: feat(edit): cut, reshape, split, merge and trace on a projected layer's own segments (C2f-7) #2900, cut, reshape, split, merge and trace on the layer's own segments; part 2 merged: feat(edit): vertex handles from the layer's own coordinates; edits on a map in its system written as placed (C2f-7 part 2) #3018, the vertex editor's handles where the map draws the layer, and on a map in its own system edits written as placed): cut, reshape, split and merge on the layer's own segments; the vertex editor drawing handles from native coordinates.
- C2f-8 (done): the coordinate readout, Copy Coordinates and Go To XY in the map's or layer's system; Georeference's fit to the view on a projected map.
- The pointer readout and the right-click Copy Coordinates in the map's own system (The pointer reads in the map's own coordinate system by default #2781, merged).
- Go To XY and
map.convertPositiontaking a system (crs), with the dialog, a typed position with its system (also in search), and Georeference's Fit To Map View on a projected map (Go To XY and Fit To Map View in the map's own system (#2032 C2f-8) #2786, merged through The pointer readout and Copy Coordinates in the active layer's own system (#2032 C2f-8) #2795). A system is refused when it would put the place somewhere wrong: one in degrees, one counted otherwise than east then north, another body's, or a raster whose pixels aren't loaded. So are degrees typed before a projected system with no unit written. - The readout and Copy Coordinates in a layer's system, a raster's being its pixels' (The pointer readout and Copy Coordinates in the active layer's own system (#2032 C2f-8) #2795, merged).
- Carried to the next C2f PR (Edits, paste, topology and offline sync with a feature that has no longitude/latitude place (#2032 C2f-4b-1c) #2842, merged): the planetary check reads a PROJ definition's radius only from its first 64 words (reading the whole definition, with a test); a stale comment in
navigate.rs; the data.md sentence that the direct operation is used only on area-limited maps (from Rasters, zoom-to, simplified drawing and squared labels in a held layer's own system (C2f-5) #2787).
- C2f-1 (Exports and write-backs in a layer's own coordinate system (#2032 C2f-1) #2682, merged): formats out: GeoParquet export with its CRS; CSV export in X/Y of the layer's system (an option, lon/lat stays the default); publishing back to a GeoJSON with a legacy
- C2a, merged in feat(crs): a dataset holds its coordinates in a system of its own; commands work from it (#2032 C2a) #2514: a dataset records the system it holds its coordinates in (
- C3a: a project coordinate system. Optional and saved with the project: the projection of new maps, the system new layers are held in (drawn features, tool outputs), and the default output system of tools and exports. It is set in Project Properties with the coordinate system picker, or taken from the first layer added (an option, off by default), and by a command for the CLI, Python and the Assistant. A project without one behaves as today and saves as before; one with it, or with the first-layer option on, requires
project-crs, so an older release refuses it instead of saving it again without them.- C3a part 1 (A project coordinate system: new maps and layers start in it (#2032 C3a part 1, C3) #2667, merged; with C3): saved setting, command, new maps and template layers, the first-layer option, Project Properties.
- C3a part 2 (Tool outputs, grids and exports default to the project's coordinate system (C3a part 2) #2776, merged): tool outputs made in lon/lat held in the project's system; IDW, Kriging, Kernel Density and the Geostatistical Wizard make grids from layers in degrees in its projected system; exports of layers with no system of their own written in it.
- C3a part 3 (Route, Simulation and annotation made from a layer in degrees take the project's coordinate system (C3a part 3) #2782, merged): Shortest Route, Random Points and Simulate outputs in the project's system.
- C3 (A project coordinate system: new maps and layers start in it (#2032 C3a part 1, C3) #2667, merged): UI: the layer's system in its properties (on the Source tab since Keep layers in their own coordinate system and draw them directly #2580), and "Use the project's" or "the first layer's coordinate system" for the map.
Phase D: hooks for 3D (#726)
- Compound and vertical systems on layers, and 3D transforms, so heights convert once [Feature]: Full 3D scenes: heights in the data, 3D objects and point clouds, a scene camera #726 phase 1 decides how Z is stored.
- Scenes: layer system → ECEF → local east-north-up in f64, using the same transform path as B2.
I'll do the PRs in this order. Pieces of C1 can be taken by others once B is in; say so here first.
Related: #726, #1853 (project format 2), opengeos/terrio#936, opengeos/terrio#1012.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Transform coordinates with terrio-crs (opengeos#2032 A1)
Transform coordinates with terrio-crs (#2032 A1) (#2041)
Read ellipsoids through terrio-crs and drop proj4rs (opengeos#2032 A2)
Read ellipsoids through terrio-crs and drop proj4rs (#2032 A2) (#2066)
Address review findings on terrio-crs WKT and GeoTIFF reading (openge…
Address second review round on terrio-crs WKT and GeoTIFF reading (op…
Address third review round on terrio-crs WKT reading (opengeos#2032 A2b)
Pin terrio-crs to 759c016: GeoKeys keep a system's own TOWGS84 (openg…
Refuse an ellipsoid axis past a GeoTIFF's double parameters (opengeos…
Take WKT nodes out in one pass (opengeos#2032 A2b)
Read and write WKT and GeoTIFF keys through terrio-crs (opengeos#2032 …
Datum grids: use them when present, download them on request (opengeo…
Datum grids: missed download news, limits only off to on, a transform…
feat(data,map): convert between any two coordinate systems; draw laye…
refactor(map): layer extents converted from the dataset's own coordin…
93 remaining items
Review: only the selected rows the scan can reach are hashed; "at lea…
Review: the selection hashed as far as the last scan went, rows witho…
Readers keep a feature that has no longitude/latitude place as the fi…
Edit Vertices and the phone's shape editing say which feature has no …
Field Package return by a list of changes in each layer's own system (o…
feat(edit): move, rotate, scale and traverse on a projected layer's o…
feat(edit): boxes, circles and shape conversions in a projected layer…
feat(edit): boxes, circles and shape conversions in a projected layer…
Mavrick-F commentedon Nov 25, 2026
@pick2510 two things from profiling the 25 November benchmark touch coordinate conversion, so I wanted to check with you first.
Exporting a projected layer converts every vertex to lon/lat twice, on one thread: once in
lonlat_extentfor the extent, then again inproject_each_leaving_outto write it. For 100,000 buffered UTM points (12.9 million vertices) that's about 80% of an 8.4 s run. I'd take the extent from the converted features and do the conversion on several threads. The file written should come out identical.raster.projectconverts every output cell's position exactly, through lon/lat, and that's about a third of its time.gdalwarpconverts a few points per row exactly and interpolates between them, keeping the error under 0.125 of a cell. Doing the same would shift output values slightly, within that bound.Neither changes which coordinate system a layer or an export uses, which stays with C3a part 2. Would either get in the way of what's left of C2e or C3? If not, I'll send the export fix as a small PR now and the warp change after C2e lands.
pick2510 commentedon Nov 25, 2026
@Mavrick-F Neither gets in the way. C2e and C3a part 2 are both merged, and nothing I have open touches export or
raster.project, so the warp change doesn't need to wait either.Export: fine with me. Two things: the extent from the converted features has to leave out features that couldn't be converted (NaN), as
lonlat_extentdoes today, and the web build needs a one-thread path. Cancel should still reach the threaded conversion.Warp: also fine, as long as the PR lists the value shifts. Please go through
Crs::to(the direct operation from the source to the target system) rather than lon/lat. Between datums that's also the more accurate path. And fall back to exact conversion near a projection's edge or the poles, where the 0.125-cell bound can't hold.build(deps): terrio-crs 0.3.0 from crates.io instead of the git pin (o…
fix(crs): 900913 WKT without a shift reads as PROJ does; a set-aside …
docs(comparison): coordinate systems as they are since layers keep th…
Mavrick-F commentedon Dec 1, 2026
Hi @pick2510, when Join Field's target is in longitude/latitude, RustGIS also converts the join layer's shapes, though the join only uses its attributes. For a layer of 448,000 polygons, skipping that saves 1.7 GB of memory and takes the join from 5.7 s to 1.6 s.
I have a fix ready. It still converts the join layer when it's also the target, or when its definition query measures shapes. Your #2611 already skips this for projected targets. Did you leave longitude/latitude out for a reason, or is it something you're changing in #2032?
pick2510 commentedon Dec 1, 2026
Hi @Mavrick-F, no particular reason. #2611 only changed the path for tools working in a projected system and left the longitude/latitude path as it was. Nothing left in #2032 touches it, so go ahead.
Note that the lon/lat exclusion is in two places in
gp.rs(let unread = if work == Crs::LonLat …in the input setup and ininputs_in). Both need to change, otherwiseInputs::datasetwon't hand the join layer out unconverted. The join layer then also shouldn't show up in the notice about features read without geometry. Tests for your two exceptions (join layer = target, definition query measuring shapes) would be good.