[GRASS-user] Euclidean distance (grow.distance) on raster to
certain extent?
Moritz Lennert
mlennert at club.worldonline.be
Mon May 7 12:00:01 EDT 2012
On 07/05/12 16:36, Daniel Lee wrote:
> Hi Tanya,
>
> I would use r.distance rather than r.grow.distance and then reclassify
> the results to include only areas with <=1108 m distance - that should
> be a lot easier.
I don't think r.distance gives what you want, however r.grow.distance
should be exactly your tool:
As a starting point you need a raster map with all pixels in the orchard
non-null and all other pixels null Let's call that raster map
'orchard'. Then you can do the following:
r.grow.distance input=orchard distance=distance_map
Then, if you only want to see the distance from the orchard to 1108m,
then you can use r.mapcalc:
r.mapcalc "final_distance_map=if(distance_map>1108, null(), distance_map)"
All this keeping in mind that I don't understand what you mean by "I
recognize this tool does not allow a distance to be included".
If this means that you also want to measure a distance _within_ the
orchard, then instead of using a raster map of the orchard, use as input
to r.grow.distance a raster map with only the center pixel of the
orchard non-null.
Moritz
>
> 2012/5/7 Tanya Dyck <tanya.dyck at hotmail.com <mailto:tanya.dyck at hotmail.com>>
>
> Hello,
>
> I am trying to run the grow.distance command to create a raster that
> displays the euclidean distance from an 'orchard' outward to 1108m.
> I am not trying to measure the distance between 2 non-null
> features, but simply wish to have the euclidean distance extend out
> from the orchard to 1108m. I recognize this tool does not allow a
> distance to be included so I created a buffer around my orchard
> (1108m) and intended to run grow.distance on that, however it
> outputs the distance as if it includes the full raster extent (so I
> have an output raster of 1108m that is all yellow as opposed to a
> range of values displaying varying distances) and not limited to my
> buffer. I want it to assume the buffer extent is the raster extent,
> so to speak. Is there another way to do this?
> Any ideas would be much appreciated.
>
> Best,
>
> Tanya
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
More information about the grass-user
mailing list