Re: [GRASS-user] v.distance and optimizations

2017-11-08 Thread Moritz Lennert

On 03/11/17 14:45, Eric Patton wrote:

Hi,

I am running v.distance on a massive point vector which represents 
coastline vertices, uploading the attributes of another point vector, in 
this case, the vectorized point version of a DEM slope raster.


While the program is working as expected, (I have seen the output on 
smaller files, and it looks correct), it is extremely slow because the 
‘from’ vector has ~ 700k points in it, and my search radius is 200 m for 
each point. I checked htop and v.distance is only using one CPU. The 
process has been running for about a week, and is at 69%.


It would be interesting to find out if this is due to the actual 
distance algorithm, or more to database access. You might want to try 
using the -p flag and redirect the output to a file just to see if this 
is faster.


I was 
wondering if there were any way to make v.distance use more than one CPU 
(I have four)? Or perhaps there is an environment variable I’m not aware of?


AFAIK there is no parallelization in v.distance.

Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] v.distance and optimizations

2017-11-03 Thread Eric Patton
 Hi,

I am running v.distance on a massive point vector which represents
coastline vertices, uploading the attributes of another point vector, in
this case, the vectorized point version of a DEM slope raster.

While the program is working as expected, (I have seen the output on
smaller files, and it looks correct), it is extremely slow because the
‘from’ vector has ~ 700k points in it, and my search radius is 200 m for
each point. I checked htop and v.distance is only using one CPU. The
process has been running for about a week, and is at 69%. I was wondering
if there were any way to make v.distance use more than one CPU (I have
four)? Or perhaps there is an environment variable I’m not aware of?

~ Eric.
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] v.distance -a : how join output table to output lines?

2013-10-08 Thread Moritz Lennert

On 08/10/13 13:52, Enrico Gallo wrote:

Dear Micha, dear list,


2013/10/3 Micha Silver


On 03/10/2013 12:42, Enrico Gallo wrote:

Dear list,

when using (GRASS 6.4.3)  v.distance -a ,  points to lines, you get:
1. [output] vector theme, with no attribute table, with N elements
2. [table] , with N rows, optionally with source and target cat

Any idea about joining the two outputs without spatial join?

You probably want to look at the "upload=..." parameter



the problem is a bit more complex than using the "upload" parameter, IMHO

when using v.distance looking for all possible connections (not only
the nearest one)

v.distance -a from=vector_from to=vector_to output=connector
upload=cat,dist column=cat_to,distance table=connector_attributes

we get

- a vector output with connecting lines
- an output table with from_cat [by default], cat_to&  distance
fields, completely populated

the output table seems to me a perfect attribute table for vector
output, but no common field is given to join the two:

Adding a table (v.db.addtable) and updating the cat field (v.to.db,
cat) of vector output doesn't solve, as I am not able to add an
autoincrement field in output table to perfom a join, without direct
SQL tricks.

Connecting the given output table (v.db.addtable) and then updating a
cat field, doesn't help even, because v.to.db uses an "INSERT"
statement with cat option , not the usual "UPDATE", so you have N
records with no cat + N records with cat but without attributes.

In both cases we are assuming the two "outputs" have the same order
for elements , but I don't know how much robust is this assumption!

But without a robust join, any spatial analysis of connecting lines is
almost impossible...

I am missing something trivial to bypass this impasse?


No, what you are trying to do seems quite obvious, but is not 
implemented in v.distance AFAIK. I think you should file an enhancement 
request. I agree that being able to link the table resulting from -a to 
the vector map would be a nice addition.


Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance -a : how join output table to output lines?

2013-10-08 Thread Enrico Gallo
Dear Micha, dear list,


2013/10/3 Micha Silver 
>
> On 03/10/2013 12:42, Enrico Gallo wrote:
>
> Dear list,
>
> when using (GRASS 6.4.3)  v.distance -a ,  points to lines, you get:
> 1. [output] vector theme, with no attribute table, with N elements
> 2. [table] , with N rows, optionally with source and target cat
>
> Any idea about joining the two outputs without spatial join?
>
> You probably want to look at the "upload=..." parameter


the problem is a bit more complex than using the "upload" parameter, IMHO

