[GRASS-user] Re: v.delaunay and v.category problem

Andrea Pogliaghi andrea.pogliaghi at gmail.com
Thu Mar 31 03:18:16 EDT 2011


On Wed, Mar 30, 2011 at 11:14 PM, Richard Chirgwin <rchirgwin at ozemail.com.au
> wrote:

> On 30/03/11 9:21 PM, grass-user-request at lists.osgeo.org wrote:
>
>> Hi all,
>>
>> I'm trying to use v.delaunay to get the lines connecting centroids in
>> thiessen polygons because I need to compute some statistics on the length
>> of
>> those segments.
>> I'm facing a problem that maybe somebody could help me to solve.
>>
>> Basically I run v.delaunay with the -l option to get lines instead of the
>> polygons, I get the resulting vector, but there is no attribute tables
>> associated to it.
>> My idea was to run v.db.addtable to create a new empty attribute table,
>> then
>> v.category to assign cat numbers and the v.to.db to compute and add to the
>> attribute table the parameter I need (ie the length).
>> The problem is that when I run v.category nothing happens, and the
>> attribute
>> table remains empty.
>>
>> Am I missing somethng?
>>
>> Any help appreciated.
>>
>> Ing. Andrea Pogliaghi
>> Milano - Italy
>>
> Thoughts ...
>
>
Hi Richard,


> 1. Try skipping the v.category step. Try v.to.db option=cat column=cat
>
I did, but it still doesn't work....
When I run v.to.db I get:

GRASS 6.4.0 (utm32):~ > v.to.db map=a_lidar_delaunay option=cat column=cat
Reading features...
 100%
Updating database...
 100%
0 categories read from vector map (layer 1)
0 records updated/inserted (layer 1)

and the attribute table is still empty.


>
> 2. What do you get from v.info on the v.delaunay output?
>

That's the output:

v.info a_lidar_delaunay
 +----------------------------------------------------------------------------+
 | Layer:
a_lidar_delaunay                                          |
 | Mapset:
andre                                                     |
 | Location:
utm32                                                     |
 | Database:
/home/andrea/grassdata                                    |
 |
Title:                                                                     |
 | Map scale:
1:1                                                       |
 | Map format:
native                                                    |
 | Name of creator:
andrea                                                    |
 |
Organization:                                                              |
 | Source date:     Thu Mar 31 09:07:59
2011                                  |
 |----------------------------------------------------------------------------|
 |   Type of Map:  vector (level:
2)                                          |
 |
|
 |   Number of points:       0               Number of areas:
0          |
 |   Number of lines:        29971           Number of islands:
0          |
 |   Number of boundaries:   0               Number of faces:
0          |
 |   Number of centroids:    0               Number of kernels:
0          |
 |
|
 |   Map is 3D:
No                                               |
 |   Number of dblinks:
1                                                |
 |
|
 |         Projection: Universal Transverse Mercator (zone
0)                 |
 |               N:        5150078.68    S:
5150000                 |
 |               E:        1738099.33    W:
1738000.01                 |
 |
|
 |   Digitization threshold:
0                                                |
 |
Comments:                                                                |
 |
|
 +----------------------------------------------------------------------------+


If I run v.delaunay without the -l switch (and thus not obtaining the lines
but the whole triangles), then v.category and v.to.db work,so I think that
maybe there's some issue with the way v.delaunay generates the lines?

Cheers
Andrea


> Cheers,
> Richard
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110331/d1d8d2b0/attachment.html


More information about the grass-user mailing list