Hi!
I am new to using GIS and GRASS.
I am currently working on a task where I have to determine the type of surface around a specific coordinate. For example what is the total water surface area in a 100km radius around the Eiffeltower.
I have found a landcover map ( http://glcf.umiacs.umd.edu/data/landcover/ ) with a 1km raster that isn't perfect but should do the job. After some time I managed displaying the map and showing only specific values in GRASS. My next step would have been exporting the map to an image, draw the desired circles with a image editing tool and count the contained fields manually.
But taking a closer look at GRASS and the vectormap function, I wondered if it would be possible to create vector circles, merge them with the existing map and let GRASS do the work of counting the Areas.
Does this seem possible? If yes, what would be the first steps?
Any help would be very much appreciated
Kindest regards
Nikolaus
Hi,
one possibility is:
1) create vector-map with Eiffeltower-coordinate as point
2) v.buffer
3) v.to.rast ... => "eiffelbuffer"
4) r.mask ("eiffelbuffer")
5) r.mapcalc ... "watercells" if (landcover==water,1,null())
6) r.sum rast="watercells"
for (exact) syntax please read the manuals.
If any problems occur, just tell.
Hope I could help,
Achim
Nikolaus Arnold schrieb:
Hi!
I am new to using GIS and GRASS.
I am currently working on a task where I have to determine the type of
surface around a specific coordinate. For example what is the total
water surface area in a 100km radius around the Eiffeltower.
I have found a landcover map (
http://glcf.umiacs.umd.edu/data/landcover/ ) with a 1km raster that
isn't perfect but should do the job. After some time I managed
displaying the map and showing only specific values in GRASS. My next
step would have been exporting the map to an image, draw the desired
circles with a image editing tool and count the contained fields manually.
But taking a closer look at GRASS and the vectormap function, I wondered
if it would be possible to create vector circles, merge them with the
existing map and let GRASS do the work of counting the Areas.
Does this seem possible? If yes, what would be the first steps?
Any help would be very much appreciated
Kindest regards
Nikolaus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
On 27/02/09 09:53, Nikolaus Arnold wrote:
Hi!
I am new to using GIS and GRASS.
I am currently working on a task where I have to determine the type of surface around a specific coordinate. For example what is the total water surface area in a 100km radius around the Eiffeltower.
I have found a landcover map ( http://glcf.umiacs.umd.edu/data/landcover/ ) with a 1km raster that isn't perfect but should do the job.
If it is for Europe, you might want to check out Corine Landcover [1] which has a resolution of 1 ha.
After some time I managed displaying the map and showing only specific values in GRASS. My next step would have been exporting the map to an image, draw the desired circles with a image editing tool and count the contained fields manually.
But taking a closer look at GRASS and the vectormap function, I wondered if it would be possible to create vector circles, merge them with the existing map and let GRASS do the work of counting the Areas.
Does this seem possible? If yes, what would be the first steps?
1) Use buffering to create desired buffers: r.buffer or v.buffer (possibly + v.to.rast)
2) Calculate statistics of land use per buffer: r.stats, r.report if you use raster buffers, v.rast.stats if you use vector buffers
Moritz
[1]http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1007 and http://www.eea.europa.eu/themes/landuse/clc-download
Hi!
Thanks a lot for the quick responses.
It worked fine with - v.buffer, v.to.rast, r.mask, r.mapcalc /
"watercells" = if (landcover==water,1,null()) and r.sum rast="watercells"
I am still trying to get it to work with v.rast.stats (program is asking
for a database connection and i don't know, what the column prefix might
be)
An additional request for my work would be to separate the circle into
orientations meaning making 4 circle-segments (North, East, South, West).
As far is I understand, v.buffer would only create "some space" around the
created vector point. The first thing I would think of is creating 4
"Angle-maps"-Masks and combine them with the buffer circle. Does this seem
possible?
Thanks again for your help
Nikolaus
On 27/02/09 09:53, Nikolaus Arnold wrote:
Hi!
I am new to using GIS and GRASS.
I am currently working on a task where I have to determine the type of
surface around a specific coordinate. For example what is the total
water surface area in a 100km radius around the Eiffeltower.
I have found a landcover map (
http://glcf.umiacs.umd.edu/data/landcover/ ) with a 1km raster that
isn't perfect but should do the job.
If it is for Europe, you might want to check out Corine Landcover [1]
which has a resolution of 1 ha.
After some time I managed
displaying the map and showing only specific values in GRASS. My next
step would have been exporting the map to an image, draw the desired
circles with a image editing tool and count the contained fields
manually.
But taking a closer look at GRASS and the vectormap function, I wondered
if it would be possible to create vector circles, merge them with the
existing map and let GRASS do the work of counting the Areas.
Does this seem possible? If yes, what would be the first steps?
1) Use buffering to create desired buffers: r.buffer or v.buffer
(possibly + v.to.rast)
2) Calculate statistics of land use per buffer: r.stats, r.report if you
use raster buffers, v.rast.stats if you use vector buffers
Moritz
[1]http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1007
and http://www.eea.europa.eu/themes/landuse/clc-download
Hi!
I am still working on the extended problem and so far i have done the
following.
I created circles and sectors in autocad and imported the dxf file (first
one sector at a time).
The import didn't seem to work that well, so i converted lines to
boundaries and used v.clean to get areas, and inserted a centroid with
v.digit and created a rastermap with v.to.rast (source: val, and
featuretype area).
using the rastermap as mask I can use r.report or r.stats to get the
waterarea/watercells.
Because there are 160 of these areas i was wondering if there is a
possibility to use all of the areas at once (or at least more than one at
a time) assign some kind of an ID to every area and get the results
separately for every area.
trying to use more than one area at a time always got me the total stats
for all areas.
kindest regards
Nikolaus
On 27/02/09 09:53, Nikolaus Arnold wrote:
Hi!
I am new to using GIS and GRASS.
I am currently working on a task where I have to determine the type of
surface around a specific coordinate. For example what is the total
water surface area in a 100km radius around the Eiffeltower.
I have found a landcover map (
http://glcf.umiacs.umd.edu/data/landcover/ ) with a 1km raster that
isn't perfect but should do the job.
If it is for Europe, you might want to check out Corine Landcover [1]
which has a resolution of 1 ha.
After some time I managed
displaying the map and showing only specific values in GRASS. My next
step would have been exporting the map to an image, draw the desired
circles with a image editing tool and count the contained fields
manually.
But taking a closer look at GRASS and the vectormap function, I wondered
if it would be possible to create vector circles, merge them with the
existing map and let GRASS do the work of counting the Areas.
Does this seem possible? If yes, what would be the first steps?
1) Use buffering to create desired buffers: r.buffer or v.buffer
(possibly + v.to.rast)
2) Calculate statistics of land use per buffer: r.stats, r.report if you
use raster buffers, v.rast.stats if you use vector buffers
Moritz
[1]http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1007
and http://www.eea.europa.eu/themes/landuse/clc-download
On 05/03/09 23:15, ich@the-masterplan.net wrote:
Hi!
I am still working on the extended problem and so far i have done the
following.
I created circles and sectors in autocad and imported the dxf file (first
one sector at a time).
The import didn't seem to work that well, so i converted lines to
boundaries and used v.clean to get areas, and inserted a centroid with
v.digit and created a rastermap with v.to.rast (source: val, and
featuretype area).
using the rastermap as mask I can use r.report or r.stats to get the
waterarea/watercells.
Because there are 160 of these areas i was wondering if there is a
possibility to use all of the areas at once (or at least more than one at
a time) assign some kind of an ID to every area and get the results
separately for every area.
trying to use more than one area at a time always got me the total stats
for all areas.
Just give each centroid a different category value (e.g. using v.category, or by hand using v.digit), then v.to.rast use=cat. Then r.stats/r.report should give you the result by category.
Moritz
Finally got it.
Import map:
v.in.dxf
created areas:
v.type input=map1 output=map2 type=line,boundary
v.clean input=map2 output=map3 tool=snap thresh=0.0001
v.centroids input=map3 output=map4 option=add
checked with v.digit (strangely v.centroids always categorized in the same
way, but in the outer ring it mixed up two areas, but that was easily
corrected by manually changing those two categories)
v.to.rast use=cat
masked with rastermap - watercellvalue
r.report
thanks a lot
Nikolaus
Am Freitag, 6. März 2009 09:25:45 schrieb Markus Metz:
Moritz Lennert wrote:
> On 05/03/09 23:15, ich@the-masterplan.net wrote:
>> Hi!
>>
>> I am still working on the extended problem and so far i have done the
>> following.
>> I created circles and sectors in autocad and imported the dxf file
>> (first
>> one sector at a time).
>> The import didn't seem to work that well, so i converted lines to
>> boundaries and used v.clean to get areas, and inserted a centroid with
>> v.digit and created a rastermap with v.to.rast (source: val, and
>> featuretype area).
>> using the rastermap as mask I can use r.report or r.stats to get the
>> waterarea/watercells.
>>
>> Because there are 160 of these areas i was wondering if there is a
>> possibility to use all of the areas at once (or at least more than
>> one at
>> a time) assign some kind of an ID to every area and get the results
>> separately for every area.
>> trying to use more than one area at a time always got me the total
stats
>> for all areas.
>
> Just give each centroid a different category value (e.g. using
> v.category, or by hand using v.digit), then v.to.rast use=cat. Then
> r.stats/r.report should give you the result by category.
Or v.to.db option=area?
Markus M
Nikolaus Arnold wrote:
Finally got it.
Import map:
v.in.dxf
created areas:
v.type input=map1 output=map2 type=line,boundary
v.clean input=map2 output=map3 tool=snap thresh=0.0001
v.centroids input=map3 output=map4 option=add
checked with v.digit (strangely v.centroids always categorized in the same
way, but in the outer ring it mixed up two areas, but that was easily
corrected by manually changing those two categories)
would
v.centroids input=map3 output=map4 option=add cat=<cat_max_val + 1>
help?