private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOFeatureDataset layer, string name, GSOFeature oldfeat)
        {
            line = LatLon2Coord_Line(line);

            double width_all  = interval * (num_width - 1);
            double height_all = interval * (num_height - 1);

            line.Clone();
            GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;

            GSOPoint3d p1 = line[0][0];
            GSOPoint3d p2 = line[0][1];

            double daltaX = p2.X - p1.X;
            double daltaY = p2.Y - p1.Y;

            double agree = Math.Atan(daltaY / daltaX);

            line.MoveXY((-0.5 * width_all - interval) * Math.Sin(agree), (0.5 * width_all + interval) * Math.Cos(agree));

            line.MoveZ(height_all / -2);

            for (int i = 0; i < num_width; i++)
            {
                for (int j = 0; j < num_height; j++)
                {
                    GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;

                    templine.MoveXY((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));

                    templine = Coord2LatLon_Line(templine);

                    templine.MoveZ(interval * j);

                    GSOFeature feat = layer.CreateFeature();
                    feat.Geometry       = templine;
                    feat.Geometry.Style = style;
                    feat.Name           = name;
                    SetFields(oldfeat, feat);
                    layer.AddFeature(feat);
                }
            }
        }
        private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
        {
            GSOGeoPolyline3D            cloneline = line.Clone() as GSOGeoPolyline3D;
            GSOExtendSectionLineStyle3D style     = createRectStyle(width, height);

            if (style == null)
            {
                return(null);
            }
            cloneline.Style = style;
            return(cloneline);
        }
Пример #3
0
        private GSOGeoPolyline3D Coord2LatLon_Line(GSOGeoPolyline3D line)
        {
            GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;

            for (int i = 0; i < newline[0].Count; i++)
            {
                GSOPoint3d pt      = newline[0][i];
                GSOPoint2d pt2d    = new GSOPoint2d(pt.X, pt.Y);
                GSOPoint2d pt2dnew = Coord2LatLon(pt2d);

                GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
                newline[0][i] = ptnew;
            }
            return(newline);
        }
Пример #4
0
        private GSOFeature CreatePipeRect(GSOFeature shp_feat, GSOGeoPolyline3D line, double width, double height)
        {
            GSOFeature       newRectfeat = new GSOFeature();
            GSOGeoPolyline3D cloneline   = line.Clone() as GSOGeoPolyline3D;

            GSOExtendSectionLineStyle3D style = createRectStyle(width, height);

            if (style == null)
            {
                return(null);
            }

            cloneline.Style      = style;
            newRectfeat.Geometry = cloneline;
            return(newRectfeat);
        }
Пример #5
0
        private void one2Multi(GSOGeoPolyline3D line, int num_width, int num_height, double interval, GSOPipeLineStyle3D style, GSOLayer layer,string name)
        {
            line = LatLon2Coord_Line(line);

            double width_all = interval * (num_width-1);
            double height_all = interval * (num_height-1);

            line.Clone();
            GSOGeoPolyline3D line_1 = line.Clone() as GSOGeoPolyline3D;

            GSOPoint3d p1 = line[0][0];
            GSOPoint3d p2 = line[0][1];

            double daltaX = p2.X-p1.X;
            double daltaY = p2.Y-p1.Y;

            double agree = Math.Atan(daltaY/daltaX);

            line.MoveXY((-0.5*width_all-interval)*Math.Sin(agree),(0.5*width_all+interval)*Math.Cos(agree));

            line.MoveZ(height_all / -2);

            for (int i = 0; i < num_width; i++)
            {
                for (int j = 0; j < num_height; j++)
                {
                    GSOGeoPolyline3D templine = line.Clone() as GSOGeoPolyline3D;

                    templine.MoveXY((i + 1) * interval * Math.Sin(agree), -1 * (i + 1) * interval * Math.Cos(agree));

                    templine = Coord2LatLon_Line(templine);

                    templine.MoveZ(interval*j);

                    GSOFeature feat = new GSOFeature();
                    feat.Geometry = templine;
                    feat.Geometry.Style = style;
                    feat.Name = name;
                    layer.AddFeature(feat);
                }
            }
        }
Пример #6
0
        private GSOGeoPolyline3D LatLon2Coord_Line(GSOGeoPolyline3D line)
        {
            GSOGeoPolyline3D newline = line.Clone() as GSOGeoPolyline3D;
            for (int i = 0; i < newline[0].Count; i++)
            {
                GSOPoint3d pt = newline[0][i];
                GSOPoint2d pt2d = new GSOPoint2d(pt.X, pt.Y);
                GSOPoint2d pt2dnew = LatLon2Coord(pt2d);

                GSOPoint3d ptnew = new GSOPoint3d(pt2dnew.X, pt2dnew.Y, pt.Z);
                newline[0][i] = ptnew;

            }
            return newline;
        }
Пример #7
0
        private GSOFeature CreatePipeRect(GSOFeature shp_feat,GSOGeoPolyline3D line,double width,double height)
        {
            GSOFeature newRectfeat = new GSOFeature();
            GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;

            GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
            if (style == null)
                return null;

            cloneline.Style = style;
            newRectfeat.Geometry = cloneline;
            return newRectfeat;
        }
Пример #8
0
 private GSOGeoPolyline3D CreatePipeRect(GSOGeoPolyline3D line, double width, double height)
 {
     GSOGeoPolyline3D cloneline = line.Clone() as GSOGeoPolyline3D;
     GSOExtendSectionLineStyle3D style = createRectStyle(width, height);
     if (style == null)
     {
         return null;
     }
     cloneline.Style = style;
     return cloneline;
 }