[GRASS-user] (kein Betreff)

Hamish hamish_b at yahoo.com
Sat Dec 15 18:50:14 EST 2007


Michael Misun wrote:
> i know, that in grass4 was a module called v.plant which fills in 
> points on a line in a specified space but i doesn't work here in my
> grass6.2.3

it seems available in GRASS 5.4 too:
  http://grass.ibiblio.org/gdp/html_grass5/html/v.plant.html

>From that help page:
"Design of v.plant

v.plant has been implemented as a Bourne shell script. The basic
procedure is as follows:

1. Write out the existing map in the dig_ascii format;

2. Use an included awk script to process each vector segment in turn,
moving from point to point along the segment. If a span between two
adjacent points is greater than the specified threshold (in map units)
extra points are inserted collinearly.

3. The modified dig_ascii file is re-imported, overwriting the original
file."


the main difference between GRASS 5 & 6's ascii output format is the
order of the columns (x y in GRASS 6, not y x as in GRASS 5).

so with that adjustment (and probably a few other minor tweaks) the
script could probably be used in GRASS 6. GRASS 4/5 vector modules
using the C api need considerable rewrite to work with GRASS 6 as the
GRASS 6 vector engine is a all new.


But you can use v.split, v.segment, or v.lrs.* in GRASS 6 to do the
same thing as v.plant.


for GRASS 5/6 porting list see:

http://grass.gdf-hannover.de/wiki/GRASS_Module_Porting_List#Vector_modules


> above all i work in a location for mars not for the earth 

That should not be a problem. If your lat/lon projection definition
defines 'a' and 'es' parameters (or 'a' + defined as a sphere), then
G_geodesic_distance() will use those values in the distance
calculation. It only defaults to Earth values if those are empty.

see G_get_ellipsoid_parameters() in lib/gis/get_ellipse.c which is
called by G_begin_distance_calculations() (lib/gis/distance.c).

G_distance() then calls G_geodesic_distance() if the projection is
lat/lon.   [see also lib/gis/geodist.c and lib/gis/geodesic.c]

e.g. d.measure with an xmon should return the correct great circle
distance. (I have no idea about the distance measurement tool in the
GUIs)


Again, be careful with new vector modules. Some may be simplisticly
doing their own sqrt(a^2 + b^2) calucations instead of using
G_distance(). Luckily the results should be so badly wrong for lat/lon
locations that you will quickly notice the error. Post any requests for
specific module updates to the wish/bug tracker.


Hamish



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the grass-user mailing list