Exemple #1
0
 /// <summary>
 /// Serializes content to the writer
 /// </summary>
 public void ToBinary(IBinaryRawWriter writer)
 {
     writer.WriteDouble(Station);
     writer.WriteDouble(Offset);
     writer.WriteDouble(Northing);
     writer.WriteDouble(Easting);
 }
Exemple #2
0
        /// <summary>
        /// An extension method providing a ToBinary() semantic to Fence
        /// </summary>
        public static void ToBinary(this Fence item, IBinaryRawWriter writer)
        {
            const byte VERSION_NUMBER = 1;

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            bool isNull = item.IsNull();

            writer.WriteBoolean(isNull);

            if (isNull)
            {
                return;
            }

            writer.WriteBoolean(item.IsRectangle);

            writer.WriteInt(item.NumVertices);
            foreach (var point in item.Points)
            {
                writer.WriteDouble(point.X);
                writer.WriteDouble(point.Y);
                writer.WriteDouble(point.Z);
            }
        }
Exemple #3
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(SpotX);
            writer.WriteDouble(SpotY);
        }
Exemple #4
0
 public void ToBinary(IBinaryRawWriter writer)
 {
     writer.WriteBoolean(UseIntegerAlgorithm);
     writer.WriteDouble(PixelXWorldSize);
     writer.WriteDouble(PixelYWorldSize);
     writer.WriteDouble(UserOriginX);
     writer.WriteDouble(UserOriginY);
     writer.WriteDouble(Rotation);
 }
Exemple #5
0
        /// <summary>
        /// An extension method providing a ToBinary() semantic to XYZ
        /// </summary>
        public static void ToBinary(this XYZ item, IBinaryRawWriter writer)
        {
            const byte VERSION_NUMBER = 1;

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(item.X);
            writer.WriteDouble(item.Y);
            writer.WriteDouble(item.Z);
        }
Exemple #6
0
 /// <summary>
 /// Serialises content to the writer
 /// </summary>
 public void ToBinary(IBinaryRawWriter writer)
 {
     writer.WriteDouble(Northing);
     writer.WriteDouble(Easting);
     writer.WriteDouble(Elevation);
     writer.WriteDouble(CutFill);
     writer.WriteShort(Cmv);
     writer.WriteShort(Mdp);
     writer.WriteShort(PassCount);
     writer.WriteShort(Temperature);
 }
Exemple #7
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(StartStation);
            writer.WriteDouble(EndStation);
            writer.WriteDouble(LeftOffset);
            writer.WriteDouble(RightOffset);
        }
Exemple #8
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteGuid(AlignmentDesignUid);
            writer.WriteDouble(CrossSectionInterval);
            writer.WriteDouble(StartStation);
            writer.WriteDouble(EndStation);
            writer.WriteDoubleArray(Offsets);
        }
Exemple #9
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(Station);
            writer.WriteDouble(InterceptLength);

            writer.WriteInt(OTGCellX);
            writer.WriteInt(OTGCellY);

            writer.WriteFloat(DesignElev);
        }
Exemple #10
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteGuid(DesignID);
            writer.WriteDouble(Offset);
        }
Exemple #11
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteGuid(SiteModelID);
            writer.WriteInt((int)OTGCellBottomLeftX);
            writer.WriteInt((int)OTGCellBottomLeftY);
            writer.WriteDouble(CellSize);
            writer.WriteByte((byte)SurveyedSurfacePatchType);

            writer.WriteBoolean(ProcessingMap != null);
            if (ProcessingMap != null)
            {
                writer.WriteByteArray(ProcessingMap.ToBytes());
            }

            writer.WriteBoolean(IncludedSurveyedSurfaces != null);
            if (IncludedSurveyedSurfaces != null)
            {
                var count = IncludedSurveyedSurfaces.Length;
                writer.WriteInt(count);
                for (int i = 0; i < count; i++)
                {
                    writer.WriteGuid(IncludedSurveyedSurfaces[i]);
                }
            }
        }
Exemple #12
0
        /// <summary>
        /// Serialises content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(CellSize);
            writer.WriteDouble(MinElevation);
            writer.WriteDouble(MaxElevation);
            writer.WriteInt(CellsUsed);
            writer.WriteInt(CellsScanned);

            writer.WriteBoolean(BoundingExtents != null);

            BoundingExtents?.ToBinary(writer);
        }
Exemple #13
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(Elevation);
            writer.WriteInt((int)CalcResult);
        }
Exemple #14
0
 /// <summary>
 /// Writes this instance to a writer.
 /// </summary>
 internal void Write(IBinaryRawWriter writer)
 {
     writer.WriteString(Name);
     writer.WriteLong(Size);
     writer.WriteString(SwapFilePath);
     writer.WriteInt((int)PageEvictionMode);
     writer.WriteDouble(EvictionThreshold);
     writer.WriteInt(EmptyPagesPoolSize);
 }
