Hi,

You could use focal function on your whole raster with a radius appropriate
to your roofs: not too large.
raster::focal

You could then use your rasterized roofs as masks then visualize the result
raster::rasterize
raster::mask
plot

If you want to go further than just visualizing:
Also, for each roof, you could determine different quantiles and determine
some areas that are optimal.
sp::over
or using raster::clump, thus getting one id per roof then calculate
quantiles

Then why not, polygonizing the result and dissolving:
raster::rasterToPolygons
maptools::unionSpatialPolygons


Best,

Mathieu

2012/1/12 didimayr <dieter.mayr@boku.ac.at>

> Dear all,
>
> I have a little bit complex problem and don't know how to start solving it.
> Maybe someone has experience with similar issues or knows a solution.
>
> 1) I have many Raster files with (solar-)energy-Values, based on a digital
> elevation model (DEM). Depending on the orientation and the slope of cell,
> the raster represents the applicability of this field to install a
> photovoltaic modul.
> 2) Furthermore I have polygons representing the shape of houses (=roof)
> lying in the same (raster) area. So the solar-values of the Raster
> indicate,
> if the house well orientated for a solar module.
>
> Now I first have to cut the raster with the polygons, in order to analyze
> only the roof areas (which are in my interest).
> Then comes the main problem: I want to know the energy-value on each roof
> (=within each polygon), however it should not only be the sum of the whole
> roof, because solarmodules are only situated on the best sites of the roof.
> Thus I need to identify a "cluster" or "window" of the highest cell-values
> within the polygon, which I want to sum up. If necessary I could define the
> size of this window/cluster.
>
>
> It seems to me that I have to work with a focal function or by using RSAGA:
> multi.focal.function.
> are there other possible approaches and has anyone done a similar analyzis?
>
> Thanks a lot and kind regards
> Dieter Mayr
>
>
>
>
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/summing-up-the-highest-Raster-values-within-polygons-tp7179641p7179641.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

