[GRASS-user] Attribute transfer from one table to another based on position of vector items

Daniel Lee lee at isi-solutions.org
Sat Jun 9 01:50:14 PDT 2012


Hi Mike,

Couldn't you use v.what.vect to upload the values from the lines to the
points? They're collocated, right?

Best,
Daniel

--

B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions GbR
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder

Softwarecenter 3
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: Lee at isi-solutions.org
Web: http://www.isi-solutions.org




2012/6/9 Michael Perdue <michael_perdue at yahoo.ca>

> I have a similar goal, but the solution in the case below will not work
> for me.
>
> I have three points A,B & C that I have linked together through Delaunay
> triangulation;
>
>        A
>        /\
>       /  \
>      /    \
>     /      \
>    /        \
>   /          \
>  /____________\
> B              C
>
> I want to create a new attribute for each point that is the average of the
> length of all the lines attaching each point to it's neighbours.
> So if;
> B->A = 1.0m
> A->C = 0.8m
> C->B = 0.6m
>
> Then
> A = (1.0m + 0.8m) = 0.9m
> B = (1.0m + 0.6m) = 0.8m
> C = (0.6m + 0.8m) = 0.7m
>
> Creating the Delaunay triangles and uploading the length of each face is
> easy, but I'm not entirely clear on how to relate the length of those
> vectors back to the points they were derived from. Any help would be
> greatly appreciated.
>
> Cheers,
>
> Mike
>
>
> On 2012-06-08, at 11:10 AM, Markus Metz wrote:
>
> On Fri, Jun 8, 2012 at 2:25 PM, Jaromír Kamler <kamler at centrum.cz> wrote:
>
> Hi,
>
>
> I have two vectors imported from SHP. One contains lines (areas), which
>
> represents sites and in other are texts with cost of sites. I imported them
>
> to GRASS. Texts with costs of ground are now points with cost in attribute
>
> table and I turned circuid lines to the areas with centroids.I need copy
>
> costs from attribute table of costs to the attribute table of sites vector.
>
> I have no key for connection of this tables. Only one "key" is their
>
> position, because points with cost attribute are above corresponding areas.
>
> One point with cost of ground is above one area. How get cost of
>
> corresponding point to the corresponding attribute of ground? I do not see
>
> any simple possibility.
>
>
> If both vectors are available as shapefiles, you could put the two
> shapefiles into one directory (with no other shapefiles in it) and
> then try something like
>
> v.in.ogr dsn=/path/to/folder/with/shapefiles/ type=boundary,centroid
>
> With type=boundary,centroid, lines will be converted to boundaries and
> points to centroids. Attributes attached to sites (points) will now be
> attached to areas, nothing else to do.
>
> Markus M
> _______________________________________________
> grass-user mailing list
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120609/495c0bcd/attachment.html>


More information about the grass-user mailing list