Exemple #15
0
        /// <summary>
        /// Serialises content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteInt((int)DisplayMode);
            writer.WriteInt((int)ReturnCode);
            writer.WriteBoolean(Value.HasValue);
            if (Value.HasValue)
            {
                writer.WriteDouble(Value.Value);
            }
            writer.WriteBoolean(TimeStampUTC.HasValue);
            if (TimeStampUTC.HasValue)
            {
                writer.WriteLong(TimeStampUTC.Value.ToBinary());
            }
            writer.WriteDouble(Northing);
            writer.WriteDouble(Easting);
        }
Exemple #16
0
 /// <summary>
 /// Writes this instance to a writer.
 /// </summary>
 internal void Write(IBinaryRawWriter writer)
 {
     writer.WriteString(Name);
     writer.WriteLong(InitialSize);
     writer.WriteLong(MaxSize);
     writer.WriteString(SwapFilePath);
     writer.WriteInt((int)PageEvictionMode);
     writer.WriteDouble(EvictionThreshold);
     writer.WriteInt(EmptyPagesPoolSize);
     writer.WriteBoolean(MetricsEnabled);
 }
Exemple #17
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteGuid(ProjectID);
            writer.WriteGuid(AlignmentDesignID);
            writer.WriteBoolean(ConvertArcsToPolyLines);
            writer.WriteDouble(ArcChordTolerance);
        }
Exemple #18
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteInt(Profile?.Count ?? 0);

            if (Profile != null)
            {
                foreach (var pt in Profile)
                {
                    writer.WriteDouble(pt.X);
                    writer.WriteDouble(pt.Y);
                    writer.WriteDouble(pt.Z);
                    writer.WriteDouble(pt.Station);
                    writer.WriteInt(pt.TriIndex);
                }
            }
        }
Exemple #19
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteString(DateSeparator);
            writer.WriteString(TimeSeparator);
            writer.WriteString(ThousandsSeparator);
            writer.WriteString(DecimalSeparator);
            writer.WriteInt((int)Units);
            writer.WriteInt((int)TemperatureUnits);
            writer.WriteDouble(ProjectTimeZoneOffset);
        }
Exemple #20
0
 /// <summary>
 /// Serializes content to the writer
 /// </summary>
 public void ToBinary(IBinaryRawWriter writer)
 {
     writer.WriteDouble(Station);
     writer.WriteInt(Offsets.Count);
     foreach (var offset in Offsets)
     {
         offset.ToBinary(writer);
     }
     Minimum.ToBinary(writer);
     Maximum.ToBinary(writer);
     Average.ToBinary(writer);
 }
Exemple #21
0
        /// <summary>
        /// Serialises content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(MinElevation);
            writer.WriteDouble(MaxElevation);
            writer.WriteDouble(ElevationPerBand);

            writer.WriteBoolean(ElevationPalette != null);

            if (ElevationPalette != null)
            {
                writer.WriteInt(ElevationPalette.Length);

                foreach (var color in ElevationPalette)
                {
                    writer.WriteInt(color.ToArgb());
                }
            }
        }
Exemple #22
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteBoolean(Cut.HasValue);
            if (Cut.HasValue)
            {
                writer.WriteDouble(Cut.Value);
            }

            writer.WriteBoolean(Fill.HasValue);
            if (Fill.HasValue)
            {
                writer.WriteDouble(Fill.Value);
            }

            writer.WriteBoolean(TotalCoverageArea.HasValue);
            if (TotalCoverageArea.HasValue)
            {
                writer.WriteDouble(TotalCoverageArea.Value);
            }

            writer.WriteBoolean(CutArea.HasValue);
            if (CutArea.HasValue)
            {
                writer.WriteDouble(CutArea.Value);
            }

            writer.WriteBoolean(FillArea.HasValue);
            if (FillArea.HasValue)
            {
                writer.WriteDouble(FillArea.Value);
            }

            BoundingExtentGrid.ToBinary(writer);
            BoundingExtentLLH.ToBinary(writer);
        }
Exemple #23
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteGuid(ProjectID);
            writer.WriteInt((int)VolumeType);

            WriteFilter(writer, BaseFilter);
            WriteFilter(writer, TopFilter);

            writer.WriteBoolean(BaseDesign != null);
            BaseDesign?.ToBinary(writer);
            writer.WriteBoolean(TopDesign != null);
            TopDesign?.ToBinary(writer);

            WriteFilter(writer, AdditionalSpatialFilter);

            writer.WriteDouble(CutTolerance);
            writer.WriteDouble(FillTolerance);
        }
