예제 #1
0
        private GraphicsPath ToGraphicsPath(CodeCell.AgileMap.Core.Feature feature, ICanvas canvas)
        {
            CodeCell.AgileMap.Core.ShapePolyline           ply = feature.Geometry as CodeCell.AgileMap.Core.ShapePolyline;
            GeoDo.RSS.Core.DrawEngine.ICoordinateTransform tran = canvas.CoordTransform;
            double       prjX, prjY;
            int          screenX, screenY;
            GraphicsPath path = new GraphicsPath();

            foreach (CodeCell.AgileMap.Core.ShapeLineString line in ply.Parts)
            {
                PointF[] pts = new PointF[line.Points.Length];
                for (int i = 0; i < pts.Length; i++)
                {
                    if (!feature.Projected)
                    {
                        tran.Geo2Prj(line.Points[i].X, line.Points[i].Y, out prjX, out prjY);
                    }
                    else
                    {
                        prjX = line.Points[i].X;
                        prjY = line.Points[i].Y;
                    }
                    tran.Prj2Screen(prjX, prjY, out screenX, out screenY);
                    pts[i].X = screenX;
                    pts[i].Y = screenY;
                }
                path.AddCurve(pts.ToArray());
                //path.AddLines();
                path.StartFigure();
            }
            return(path);
        }
예제 #2
0
        public static ListViewItem ToListViewItem(this CodeCell.AgileMap.Core.Feature fet)
        {
            string[] values = fet.FieldValues;
            if (values == null || values.Length == 0)
            {
                return(null);
            }
            ListViewItem it = new ListViewItem(values[0]);

            for (int i = 1; i < values.Length; i++)
            {
                it.SubItems.Add(values[i]);
            }
            return(it);
        }
예제 #3
0
 public void RemoveFeature(CodeCell.AgileMap.Core.Feature feature)
 {
     _vecthorHost.RemoveFeature(feature.OID);
 }
예제 #4
0
 public void AddFeature(CodeCell.AgileMap.Core.Feature feature)
 {
     _vecthorHost.Add(new SimpleVectorObject(feature.FieldValues, feature.Geometry));
 }
예제 #5
0
 internal void AddFeature(CodeCell.AgileMap.Core.Feature feature)
 {
     _geoItems.Add(feature);
 }