예제 #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));
 }