Esempio n. 1
0
        public static void AddFeatureToFeatureClass(PolylineWithId feature, IFeatureClass pFeatureClass)
        {
            IFeature pFeature = pFeatureClass.CreateFeature();

            pFeature.Shape = feature.polyline as IGeometry;
            var field = pFeatureClass.Fields;

            pFeature.set_Value(3, feature.id);
            pFeature.Store();
        }
Esempio n. 2
0
        /// <summary>
        /// 临时的线转化为AE的线
        /// </summary>
        /// <param name="templateLines"></param>
        /// <returns></returns>
        static public List <PolylineWithId> CovertMyLineToPoline(List <TemplateLine> templateLines)
        {
            List <PolylineWithId> PolylineWithIds = new List <PolylineWithId>();

            foreach (TemplateLine line in templateLines)
            {
                PolylineWithId polyline = new PolylineWithId();

                foreach (var coords in line.coords)
                {
                    Point point = new Point()
                    {
                        X = coords.x, Y = coords.y
                    };
                    polyline.polyline.AddPoint(point);
                    polyline.id = line.Id;
                }
                PolylineWithIds.Add(polyline);
            }
            return(PolylineWithIds);
        }