when using v.distance looking for all possible connections (not only
the nearest one)

v.distance -a from=vector_from to=vector_to output=connector
upload=cat,dist column=cat_to,distance table=connector_attributes

we get

- a vector output with connecting lines
- an output table with from_cat [by default], cat_to & distance
fields, completely populated

the output table seems to me a perfect attribute table for vector
output, but no common field is given to join the two:

Adding a table (v.db.addtable) and updating the cat field (v.to.db,
cat) of vector output doesn't solve, as I am not able to add an
autoincrement field in output table to perfom a join, without direct
SQL tricks.

Connecting the given output table (v.db.addtable) and then updating a
cat field, doesn't help even, because v.to.db uses an "INSERT"
statement with cat option , not the usual "UPDATE", so you have N
records with no cat + N records with cat but without attributes.

In both cases we are assuming the two "outputs" have the same order
for elements , but I don't know how much robust is this assumption!

But without a robust join, any spatial analysis of connecting lines is
almost impossible...

I am missing something trivial to bypass this impasse?

Regards,
Enrico
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance -a : how join output table to output lines?

2013-10-03 Thread Micha Silver

  
  
On 03/10/2013 12:42, Enrico Gallo
  wrote:


  Dear list,

when using (GRASS 6.4.3)  v.distance -a ,  points to lines, you
get:
1. [output] vector theme, with no attribute table, with N
elements
2. [table] , with N rows, optionally with source and target cat


Any idea about joining the two outputs without spatial
  join?


  

You probably want to look at the "upload=..." parameter


  
Many thanks


Enrico Gallo








  
  
  This mail was received via Mail-SeCure System.
  
  
  
  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
This mail was received via Mail-SeCure System.






-- 
Micha Silver
GIS Consulting
052-3665918
http://www.surfaces.co.il

  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] v.distance -a : how join output table to output lines?

2013-10-03 Thread Enrico Gallo
Dear list,

when using (GRASS 6.4.3)  v.distance -a ,  points to lines, you get:
1. [output] vector theme, with no attribute table, with N elements
2. [table] , with N rows, optionally with source and target cat

Any idea about joining the two outputs without spatial join?

Many thanks

Enrico Gallo
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] v.distance anything to anything

2012-10-16 Thread Moritz Lennert

On 16/10/12 10:02, Markus Metz wrote:

On Tue, Oct 16, 2012 at 12:52 AM, Moritz Lennert
  wrote:

On 15/10/12 16:30, Markus Metz wrote:


So how does it calculate the distance between two lines (lines or
boundaries) ? Between closest vertices ? What about lines that cross
several
other lines, or lines that cross each other at several points ?



For lines to lines, say line A to line B, it calculates shortest
distance of each vertex in A with each segment (not vertex) in B. So
far, this is the same like in the original version, results are
identical.



The original version did not have line to line...


What I meant was that this is equivalent to the shortest distance of
several points to a line, regarding points as line vertices.


Ok.



Much better, thanks ! Just one issue still with the area2area case for the
test polygon with cat=2:

http://164.15.12.207/grass/v_distance_areas2.png

The connection line/point doesn't touch the the polygon in the from map.


But it is inside the polygon of the 'from' map. In this
implementation, any shared location is as good as any other.
Calculating an intersection is costlier than to check if a vertex is
inside a polygon. The vertex of the boundary of the 'to' area is
inside the 'from' area, thus a common location. For speed reasons, the
distance is set to zero and no further tests are done.


Ok, this makes it clear. Thanks !



The results can be unexpected for 'to' areas with isles, because
v.distance (in all versions) does not require a 'to' feature to have a
category, which also means that isles inside areas which themselves
can be areas without centroids are regarded as valid 'to' features,
just without category. But even though the results can be unexpected,
I would leave them as such, otherwise 'to' feature would need to have
a category, potentially leading to also different results for points
to lines which has always been supported.


Yes, that's why documentation is so important on all this.

Moritz

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance anything to anything

2012-10-16 Thread Markus Metz
On Tue, Oct 16, 2012 at 12:52 AM, Moritz Lennert
 wrote:
