protected override EsriMultiPointZ ReadElement()
        {
            int shapeType = shpReader.ReadInt32();

            if ((EsriShapeType)shapeType != EsriShapeType.EsriMultiPointZ)
            {
                throw new NotImplementedException();
            }

            IRI.Msh.Common.Primitives.BoundingBox boundingBox = this.ReadBoundingBox();

            int numPoints = shpReader.ReadInt32();

            EsriPoint[] points = this.ReadPoints(numPoints, this._srid);

            double minZ, maxZ;

            double[] zValues;

            this.ReadZValues(numPoints, out minZ, out maxZ, out zValues);

            double minMeasure = ShapeConstants.NoDataValue, maxMeasure = ShapeConstants.NoDataValue;

            double[] measures = new double[numPoints];

            if (shpReader.BaseStream.Position != shpReader.BaseStream.Length)
            {
                this.ReadMeasures(numPoints, out minMeasure, out maxMeasure, out measures);
            }

            return(new EsriMultiPointZ(boundingBox, points, minZ, maxZ, zValues, minMeasure, maxMeasure, measures));
        }
        protected override EsriPolyline ReadElement()
        {
            int shapeType = shpReader.ReadInt32();

            if ((EsriShapeType)shapeType != EsriShapeType.EsriPolyLine)
            {
                throw new NotImplementedException();
            }

            IRI.Msh.Common.Primitives.BoundingBox boundingBox = this.ReadBoundingBox();

            int numParts = shpReader.ReadInt32();

            int numPoints = shpReader.ReadInt32();

            int[] parts = new int[numParts];

            for (int i = 0; i < numParts; i++)
            {
                parts[i] = shpReader.ReadInt32();
            }

            EsriPoint[] points = this.ReadPoints(numPoints, this._srid);

            return(new EsriPolyline(boundingBox, parts, points));
        }
        protected override EsriPolygonM ReadElement()
        {
            int shapeType = shpReader.ReadInt32();

            if ((EsriShapeType)this.MainHeader.ShapeType != EsriShapeType.EsriPolygonM)
            {
                throw new NotImplementedException();
            }

            IRI.Msh.Common.Primitives.BoundingBox boundingBox = this.ReadBoundingBox();

            int numParts = shpReader.ReadInt32();

            int numPoints = shpReader.ReadInt32();

            int[] parts = new int[numParts];

            for (int i = 0; i < numParts; i++)
            {
                parts[i] = shpReader.ReadInt32();
            }

            EsriPoint[] points = this.ReadPoints(numPoints, this._srid);

            double minMeasure, maxMeasure;

            double[] measures;

            this.ReadMeasures(numPoints, out minMeasure, out maxMeasure, out measures);

            return(new EsriPolygonM(boundingBox, parts, points, minMeasure, maxMeasure, measures));
        }
        protected override EsriMultiPoint ReadElement()
        {
            int shapeType = shpReader.ReadInt32();

            if ((EsriShapeType)shapeType != EsriShapeType.EsriMultiPoint)
            {
                throw new NotImplementedException();
            }

            IRI.Msh.Common.Primitives.BoundingBox boundingBox = this.ReadBoundingBox();

            int numPoints = shpReader.ReadInt32();

            EsriPoint[] points = this.ReadPoints(numPoints, this._srid);

            return(new EsriMultiPoint(boundingBox, points));
        }
Exemple #5
0
        protected override EsriMultiPointM ReadElement()
        {
            int shapeType = shpReader.ReadInt32();

            if ((EsriShapeType)shapeType != EsriShapeType.EsriMultiPointM)
            {
                throw new NotImplementedException();
            }

            IRI.Msh.Common.Primitives.BoundingBox boundingBox = this.ReadBoundingBox();

            int numPoints = shpReader.ReadInt32();

            EsriPoint[] points = this.ReadPoints(numPoints, this._srid);

            double minMeasure, maxMeasure;

            double[] measures;

            this.ReadMeasures(numPoints, out minMeasure, out maxMeasure, out measures);

            return(new EsriMultiPointM(boundingBox, points, minMeasure, maxMeasure, measures));
        }
        internal MainFileHeader(int fileLength, EsriShapeType type, IRI.Msh.Common.Primitives.BoundingBox minimumnBoundingBox)
        {
            this.m_Version = 9994;

            this.m_FileLength = fileLength;

            this.m_ShapeType = (int)type;

            this.m_XMin = minimumnBoundingBox.XMin;

            this.m_YMin = minimumnBoundingBox.YMin;

            this.m_XMax = minimumnBoundingBox.XMax;

            this.m_YMax = minimumnBoundingBox.YMax;

            this.m_ZMax = 0;

            this.m_ZMin = 0;

            this.m_MMax = 0;

            this.m_MMin = 0;
        }