Ejemplo n.º 1
0
        private EsriPolygon ReadPolygon(Dimension dimension)
        {
            EsriPolygon polygon = new EsriPolygon();

            uint ringCount = wkbReader.ReadUInt32();

            if (ringCount > 0)
            {
                uint exteriorRingCount  = wkbReader.ReadUInt32();
                EsriPointCollection pts = new EsriPointCollection();
                for (int i = 0; i < exteriorRingCount; i++)
                {
                    pts.Add(ReadPoint(dimension));
                }
                polygon.Rings.Add(pts);

                for (int i = 1; i < ringCount; i++)
                {
                    pts = new EsriPointCollection();

                    uint interiorRingCount = wkbReader.ReadUInt32();
                    for (int j = 0; j < interiorRingCount; j++)
                    {
                        pts.Add(ReadPoint(dimension));
                    }
                    polygon.Rings.Add(pts);
                }
            }

            return(polygon);
        }
Ejemplo n.º 2
0
 public void Concat(EsriPointCollection pc)
 {
     if (pc != null)
     {
         int num = pc.Count;
         for (int i = 0; i < num; i++)
         {
             this.Add(pc[i]);
         }
     }
 }
Ejemplo n.º 3
0
        private EsriPolyline ReadLineString(Dimension dimension)
        {
            EsriPolyline lineString = new EsriPolyline();

            uint pointCount = wkbReader.ReadUInt32();

            EsriPointCollection pts = new EsriPointCollection();

            for (int i = 0; i < pointCount; i++)
            {
                pts.Add(ReadPoint(dimension));
            }

            lineString.Paths.Add(pts);

            return(lineString);
        }