Summary
The ToUtm() extension method in ShapeExtensions.cs converts each point individually, deriving the UTM zone (longitude of origin) and the hemisphere on a per-point basis. When a dataset (SpatialRecord) contains points on opposite sides of a UTM zone boundary or on opposite sides of the equator, the resulting projected coordinates have large artificial discontinuities, causing the spatial view to render geometries thousands of kilometers away from where they actually are.
This is reproducible with real-world field operation data in regions that straddle a zone boundary (common in Brazil, which is crossed by UTM zones 21–24) or the equator (northern Brazil, Ecuador, Indonesia, parts of Africa, etc.).
Steps to reproduce
- Load an
OperationData dataset with spatial points whose longitudes cross a UTM zone boundary (e.g. a field straddling longitude −48° in Brazil), or whose latitudes cross the equator.
- Open the spatial view in the Visualizer.
- Observe that points/lines/polygons appear split, mirrored, or displaced by hundreds to thousands of kilometers from their true relative positions.
Expected behavior
All geometries belonging to the same dataset should render with correct relative positions on the spatial view, regardless of whether they cross a UTM zone boundary or the equator.
Evidences Before Fix
Crossing UTM zones before fix:

Crossing the equator before fix:

Proposed fix
Add ToUtmRelativeToSpatialRecordFirstPoint(this ApplicationDataModel.Shapes.Point point, ApplicationDataModel.Shapes.Point firstPoint) so that a single longitude of origin and a single hemisphere reference are chosen for the entire dataset (for example, derived from the centroid or first point of the shapes being projected) and applied uniformly to every point — an extended UTM approach. Points falling outside the reference zone/hemisphere remain mathematically continuous (Easting beyond the normal zone range, or Northing that may be negative or exceed 10,000,000), which is exactly what a single-canvas visualizer needs. The scale distortion introduced by projecting points outside the reference zone is negligible at field/farm scales (well under 1 part in 1,000 within a few degrees of the central meridian), which I think is acceptable for a diagnostic visualizer.
Evidences After Fix
Crossing UTM zones after fix:
Crossing the equator after fix:
Environment
- Repository:
ADAPT/ADAPT-Visualizer, branch develop
- Component:
SpatialRecordProcessor.ThemeMap()
Summary
The
ToUtm()extension method inShapeExtensions.csconverts each point individually, deriving the UTM zone (longitude of origin) and the hemisphere on a per-point basis. When a dataset (SpatialRecord) contains points on opposite sides of a UTM zone boundary or on opposite sides of the equator, the resulting projected coordinates have large artificial discontinuities, causing the spatial view to render geometries thousands of kilometers away from where they actually are.This is reproducible with real-world field operation data in regions that straddle a zone boundary (common in Brazil, which is crossed by UTM zones 21–24) or the equator (northern Brazil, Ecuador, Indonesia, parts of Africa, etc.).
Steps to reproduce
OperationDatadataset with spatial points whose longitudes cross a UTM zone boundary (e.g. a field straddling longitude −48° in Brazil), or whose latitudes cross the equator.Expected behavior
All geometries belonging to the same dataset should render with correct relative positions on the spatial view, regardless of whether they cross a UTM zone boundary or the equator.
Evidences Before Fix
Crossing UTM zones before fix:

Crossing the equator before fix:

Proposed fix
Add
ToUtmRelativeToSpatialRecordFirstPoint(this ApplicationDataModel.Shapes.Point point, ApplicationDataModel.Shapes.Point firstPoint)so that a single longitude of origin and a single hemisphere reference are chosen for the entire dataset (for example, derived from the centroid or first point of the shapes being projected) and applied uniformly to every point — an extended UTM approach. Points falling outside the reference zone/hemisphere remain mathematically continuous (Easting beyond the normal zone range, or Northing that may be negative or exceed 10,000,000), which is exactly what a single-canvas visualizer needs. The scale distortion introduced by projecting points outside the reference zone is negligible at field/farm scales (well under 1 part in 1,000 within a few degrees of the central meridian), which I think is acceptable for a diagnostic visualizer.Evidences After Fix
Crossing UTM zones after fix:
Crossing the equator after fix:
Environment
ADAPT/ADAPT-Visualizer, branchdevelopSpatialRecordProcessor.ThemeMap()