Exemple #24
0
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteInt((int)ReturnCode);
            writer.WriteDouble(Northing);
            writer.WriteDouble(Easting);
            writer.WriteInt(CellPasses.Count);

            using (var ms = RecyclableMemoryStreamManagerHelper.Manager.GetStream())
            {
                using (var bw = new BinaryWriter(ms, Encoding.UTF8, true))
                {
                    CellPasses.ForEach(result =>
                    {
                        result.Write(bw);
                    });
                }

                var bytes = ms.ToArray();
                writer.WriteByteArray(bytes);
            }
        }
Exemple #25
0
 /// <summary>
 /// Writes this instance to a writer.
 /// </summary>
 internal void Write(IBinaryRawWriter writer)
 {
     writer.WriteString(Name);
     writer.WriteBoolean(PersistenceEnabled);
     writer.WriteLong(InitialSize);
     writer.WriteLong(MaxSize);
     writer.WriteString(SwapPath);
     writer.WriteInt((int)PageEvictionMode);
     writer.WriteDouble(EvictionThreshold);
     writer.WriteInt(EmptyPagesPoolSize);
     writer.WriteBoolean(MetricsEnabled);
     writer.WriteInt(MetricsSubIntervalCount);
     writer.WriteTimeSpanAsLong(MetricsRateTimeInterval);
 }
Exemple #26
0
        /// <summary>
        /// Serialize out the state of the cell spatial filter using the Ignite IBinarizable serialisation
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteBoolean(Fence != null);
            Fence?.ToBinary(writer);

            writer.WriteBoolean(AlignmentFence != null);
            AlignmentFence?.ToBinary(writer);

            writer.WriteDouble(PositionX);
            writer.WriteDouble(PositionY);
            writer.WriteDouble(PositionRadius);
            writer.WriteBoolean(IsSquare);

            OverrideSpatialCellRestriction.ToBinary(writer);

            writer.WriteBoolean(StartStation.HasValue);
            if (StartStation.HasValue)
            {
                writer.WriteDouble(StartStation.Value);
            }

            writer.WriteBoolean(EndStation.HasValue);
            if (EndStation.HasValue)
            {
                writer.WriteDouble(EndStation.Value);
            }

            writer.WriteBoolean(LeftOffset.HasValue);
            if (LeftOffset.HasValue)
            {
                writer.WriteDouble(LeftOffset.Value);
            }

            writer.WriteBoolean(RightOffset.HasValue);
            if (RightOffset.HasValue)
            {
                writer.WriteDouble(RightOffset.Value);
            }

            writer.WriteBoolean(CoordsAreGrid);
            writer.WriteBoolean(IsSpatial);
            writer.WriteBoolean(IsPositional);

            writer.WriteBoolean(IsDesignMask);
            writer.WriteGuid(SurfaceDesignMaskDesignUid);

            writer.WriteBoolean(IsAlignmentMask);
            writer.WriteGuid(AlignmentDesignMaskDesignUID);
        }
Exemple #27
0
        /// <summary>
        /// Serialises content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteLongArray(Counts);
            writer.WriteDouble(CellSize);
            writer.WriteInt(SummaryCellsScanned);
            writer.WriteInt(CellsScannedAtTarget);
            writer.WriteInt(CellsScannedOverTarget);
            writer.WriteInt(CellsScannedUnderTarget);
            writer.WriteBoolean(IsTargetValueConstant);
            writer.WriteBoolean(MissingTargetValue);
        }
Exemple #28
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(CellSize);

            var count = ProfilePathNEE?.Length ?? 0;

            writer.WriteInt(count);
            for (int i = 0; i < count; i++)
            {
                ProfilePathNEE[i].ToBinary(writer);
            }
        }
Exemple #29
0
        /// <summary>
        /// Serializes content to the writer
        /// </summary>
        public override void InternalToBinary(IBinaryRawWriter writer)
        {
            base.InternalToBinary(writer);

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(CellSize);

            writer.WriteBoolean(StartPoint != null);
            StartPoint?.ToBinary(writer);

            writer.WriteBoolean(EndPoint != null);
            EndPoint?.ToBinary(writer);

            writer.WriteBoolean(PositionsAreGrid);
        }
Exemple #30
0
        /// <summary>
        /// An extension method providing a ToBinary() semantic to BoundingWorldExtent3D
        /// </summary>
        public static void ToBinary(this BoundingWorldExtent3D item, IBinaryRawWriter writer)
        {
            const byte VERSION_NUMBER = 1;

            VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER);

            writer.WriteDouble(item.MinX);
            writer.WriteDouble(item.MinY);
            writer.WriteDouble(item.MinZ);
            writer.WriteDouble(item.MaxX);
            writer.WriteDouble(item.MaxY);
            writer.WriteDouble(item.MaxZ);
        }