Skip to content

Commit

Permalink
xml; add offsets to layers data
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna committed Jul 2, 2024
1 parent 503bbbd commit d9326b5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public SGIS.VectorLayer Convert(LasDatasetLayer target)
{
wkt = spatialRef.Wkt,
name = spatialRef.Name,
offset_y = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.LatOffset),
offset_x = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.LonOffset),
rotation = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.TrueNorthRadians),
units_native = spatialRef.Unit.ToString(),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public SGIS.RasterLayer Convert(RasterLayer target)
{
wkt = spatialRef.Wkt,
name = spatialRef.Name,
offset_y = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.LatOffset),
offset_x = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.LonOffset),
rotation = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.TrueNorthRadians),
units_native = spatialRef.Unit.ToString(),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public VectorLayer Convert(FeatureLayer target)
{
wkt = spatialRef.Wkt,
name = spatialRef.Name,
offset_y = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.LatOffset),
offset_x = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.LonOffset),
rotation = System.Convert.ToSingle(_contextStack.Current.Document.ActiveCRSoffsetRotation.TrueNorthRadians),
units_native = _contextStack.Current.Document.ActiveCRSoffsetRotation.SpeckleUnitString,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Speckle.Converters.ArcGIS3.Utils;
/// <summary>
/// Container with origin offsets and rotation angle for the specified SpatialReference
/// Offsets and rotation will modify geometry on Send, so non-GIS apps can receive it correctly
/// Receiving GIS geometry in GIS hostApp will "undo" the geometry modifications according to the offsets&rotation applied before
/// In the future, CAD/BIM objects will contain ProjectInfo data with CRS & offsets, so this object can be generated on Recieve
/// Receiving GIS geometry in GIS hostApp will "undo" the geometry modifications according to the offsets and rotation applied before
/// In the future, CAD/BIM objects will contain ProjectInfo data with CRS and offsets, so this object can be generated on Recieve
/// TODO: consider how to generate this object to receive non-GIS data already now, without it having ProjectInfo object
/// </summary>
public struct CRSoffsetRotation
Expand Down

0 comments on commit d9326b5

Please sign in to comment.