Пример #1
0
        public IEnumerable <IFeature> SelectShapes(IEnvelope boundBox, double tolerance = 0, MapSelectionMode selectionMode = MapSelectionMode.Intersection)
        {
            if (boundBox == null)
            {
                throw new ArgumentNullException("boundBox");
            }

            object result = null;

            if (_shapefile.SelectShapes(boundBox.GetInternal(), tolerance, (SelectMode)selectionMode, ref result))
            {
                var indices = result as int[];
                if (indices != null)
                {
                    return(indices.Select(index => new Feature(_shapefile, index)));
                }
            }

            return(new List <IFeature>());
        }
Пример #2
0
 public bool LoadTilesForSnapshot(IEnvelope envelope, int width, string key)
 {
     return(_map.LoadTilesForSnapshot(envelope.GetInternal(), width, key));
 }
Пример #3
0
 public bool SetGeographicExtents(IEnvelope boundingBox)
 {
     return(_map.SetGeographicExtents(boundingBox.GetInternal()));
 }
Пример #4
0
        public IImageSource SnapShot(IEnvelope boundBox)
        {
            var img = _map.SnapShot(boundBox.GetInternal());

            return(BitmapSource.Wrap(img));
        }
Пример #5
0
 public bool IsSameExt(ISpatialReference proj, IEnvelope bounds, int numSamplingPoints = 8)
 {
     return(_projection.IsSameExt[proj.GetInternal(), bounds.GetInternal(), numSamplingPoints]);
 }
Пример #6
0
 public bool GridStatisticsForPolygon(IGridSource grid, GridSourceHeader header, IEnvelope gridExtents,
                                      IGeometry polygon, double nodataValue, ref double meanValue, ref double minValue, ref double maxValue)
 {
     return(_utils.GridStatisticsForPolygon(grid.GetInternal(), header.GetInternal(), gridExtents.GetInternal(),
                                            polygon.GetInternal(), nodataValue, ref meanValue, ref minValue, ref maxValue));
 }