private static VectorLayer ReadPointMShapes(BinaryReader br, int shapeNum)
        {
            VectorLayer aLayer = new VectorLayer(ShapeTypes.PointM);
            int         RecordNum, ContentLength, aShapeType;
            double      x, y, m;

            //PointD aPoint;

            for (int i = 0; i < shapeNum; i++)
            {
                //br.ReadBytes(12); //记录头8个字节和一个int(4个字节)的shapetype
                RecordNum     = SwapByteOrder(br.ReadInt32());
                ContentLength = SwapByteOrder(br.ReadInt32());
                aShapeType    = br.ReadInt32();

                x = br.ReadDouble();
                y = br.ReadDouble();
                m = br.ReadDouble();

                PointMShape aP     = new PointMShape();
                PointM      aPoint = new PointM();
                aPoint.X = x;
                aPoint.Y = y;
                aPoint.M = m;
                aP.Point = aPoint;
                aLayer.ShapeList.Add(aP);
            }

            //Create legend scheme
            aLayer.LegendScheme = LegendManage.CreateSingleSymbolLegendScheme(ShapeTypes.Point, Color.Black, 5);
            return(aLayer);
        }
Exemplo n.º 2
0
        public void TestPointMShapePosition()
        {
            PointMShape point = new PointMShape(2, m_metadata, m_position, 5.0);

            Assert.AreEqual(new Cartographic(Constants.RadiansPerDegree, 2.0 * Constants.RadiansPerDegree, 0.0), point.Position);
        }
Exemplo n.º 3
0
        public void TestPointMShapeMeasure()
        {
            PointMShape point = new PointMShape(2, m_metadata, m_position, 5.0);

            Assert.AreEqual(5.0, point.Measure);
        }
Exemplo n.º 4
0
        public void TestPointMShapeType()
        {
            PointMShape point = new PointMShape(2, m_metadata, m_position, 5.0);

            Assert.AreEqual(ShapeType.PointM, point.ShapeType);
        }