当前位置: 首页>>代码示例>>C#>>正文


C# IFeatureSet.NumRows方法代码示例

本文整理汇总了C#中IFeatureSet.NumRows方法的典型用法代码示例。如果您正苦于以下问题:C# IFeatureSet.NumRows方法的具体用法?C# IFeatureSet.NumRows怎么用?C# IFeatureSet.NumRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IFeatureSet的用法示例。


在下文中一共展示了IFeatureSet.NumRows方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetBasinIndexByID

        private static int GetBasinIndexByID(IFeatureSet shed, int id)
        {
            for (var i = 0; i < shed.NumRows(); i++)
            {
                if (int.Parse(shed.DataTable.Rows[i].ItemArray[0].ToString()) == id)
                {
                    return i;
                }
            }

            return -1;
        }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:12,代码来源:Hydrology.cs

示例2: Configure

 private void Configure(IFeatureSet inFeatureSet)
 {
     FeatureType ft = inFeatureSet.FeatureType;
     if (ft != FeatureType.Point && ft != FeatureType.MultiPoint && ft != FeatureType.Unspecified)
     {
         throw new PointFeatureTypeException();
     }
     if (inFeatureSet.NumRows() == 0)
     {
         MyExtent = new Extent(-180, -90, 180, 90);
     }
     if (inFeatureSet.NumRows() == 1)
     {
         MyExtent = inFeatureSet.Extent.Copy();
         MyExtent.ExpandBy(10, 10);
     }
     Symbology = new PointScheme();
 }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:18,代码来源:PointLayer.cs

