[GRASS-user] filling inter-contour area with constant value
grass4u at gmail.com
Wed Apr 30 11:50:42 PDT 2014
Let's say you have the elevation field in your shapefile and the contour
interval is 2 meters.
# Import your shapefile into GRASS
v.in.ogr dsn=contours.shp output=contours type=boundary
# Add centroids to the imported boundaries to make areas
v.centroids input=contours output=contourareas
# Convert the contour areas to raster filling inter-contour areas with
v.to.rast input=contourareas output=contourareas use=attr
# Now you want to add a half of the contour interval to get what you want
contoursteps is what you need, I think.
On Tue, Apr 29, 2014 at 4:19 AM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:
> [Please keep threads on the list]
> On 29/04/14 00:33, John Ciolek wrote:
>> Hi Moritz.
>> What do you mean by the following suggestion?
>> On Apr 28, 2014, at 2:45 AM, Moritz Lennert wrote:
>> - if necessary, add a line at the edge of the region and patch that
>>> with your contour lines to close polygons (v.in.region, v.patch)
>> Are you suggesting that you can close a contour (connect the beginning
>> point to the ending point) using v.in.region or v.patch?
> No, not the beginning point to the end point. Either you have closed
> contours or your contours go over the edge of your current region, meaning
> that some contours are not closed. So, in order to close them, you can do
> so arbitrarily at the edge of your region by patching in a line that
> represents that edge. This line can be created with v.in.region.
> grass-user mailing list
> grass-user at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user