public PolylineZShape( int recordNumber, StringDictionary metadata, CartographicExtent extent, int[] parts, Rectangular[] positions, double minimumZ, double maximumZ, double[] zValues, double minimumMeasure, double maximumMeasure, double[] measures, ShapeType shapeType = ShapeType.PolylineZ ) : base(recordNumber, metadata, extent, parts, positions, minimumMeasure, maximumMeasure, measures, shapeType) { _minimumZ = minimumZ; _maximumZ = maximumZ; for (int i = 0; i < parts.Length; ++i) { int count = ((i == parts.Length - 1) ? positions.Length : parts[i + 1]) - parts[i]; _parts[i] = new ShapePart(positions, zValues, measures, parts[i], count); } }
public MultiPatchShape( int recordNumber, StringDictionary metadata, CartographicExtent extent, int[] parts, MultiPatchPartType[] partTypes, Rectangular[] positions, double minimumZ, double maximumZ, double[] zValues, double minimumMeasure, double maximumMeasure, double[] measures, ShapeType shapeType = ShapeType.MultiPatch) : base(recordNumber, metadata, shapeType) { _extent = new CartographicExtent( extent.WestLongitude * Constants.RadiansPerDegree, extent.SouthLatitude * Constants.RadiansPerDegree, extent.EastLongitude * Constants.RadiansPerDegree, extent.NorthLatitude * Constants.RadiansPerDegree); _minimumZ = minimumZ; _maximumZ = maximumZ; _minimumMeasure = minimumMeasure; _maximumMeasure = maximumMeasure; _measures = (double[])measures.Clone(); for (int i = 0; i < positions.Length; i++) { positions[i] = new Rectangular(positions[i].X * Constants.RadiansPerDegree, positions[i].Y * Constants.RadiansPerDegree); } _parts = new ShapePart[parts.Length]; for (int i = 0; i < parts.Length; ++i) { int count = ((i == parts.Length - 1) ? positions.Length : parts[i + 1]) - parts[i]; _parts[i] = new ShapePart(positions, zValues, parts[i], count); } _partTypes = (MultiPatchPartType[])partTypes.Clone(); }