[GRASS-user] Determining number of overlapping features per location after import of shape file

Rainer M Krug r.m.krug at gmail.com
Tue Jun 24 03:39:12 EDT 2008


On Mon, Jun 23, 2008 at 9:08 PM, Markus Neteler <neteler at osgeo.org> wrote:
> Rainer,
>
> I suggest to try the snap parameters of v.in.ogr first. Maybe the SHAPE
> file is full of gaps and slivers (commonly found, even in governmental
> data).
> *Small* snapping values might cure it. Be careful to not snap, say,
> Africa to a triangle :)
>
> Markus

Thanks Markus,

but the information is there. If I display the layer and select
layer=2, I see the overlapping areas, and if I click i=on them to get
information (v.what -a map=fires at simulation ...), I get the following
info:


East: 255207.46888
North: 6235456.43154

Map: fireHistory
Mapset: simulation
Type: Centroid
Line: 3202
Layer: 1
Category: 4

Driver: dbf
Database: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/dbf/
Table: fireHistory
Key column: cat
cat : 4
YEAR : 2005
Layer: 1
Category: 178

Driver: dbf
Database: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/dbf/
Table: fireHistory
Key column: cat
cat : 178
YEAR : 1993
Layer: 1
Category: 208

Driver: dbf
Database: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/dbf/
Table: fireHistory
Key column: cat
cat : 208
YEAR : 1995
Layer: 2
Category: 3   <<---

and the one value marked by <<-- is the one which IO want to extract
into a raster or vector map.
Even if I do

v.extract input=fireHistory at simulation output=fires
type=point,line,boundary,area layer=2

it gives me the areas, but no associated attribute table.


>
> On Mon, Jun 23, 2008 at 12:13 PM, Rainer M Krug <r.m.krug at gmail.com> wrote:
>>
>> Hi
>>
>> I am importing a vector layer from a shape file as follow, and get the
>> warning below:
>>
>> > v.in.ogr  dsn=/home/rkrug/Documents/Projects/AlienSpread/data/input/
>> > layer=fireHistory output=fireHistory --overwrite
>>
>>
>> WARNING: 703 areas represent more (overlapping) features, because polygons
>>         overlap in input layer(s). Such areas are linked to more than 1
>>         row in attribute table. The number of features for those areas is
>>         stored as category in layer 2
>>
>>
>> I am aware of that, and I want to create a raster layer with the
>> number of features overlapping in each location. As I ultimately need
>> a raster layer, I thought to use the following, but I get the error
>> message below:
>>
>> > v.to.rast  input=fireHistory layer=2 output=mf use=attr column=category
>> > --overwrite
>>
>> ERROR: Unable to get layer info for vector map
>>
>> Why is that?
>>
>> Is there another way of getting the number of overlapping features per
>> cell?
>>
>> Thanks
>>
>> Rainer
>>
>>
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>> Biology, UCT), Dipl. Phys. (Germany)
>>
>> Plant Conservation Unit
>> Department of Botany
>> University of Cape Town
>> Rondebosch 7701
>> South Africa
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
> --
> Open Source Geospatial Foundation
> http://www.osgeo.org/
> http://www.grassbook.org/



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa


More information about the grass-user mailing list