[GRASS-user] v.in.ascii error: G_realloc
Maciej Sieczka
tutey at o2.pl
Mon Aug 7 08:20:42 EDT 2006
Praktikant/in2 ARP napisa?(a):
> I have about 50 tiles with geodetic points. These geodetic points should be
> transformed into a Digital terrain model (DTM) by v.surf.rst.
Can you patch those 50 tiles points outside Grass?
If they are only plain text files, formatted like
x1 y1 z1
x2 y2 z2
x3 y3 z3
...
it will be very easy on Unix:
cat patch49 >> patch50
cat patch48 >> patch50
cat patch47 >> patch50
...
and so forth till they all are in a one file, the "patch50".
Now import that huge patch50 as 3D, not building topology (v.in.ascii -zb).
Set the region *manually* to cover the whole vector patch50 ('g.region
vect=' will not work with topologyless vector as you know, so you must
use 'g.region n= s= e= w= res=' explicitely).
Interpoloate dem out of your 3D points (v.surf.rst layer=0).
> If somebody wants a DTM for a defined extract of the area the DTM should be calculated
> exactly for this area. Everything should be automated by a PHP-Script. I
> thought about first identifing the needed tiles then patch these tiles with
> v.patch, setting the region to the defined extract (g.region) and as last
> point transform the points by v.surf.rst into a DTM.
It will be not optimal at all to interpolate new dem each time a subset
is required. Better interploate full dem only once (as I described
above) and only adjust region settings as needed, for each query your
PHP script gets, with g.region, then use 'r.mapcalc current_subset=dem'
to extract that particular subset from the whole dem. Easier and much
faster.
Best,
Maciek
More information about the grass-user
mailing list