> On 15/10/12 16:30, Markus Metz wrote:
>
>>> So how does it calculate the distance between two lines (lines or
>>> boundaries) ? Between closest vertices ? What about lines that cross
>>> several
>>> other lines, or lines that cross each other at several points ?
>>
>>
>> For lines to lines, say line A to line B, it calculates shortest
>> distance of each vertex in A with each segment (not vertex) in B. So
>> far, this is the same like in the original version, results are
>> identical.
>
>
> The original version did not have line to line...

What I meant was that this is equivalent to the shortest distance of
several points to a line, regarding points as line vertices.

>
>
>>>
>>>
 In GRASS 6, v.distance can calculate distances only from
 point,centroid to point,line,boundary,centroid,area.
>>>
>>>
>>>
>>> AFAIK, this was due to the conceptual issue mentioned above. I think that
>>> the answer has to be clearly explained in the manual because they are not
>>> as
>>> straightforward. And a first rapid test shows that these issues seem to
>>> be
>>> problematic in your implementation:
>>>
>>> http://164.15.12.207/grass/v_distance_lines.png
>>> http://164.15.12.207/grass/v_distance_areas.png
>>>
>>> red: from features (quickly digitized test data available here:
>>> http://164.15.12.207/grass/v_distance_testdata.tgz)
>>> black: to features (roadsmajor and urbanarea from nc_spm_08)
>>> green: connecting lines between from and to feature
>>
>>
>> Thanks for testing! These issues should be fixed, at least conforming
>> to my explanation above, in r53401.
>
>
> Much better, thanks ! Just one issue still with the area2area case for the
> test polygon with cat=2:
>
> http://164.15.12.207/grass/v_distance_areas2.png
>
> The connection line/point doesn't touch the the polygon in the from map.

But it is inside the polygon of the 'from' map. In this
implementation, any shared location is as good as any other.
Calculating an intersection is costlier than to check if a vertex is
inside a polygon. The vertex of the boundary of the 'to' area is
inside the 'from' area, thus a common location. For speed reasons, the
distance is set to zero and no further tests are done.

The results can be unexpected for 'to' areas with isles, because
v.distance (in all versions) does not require a 'to' feature to have a
category, which also means that isles inside areas which themselves
can be areas without centroids are regarded as valid 'to' features,
just without category. But even though the results can be unexpected,
I would leave them as such, otherwise 'to' feature would need to have
a category, potentially leading to also different results for points
to lines which has always been supported.

Markus M
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance anything to anything

2012-10-15 Thread Moritz Lennert

On 15/10/12 16:30, Markus Metz wrote:


So how does it calculate the distance between two lines (lines or
boundaries) ? Between closest vertices ? What about lines that cross several
other lines, or lines that cross each other at several points ?


For lines to lines, say line A to line B, it calculates shortest
distance of each vertex in A with each segment (not vertex) in B. So
far, this is the same like in the original version, results are
identical.


The original version did not have line to line...


Now if line A is a line or boundary, it calculates the
shortest distance of each vertex in B to each segment in A.
Additionally, it checks for intersections. In case of intersections,
the first intersection found is used and the distance set to zero.

For lines to areas, it behaves similar to the original version. If a
line is inside an area, the distance is set to zero. The first point
of the line inside the area is used as common point. The distance is
also set to zero if the line intersects with the outer ring or any of
the inner rings (isles), in which case the fist intersection is used
as common point.

For areas to areas, the module checks first for overlap or if one area
is (partially) inside the other area. This is computationally quite
intensive. If the outer rings of the two areas do not overlap, the
distance is calculated as above for lines to lines, treating the outer
rings as two lines. Again, the first point encountered falling into an
area is used as common point, or the first intersection point.

For anything else than points to lines, there can be several common
points with distance = zero, and the closest location could then be
several points or several lines or several areas (result of overlay).
For v.distance, I choose to select a single point, and not create an
overlay like v.overlay.


Thanks. I think this should go into the man page.






In GRASS 6, v.distance can calculate distances only from
point,centroid to point,line,boundary,centroid,area.



AFAIK, this was due to the conceptual issue mentioned above. I think that
the answer has to be clearly explained in the manual because they are not as
straightforward. And a first rapid test shows that these issues seem to be
problematic in your implementation:

http://164.15.12.207/grass/v_distance_lines.png
http://164.15.12.207/grass/v_distance_areas.png

red: from features (quickly digitized test data available here:
http://164.15.12.207/grass/v_distance_testdata.tgz)
black: to features (roadsmajor and urbanarea from nc_spm_08)
green: connecting lines between from and to feature


Thanks for testing! These issues should be fixed, at least conforming
to my explanation above, in r53401.


Much better, thanks ! Just one issue still with the area2area case for 
the test polygon with cat=2:


http://164.15.12.207/grass/v_distance_areas2.png

The connection line/point doesn't touch the the polygon in the from map.

Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance anything to anything

2012-10-15 Thread Markus Metz
On Mon, Oct 15, 2012 at 3:09 PM, Moritz Lennert
 wrote:
> On 13/10/12 15:51, Markus Metz wrote:
>>
>> In GRASS7, v.distance can now calculate distances from
>> point,line,boundary,centroid,area to
>> point,line,boundary,centroid,area.
>
>
> So how does it calculate the distance between two lines (lines or
> boundaries) ? Between closest vertices ? What about lines that cross several
> other lines, or lines that cross each other at several points ?

For lines to lines, say line A to line B, it calculates shortest
distance of each vertex in A with each segment (not vertex) in B. So
far, this is the same like in the original version, results are
identical. Now if line A is a line or boundary, it calculates the
shortest distance of each vertex in B to each segment in A.
Additionally, it checks for intersections. In case of intersections,
the first intersection found is used and the distance set to zero.

For lines to areas, it behaves similar to the original version. If a
line is inside an area, the distance is set to zero. The first point
of the line inside the area is used as common point. The distance is
also set to zero if the line intersects with the outer ring or any of
the inner rings (isles), in which case the fist intersection is used
as common point.

For areas to areas, the module checks first for overlap or if one area
is (partially) inside the other area. This is computationally quite
intensive. If the outer rings of the two areas do not overlap, the
distance is calculated as above for lines to lines, treating the outer
rings as two lines. Again, the first point encountered falling into an
area is used as common point, or the first intersection point.

For anything else than points to lines, there can be several common
points with distance = zero, and the closest location could then be
several points or several lines or several areas (result of overlay).
For v.distance, I choose to select a single point, and not create an
overlay like v.overlay.

>
>
>> In GRASS 6, v.distance can calculate distances only from
>> point,centroid to point,line,boundary,centroid,area.
>
>
> AFAIK, this was due to the conceptual issue mentioned above. I think that
> the answer has to be clearly explained in the manual because they are not as
> straightforward. And a first rapid test shows that these issues seem to be
> problematic in your implementation:
>
> http://164.15.12.207/grass/v_distance_lines.png
> http://164.15.12.207/grass/v_distance_areas.png
>
> red: from features (quickly digitized test data available here:
> http://164.15.12.207/grass/v_distance_testdata.tgz)
> black: to features (roadsmajor and urbanarea from nc_spm_08)
> green: connecting lines between from and to feature

Thanks for testing! These issues should be fixed, at least conforming
to my explanation above, in r53401.

Markus M
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance anything to anything

2012-10-15 Thread Moritz Lennert

On 13/10/12 15:51, Markus Metz wrote:

In GRASS7, v.distance can now calculate distances from
point,line,boundary,centroid,area to
point,line,boundary,centroid,area.


So how does it calculate the distance between two lines (lines or 
boundaries) ? Between closest vertices ? What about lines that cross 
several other lines, or lines that cross each other at several points ?



In GRASS 6, v.distance can calculate distances only from
point,centroid to point,line,boundary,centroid,area.


AFAIK, this was due to the conceptual issue mentioned above. I think 
that the answer has to be clearly explained in the manual because they 
are not as straightforward. And a first rapid test shows that these 
issues seem to be problematic in your implementation:


http://164.15.12.207/grass/v_distance_lines.png
http://164.15.12.207/grass/v_distance_areas.png

red: from features (quickly digitized test data available here: 
http://164.15.12.207/grass/v_distance_testdata.tgz)

black: to features (roadsmajor and urbanarea from nc_spm_08)
green: connecting lines between from and to feature

Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance anything to anything

2012-10-14 Thread Phil Donovan
Yip, great stuff.

On 14 October 2012 04:06, Paulo van Breugel  wrote:

> + Great improvement
>
>
> On Sat, Oct 13, 2012 at 3:51 PM, Markus Metz <
> markus.metz.gisw...@gmail.com> wrote:
>
>> In GRASS7, v.distance can now calculate distances from
>> point,line,boundary,centroid,area to
>> point,line,boundary,centroid,area.
>>
>> In GRASS 6, v.distance can calculate distances only from
>> point,centroid to point,line,boundary,centroid,area.
>>
>> Markus M
>> ___
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance anything to anything

2012-10-13 Thread Paulo van Breugel
+ Great improvement

On Sat, Oct 13, 2012 at 3:51 PM, Markus Metz
wrote:

> In GRASS7, v.distance can now calculate distances from
> point,line,boundary,centroid,area to
> point,line,boundary,centroid,area.
>
> In GRASS 6, v.distance can calculate distances only from
> point,centroid to point,line,boundary,centroid,area.
>
> Markus M
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.distance problem

2012-05-04 Thread Gavin Fleming

Hi

v.distance is not transferring attributes and I can't figure out why. 
It's worked before on similar data but not this time around:


v.distance --overwrite from=route1pavementnodes@PERMANENT 
to=route1stands@PERMANENT to_type=area 
output=route1pavementnodes_conn_lines dmax=2 upload=to_attr 
column=stand_id to_column=stand_id



...
 100%
6702 categories read from the map
6702 categories exist in the table
6702 categories read from the map don't exist in the table
0 records updated
v.distance complete.

output lines are generated but no attributes transferred.

Is there some data preparation step I'm missing perhaps?

GRASS 6.4.1


Gavin
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] 'v.distance'

2011-12-26 Thread Bulent Arikan
Dear List,

I have a points vector file, which I use as input in 'v.distance' to create
a new vector file of lines (showing the minimum distance to the coast). The
output is naturally a vector file that contains lines between each point
and the sea. However, I realize that the output map cannot be queried. Even
if I have GRASS connect the new (lines) vector file with the points as the
second layer, querying of the lines does not return results.

What I want to do is to assign CAT numbers to each line (it can be same
with the CAT# of its point of origin) so that I can display lines
individually in the new lines vector file for further analyses.

Thank you for your help!

Bulent
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] V.distance - to_angle

2010-03-12 Thread Richard Chirgwin

Hi,

Trying to capture directions in v.distance.

The manual says that to_angle is measured:
"Counterclockwise from positive x axis, in radians, which is between -PI 
and PI inclusive."


But: I'm getting a value of 0.83 for something which on a compass would 
be about 170 degrees from North.


If I assume that a line in this direction is  -Pi   >
...then I would expect that as we rotate to here <-
...we approach 0

So I would expect something pointing nearly south to be a value of about 
1/2 Pi - not 0.8, anyhow.


Or have I misread the manual?

Richard

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.distance bug (got the right module name this time!)

2009-06-25 Thread Richard
Running Grass-6.4.0RC5, using the v.distance -a option (all features), 
the creation of an output table shows a bug. If I try to use two output 
columns, v.distance is only picking up one column name.


Example in Spearfish:
v.distance from=archsites to=bugsites -a upload=dist,to_attr 
column=distant,to_cat to_column=cat


...works fine to output results to screen. Add the table option:

v.distance from=archsites to=bugsites -a upload=dist,to_attr 
column=distant,to_cat to_column=cat table=distance_report


...brings the following error:

DBMI-DBF driver error:
Column 'distance' already exists (duplicate name)
Cannot create table.

Error in db_execute_immediate()

Unable to create table: 'create table distance_report (from_cat integer,
distance double precision, distance double precision )'

The same error occurs using the MySQL and Sqlite drivers.

For now, I'll pipeline the screen output to a text file.

Richard C
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance "debug" option removed

2009-06-25 Thread Hamish

Richard wrote:
> I only just noticed that in the new versions, v.distance
> has had the debug option removed.
> 
> That's a pity, because I was using it as a feature, to
> preserve the overlap areas between buffered areas as
> distinct objects.
> 
> So - how hard would it be to return debug=buffer to
> v.distance?

are you sure it wasn't v.buffer?

If so, it's a totally new module.


Hamish



  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.distance "debug" option removed

2009-06-25 Thread Richard

Hi,

I only just noticed that in the new versions, v.distance has had the 
debug option removed.


That's a pity, because I was using it as a feature, to preserve the 
overlap areas between buffered areas as distinct objects.


So - how hard would it be to return debug=buffer to v.distance?

Richard
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance warning (WARNING: more cats of to_layer)

2008-03-14 Thread Martin Landa
Hi,

it means that some of areas have multiple assigned categories, try to
open with v.digit and check categories of area centroids.

or print categories using v.category module, e.g.

v.category map type=centroid option=print layer=1

where layer is same as to_layer from your v.distance calling (probably 1)

you will find some multiple categories, e.g.

...
24
25
21/22/23/24/28
29
...

In this case v.distance use only cat '28' (last found).

Martin

2008/3/14, Corrado <[EMAIL PROTECTED]>:
> Dear Martin,
>
>  does that mean that there are several areas (that is more than one) in the to
>  vector that satisfy the condition (for example: dmax=100) for each point in
>  the from vector?
>
>
>  On Wednesday 12 March 2008 15:23:46 Martin Landa wrote:
>  > Hi,
>  >
>  > in your case the vector map (given as 'to' in v.distance) contains
>  > some areas (bunch of boundaries and centroid inside). Category number
>  > of area is assigned to the centroid. Geometry feature (point, line,
>  > boundary, centroid, face or kernel) can have more categories in
>  > general. The message from v.distance warns you that there are more
>  > categories assigned to the area (i.e. centroid) in given layer
>  > (to_layer). The last found category in given layer is taken for
>  > computation, maybe v.distance should be fixed to handle also multiple
>  > categories in one layer(?)
>  >
>  > Martin
>  >
>  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
>  > > Dear Martin,
>  > >
>  > >  I do not understand what you mean. Could you please explain?
>  > >
>  > >  On Wednesday 12 March 2008 14:09:46 you wrote:
>  > >  > Hi,
>  > >  >
>  > >  > it means that given vector feature from 'to' map (layer 'to_layers')
>  > >  > has more then one category. Maybe it would make sense to change
>  > >  > warning text to something less cryptic.
>  > >  >
>  > >  > Martin
>  > >  >
>  > >  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
>  > >  > > Dear Martin,
>  > >  > >
>  > >  > >  I am using 6.2.3.
>  > >  > >
>  > >  > >  On Wednesday 12 March 2008 13:31:49 you wrote:
>  > >  > >  > Hi,
>  > >  > >  >
>  > >  > >  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
>  > >  > >  > >  what does the warning:
>  > >  > >  > >
>  > >  > >  > >  WARNING: more cats of to layer
>  > >  > >  > >
>  > >  > >  > >  mean, when you execute the command v.distance?
>  > >  > >  >
>  > >  > >  > which GRASS version are you using? I cannot find such kind of
>  > >  > >  > message in grass_trunk.
>  > >  > >  >
>  > >  > >  > Martin
>  > >  > >
>  > >  > > Best Regards
>  > >  > >  --
>  > >  > >  Corrado Topi
>  > >  > >
>  > >  > >  Global Climate Change and Biodiversity
>  > >  > >  Area 18,Department of Biology
>  > >  > >  University of York, York, YO10 5YW, UK
>  > >  > >  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
>  > >
>  > >  Best Regards
>  > >  --
>  > >  Corrado Topi
>  > >
>  > >  Global Climate Change and Biodiversity
>  > >  Area 18,Department of Biology
>  > >  University of York, York, YO10 5YW, UK
>  > >  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
>
>  Best Regards
>  --
>  Corrado Topi
>
>  Global Climate Change and Biodiversity
>  Area 18,Department of Biology
>  University of York, York, YO10 5YW, UK
>  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
>


-- 
Martin Landa  * http://gama.fsv.cvut.cz/~landa *
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance warning (WARNING: more cats of to_layer)

2008-03-14 Thread Corrado
Dear Martin,

does that mean that there are several areas (that is more than one) in the to 
vector that satisfy the condition (for example: dmax=100) for each point in 
the from vector?

On Wednesday 12 March 2008 15:23:46 Martin Landa wrote:
> Hi,
>
> in your case the vector map (given as 'to' in v.distance) contains
> some areas (bunch of boundaries and centroid inside). Category number
> of area is assigned to the centroid. Geometry feature (point, line,
> boundary, centroid, face or kernel) can have more categories in
> general. The message from v.distance warns you that there are more
> categories assigned to the area (i.e. centroid) in given layer
> (to_layer). The last found category in given layer is taken for
> computation, maybe v.distance should be fixed to handle also multiple
> categories in one layer(?)
>
> Martin
>
> 2008/3/12, Corrado <[EMAIL PROTECTED]>:
> > Dear Martin,
> >
> >  I do not understand what you mean. Could you please explain?
> >
> >  On Wednesday 12 March 2008 14:09:46 you wrote:
> >  > Hi,
> >  >
> >  > it means that given vector feature from 'to' map (layer 'to_layers')
> >  > has more then one category. Maybe it would make sense to change
> >  > warning text to something less cryptic.
> >  >
> >  > Martin
> >  >
> >  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
> >  > > Dear Martin,
> >  > >
> >  > >  I am using 6.2.3.
> >  > >
> >  > >  On Wednesday 12 March 2008 13:31:49 you wrote:
> >  > >  > Hi,
> >  > >  >
> >  > >  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
> >  > >  > >  what does the warning:
> >  > >  > >
> >  > >  > >  WARNING: more cats of to layer
> >  > >  > >
> >  > >  > >  mean, when you execute the command v.distance?
> >  > >  >
> >  > >  > which GRASS version are you using? I cannot find such kind of
> >  > >  > message in grass_trunk.
> >  > >  >
> >  > >  > Martin
> >  > >
> >  > > Best Regards
> >  > >  --
> >  > >  Corrado Topi
> >  > >
> >  > >  Global Climate Change and Biodiversity
> >  > >  Area 18,Department of Biology
> >  > >  University of York, York, YO10 5YW, UK
> >  > >  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
> >
> >  Best Regards
> >  --
> >  Corrado Topi
> >
> >  Global Climate Change and Biodiversity
> >  Area 18,Department of Biology
> >  University of York, York, YO10 5YW, UK
> >  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]

Best Regards
-- 
Corrado Topi

Global Climate Change and Biodiversity
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance warning (WARNING: more cats of to_layer)

2008-03-12 Thread Martin Landa
Hi,

in your case the vector map (given as 'to' in v.distance) contains
some areas (bunch of boundaries and centroid inside). Category number
of area is assigned to the centroid. Geometry feature (point, line,
boundary, centroid, face or kernel) can have more categories in
general. The message from v.distance warns you that there are more
categories assigned to the area (i.e. centroid) in given layer
(to_layer). The last found category in given layer is taken for
computation, maybe v.distance should be fixed to handle also multiple
categories in one layer(?)

Martin

2008/3/12, Corrado <[EMAIL PROTECTED]>:
> Dear Martin,
>
>  I do not understand what you mean. Could you please explain?
>
>
>  On Wednesday 12 March 2008 14:09:46 you wrote:
>  > Hi,
>  >
>  > it means that given vector feature from 'to' map (layer 'to_layers')
>  > has more then one category. Maybe it would make sense to change
>  > warning text to something less cryptic.
>  >
>  > Martin
>  >
>  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
>  > > Dear Martin,
>  > >
>  > >  I am using 6.2.3.
>  > >
>  > >  On Wednesday 12 March 2008 13:31:49 you wrote:
>  > >  > Hi,
>  > >  >
>  > >  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
>  > >  > >  what does the warning:
>  > >  > >
>  > >  > >  WARNING: more cats of to layer
>  > >  > >
>  > >  > >  mean, when you execute the command v.distance?
>  > >  >
>  > >  > which GRASS version are you using? I cannot find such kind of message
>  > >  > in grass_trunk.
>  > >  >
>  > >  > Martin
>  > >
>  > > Best Regards
>  > >  --
>  > >  Corrado Topi
>  > >
>  > >  Global Climate Change and Biodiversity
>  > >  Area 18,Department of Biology
>  > >  University of York, York, YO10 5YW, UK
>  > >  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
>
>
>  Best Regards
>  --
>  Corrado Topi
>
>  Global Climate Change and Biodiversity
>  Area 18,Department of Biology
>  University of York, York, YO10 5YW, UK
>  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
>


-- 
Martin Landa  * http://gama.fsv.cvut.cz/~landa *
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance warning (WARNING: more cats of to_layer)

2008-03-12 Thread Martin Landa
[fwd to list]

Hi,

 it means that given vector feature from 'to' map (layer 'to_layers')
 has more then one category. Maybe it would make sense to change
 warning text to something less cryptic.


 Martin


 2008/3/12, Corrado <[EMAIL PROTECTED]>:
 > Dear Martin,
 >
 >  I am using 6.2.3.
 >
 >
 >  On Wednesday 12 March 2008 13:31:49 you wrote:
 >  > Hi,
 >  >
 >  > 2008/3/12, Corrado <[EMAIL PROTECTED]>:
 >  > >  what does the warning:
 >  > >
 >  > >  WARNING: more cats of to layer
 >  > >
 >  > >  mean, when you execute the command v.distance?
 >  >
 >  > which GRASS version are you using? I cannot find such kind of message
 >  > in grass_trunk.
 >  >
 >  > Martin
 >
 >
 >
 > Best Regards
 >  --
 >  Corrado Topi
 >
 >  Global Climate Change and Biodiversity
 >  Area 18,Department of Biology
 >  University of York, York, YO10 5YW, UK
 >  Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
 >



--
 Martin Landa  * http://gama.fsv.cvut.cz/~landa *


-- 
Martin Landa  * http://gama.fsv.cvut.cz/~landa *
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.distance warning (WARNING: more cats of to_layer)

2008-03-12 Thread Martin Landa
Hi,

2008/3/12, Corrado <[EMAIL PROTECTED]>:
>  what does the warning:
>
>  WARNING: more cats of to layer
>
>  mean, when you execute the command v.distance?

which GRASS version are you using? I cannot find such kind of message
in grass_trunk.

Martin

-- 
Martin Landa  * http://gama.fsv.cvut.cz/~landa *
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.distance warning (WARNING: more cats of to_layer)

2008-03-12 Thread Corrado
Dear friends,

what does the warning:

WARNING: more cats of to layer

mean, when you execute the command v.distance?

Best Regards
-- 
Corrado Topi

Global Climate Change and Biodiversity
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.distance with upload=to_attr: is it possible to specify more than one column?

2008-03-12 Thread Corrado
Dear friends,

when using v.distance with upload=to_attr is it possible to specify more than 
one column?

In other words, is it possible to update more than one column from the "to 
table"?

Example of what I tried to do:

v.distance from=species to=sssi dmax=0 upload=to_attr to_colum=cat,gid 
col=sssi_cat,sssi_id

but I get warnings!

Is there another way to do it?

Best Regards
-- 
Corrado Topi

Global Climate Change and Biodiversity
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: [EMAIL PROTECTED]
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] V.distance

2008-01-09 Thread Markus Neteler
On Jan 8, 2008 11:54 PM, Richard Chirgwin <[EMAIL PROTECTED]> wrote:
> What algorithm does V.distance use for calculations?

For cartesian coordinate systems it currently uses 2D/3D Pythagoras.
 Vect_line_distance() in
 http://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/line.c

For LatLong it uses geodesic distance calculation (reference):
  Vect_line_geodesic_length() in
  http://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/line.c
 which calls
  http://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/geodist.c

Markus

PS: please update your address book to use
grass-user@lists.osgeo.org
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] V.distance

2008-01-08 Thread Richard Chirgwin

What algorithm does V.distance use for calculations?

Richard Chirgwin
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user