示例3: buildMergeDownstreamUpStream

 private static void buildMergeDownstreamUpStream(IFeatureSet newshed, int IDFieldNum, int LinksFieldNum, int DSFieldNum, int USFieldNum1, int USFieldNum2)
 {
     for (int i = 0; i <= newshed.NumRows() - 1; i++)
     {
         string currDSField = newshed.get_CellValue(DSFieldNum, i).ToString();
         if (currDSField != "-1")
         {
             for (int j = 0; j <= newshed.NumRows() - 1; j++)
             {
                 string links = newshed.get_CellValue(LinksFieldNum, j).ToString();
                 string[] split = links.Split(',');
                 for (int k = 0; k <= split.Length - 1; k++)
                 {
                     if (split[k].Trim() == currDSField)
                     {
                         newshed.EditCellValue(DSFieldNum, i, newshed.get_CellValue(IDFieldNum, j));
                         string upstream1 = newshed.get_CellValue(USFieldNum1, j).ToString();
                         if (upstream1 == "-1")
                         {
                             newshed.EditCellValue(USFieldNum1, j, newshed.get_CellValue(IDFieldNum, i));
                         }
                         else
                         {
                             newshed.EditCellValue(USFieldNum2, j, newshed.get_CellValue(IDFieldNum, i));
                         }
                         break;
                     }
                 }
             }
         }
     }
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:32,代码来源:Hydrology.cs

示例4: GetWshedFromStreamLink

        private static int GetWshedFromStreamLink(int streamLink, IFeatureSet streamShape, IFeatureSet shedShape)
        {
            int streamindx;
            const int LinkIDField = 0;
            const int WaterShedIDField = 13;
            for (streamindx = 0; streamindx <= streamShape.NumRows() - 1; streamindx++)
            {
                if (int.Parse(streamShape.get_CellValue(LinkIDField, streamindx).ToString()) == streamLink)
                {
                    return int.Parse(streamShape.get_CellValue(WaterShedIDField, streamindx).ToString());
                }
            }

            return -1;
        }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:15,代码来源:Hydrology.cs

示例5: Configure

 private void Configure(IFeatureSet inFeatureSet)
 {
     if (inFeatureSet.FeatureType != FeatureTypes.Point && inFeatureSet.FeatureType != FeatureTypes.MultiPoint)
     {
         throw new PointFeatureTypeException();
     }
     if (inFeatureSet.NumRows() == 0)
     {
         Envelope = new Envelope(new Coordinate(-180, -90), new Coordinate(180, 90));
     }
     if (inFeatureSet.NumRows() == 1)
     {
         Envelope = inFeatureSet.Envelope;
         Envelope.ExpandBy(10);
     }
     Symbology = new PointScheme();
 }
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:17,代码来源:PointLayer.cs

示例6: CreatePoints

        private void CreatePoints(
           IFeatureSet shapeLayer, int idField)
        {
            this.npoints1 = shapeLayer.NumRows();
            this.cpoints1 = new double[this.npoints1, 7];//x,y,z,z-inter,error,stderr
            this.quadTree1 = new QuadTree();

            for (int shp = 0; shp < shapeLayer.NumRows(); shp++)
            {
                Coordinate pt = shapeLayer.Features[shp].Coordinates[0];
                this.cpoints1[shp, 0] = pt.X;
                this.cpoints1[shp, 1] = pt.Y;
                this.cpoints1[shp, 6] = pt.Z;
                this.cpoints1[shp, 2] = Convert.ToDouble(shapeLayer.Features[shp].DataRow[idField]);
               // this.quadTree1.Insert(pt.X, pt.Y, shp);


                if (this.cpoints1[shp, 6] > this.extentZ1[1])
                {
                    this.extentZ1[1] = this.cpoints1[shp, 2];
                }

                if (this.cpoints1[shp, 2] > this.extentZ1[1])
                {
                    this.extentZ1[1] = this.cpoints1[shp, 2];
                }
                if (this.cpoints1[shp, 2] < this.extentZ1[0])
                {
                    this.extentZ1[0] = this.cpoints1[shp, 2];
                }
                //xmin ymin xmax ymax
                //xmin ymin zmin xmax ymax zmax
                if (pt.Z > this.extent1[5])
                {
                    this.extent1[5] = pt.Z;
                }

                if (pt.Y > this.extent1[4])
                {
                    this.extent1[4] = pt.Y;
                }

                if (pt.X > this.extent1[3])
                {
                    this.extent1[3] = pt.X;
                }

                if (pt.X < this.extent1[0])
                {
                    this.extent1[0] = pt.X;
                }

                if (pt.Y < this.extent1[1])
                {
                    this.extent1[1] = pt.Y;
                }
            }
            

        }
开发者ID:shoaib-ijaz,项目名称:geosoft,代码行数:60,代码来源:DataSourceInterpolators.cs

示例7: CreatePointsK

        private void CreatePointsK(
          IFeatureSet shapeLayer, int idField)
        {
            this.data = shapeLayer;
            this.npoints1 = shapeLayer.NumRows();
           // this.kpoints = new Kpoint[this.npoints1];//x,y,z,z-inter,error,stderr
            this.quadTree1 = new QuadTree();
            Stat NorthSouth = new Stat(false);
            Stat EastWest = new Stat(false); 
            Stat TopBott = new Stat(false);
            Stat Zvalue = new Stat(false);
            List<int> l = SelectRandom(shapeLayer.NumRows());
            this.npoints1 = l.Count();

            for (int shp1 = 0; shp1 < l.Count; shp1++)
            {
                int shp = l[shp1];
                Coordinate pt = shapeLayer.Features[shp].Coordinates[0];
                Kpoint point = new Kpoint(pt.X, pt.Y, double.IsNaN(pt.Z) ? 0 : pt.Z, Convert.ToDouble(shapeLayer.Features[shp].DataRow[idField]), shp);
                this.kpoints.Add(point );
                //this.cpoints1[shp, 0] = pt.X;
                //this.cpoints1[shp, 1] = pt.Y;
                //this.cpoints1[shp, 2] = Convert.ToDouble(shapeLayer.Features[shp].DataRow[idField]);
                this.quadTree1.Insert(pt.X, pt.Y, point);
                NorthSouth += new Stat(pt.Y);
                EastWest += new Stat(pt.X);
                TopBott += new Stat(pt.Z);
                Zvalue +=  new Stat(point.W);
            }
                this.extentZ1= new  double[2] {Zvalue.Min,Zvalue.Max};
                this.extent1= new  double[6]{EastWest.Min,NorthSouth.Min,TopBott.Min,EastWest.Max,NorthSouth.Max, TopBott.Max};
                this.idExtremPoints= new long[6]{EastWest.PosMin,NorthSouth.PosMin,TopBott.PosMin,EastWest.PosMax,NorthSouth.PosMax, TopBott.PosMax};
                this.idExtremeZPoints= new long[2]{Zvalue.PosMin,Zvalue.PosMax};
        }
开发者ID:shoaib-ijaz,项目名称:geosoft,代码行数:34,代码来源:DataSourceInterpolators.cs


注:本文中的IFeatureSet.NumRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。