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


C# Features.New方法代码示例

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


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

示例1: GetFeaturesInView

 public System.Collections.Generic.IEnumerable<IFeature> GetFeaturesInView(BoundingBox box, double resolution)
 {
     var features = new Features();
     IRaster raster = null;
     var view = new Viewport { Resolution = resolution, Center = box.GetCentroid(), Width = (box.Width / resolution), Height = (box.Height / resolution) };
     if (TryGetMap(view, ref raster))
     {
         IFeature feature = features.New();
         feature.Geometry = raster;
         features.Add(feature);
     }
     return features;
 }
开发者ID:HackatonArGP,项目名称:Guardianes,代码行数:13,代码来源:ArcGISImageServiceProvider.cs

示例2: GetFeaturesInView

        public IEnumerable<IFeature> GetFeaturesInView(BoundingBox box, double resolution)
        {
            //If there are no layers (probably not initialised) return nothing
            if (Capabilities.layers == null)
                return new Features();

            IFeatures features = new Features();
            IRaster raster = null;
            IViewport viewport = new Viewport { Resolution = resolution, Center = box.GetCentroid(), Width = (box.Width / resolution), Height = (box.Height / resolution) };
            if (TryGetMap(viewport, ref raster))
            {
                var feature = features.New();
                feature.Geometry = raster;
                features.Add(feature);
            }
            return features;
        }
开发者ID:HackatonArGP,项目名称:Guardianes,代码行数:17,代码来源:ArcGisDynamicProvider.cs

示例3: FetchTiles

        public IFeatures FetchTiles(BoundingBox boundingBox, double resolution)
        {
            Extent extent = new Extent(boundingBox.Min.X, boundingBox.Min.Y, boundingBox.Max.X, boundingBox.Max.Y);
            int level = BruTile.Utilities.GetNearestLevel(source.Schema.Resolutions, resolution);
            IList<TileInfo> tiles = source.Schema.GetTilesInView(extent, level);

            ICollection<WaitHandle> waitHandles = new List<WaitHandle>();
                        
            foreach (TileInfo info in tiles)    
            {
                if (bitmaps.Find(info.Index) != null) continue;
                if (queue.Contains(info.Index)) continue;
                AutoResetEvent waitHandle = new AutoResetEvent(false);
                waitHandles.Add(waitHandle);
                queue.Add(info.Index);

                Thread thread = new Thread(GetTileOnThread);
                thread.Start(new object[] { source.Provider, info, bitmaps, waitHandle });
                //!!!ThreadPool.QueueUserWorkItem(GetTileOnThread, new object[] { source.Provider, info, bitmaps, waitHandle });
            }

            //foreach (WaitHandle handle in waitHandles)
            //    handle.WaitOne();

            IFeatures features = new Features();
            foreach (TileInfo info in tiles)
            {
                byte[] bitmap = bitmaps.Find(info.Index);
                if (bitmap == null) continue;
                IRaster raster = new Raster(bitmap, new BoundingBox(info.Extent.MinX, info.Extent.MinY, info.Extent.MaxX, info.Extent.MaxY));
                IFeature feature = features.New();
                feature.Geometry = raster;
                features.Add(feature);
            }
            return features;
        }
开发者ID:sridhar19091986,项目名称:sharpmapx,代码行数:36,代码来源:TileProvider.cs

示例4: MemoryProvider

 /// <summary>
 /// Initializes a new instance of the <see cref="MemoryProvider"/>
 /// </summary>
 /// <param name="geometry">Geometry to be in this datasource</param>
 public MemoryProvider(Geometry geometry)
 {
     _Features = new Features();
     IFeature feature = _Features.New();
     feature.Geometry = geometry;
     _Features.Add(feature);
 }
开发者ID:sridhar19091986,项目名称:sharpmapx,代码行数:11,代码来源:MemoryProvider.cs


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