[GRASS-user] Help needed for ascii point export

Thomas Adams tea3rd at gmail.com
Tue Apr 15 04:03:00 PDT 2014

Moritz et al,

Thank you for the helpful suggestions. One of the problems I have is that
about half of the points are in a tidal estuary where the elevations are
all zero (sea level); so utilizing the elevations to sort will not work --
I have several thousand points I'm dealing with, which I obtained by doing
a vect-->rast conversion and then got the points from the rast (I know this
sounds screwy).

I have to explain what I'm doing. I want to use  r.inund.fluv to generate a
flood inundation map. The problem stems from the fact that I have a USACE
HEC-RAS model implementation which was not georeferenced, from which I have
modeled water surface elevations from a historic flood. From an ascii
output file, I basically have the channel centerline locations (x,y) and
water surface elevations and I have calculated the distance to the river
mouth at each point. In GRASS I have independently, using a UTM map
projection, the channel centerline as a vector. I have also identified the
corresponding upstream and downstream end points, which identify the same
locations -- so I plan I 'mapping' the HEC-RAS water-surface elevations
(WSEL) at the un-georeferenced channel centerline locations based on
scaling the entire river reach length between this data and what I have in
GRASS. I can use the scaled distance from the river mouth to spatially
interpolate locations where I know the WSEL.

The GRASS addon command  r.inund.fluv needs X, Y, WSEL as an ascii file.

Now if I can go directly from the GRASS vector centerline and output
verticies of that feature, so I have the x,y locations of the verticies my
problem would be solved. I looked at v.distance and other modules but could
not see how to generate the verticies and export them -- but, in the end, I
need an ascii file of centerline point locations in upstream to downstream
order. I have/am writing Perl scripts to manipulate the data. I was afraid
the order would not be preserved by v.out.ascii, which was confirmed by my
script that calculated the distances from the river mouth when I saw them
starting to bounce around in odd ways as I looked at the calculated values
when I looked at the downstream to upstream distances.


On Tue, Apr 15, 2014 at 5:21 AM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

> On 15/04/14 08:13, jctorres wrote:
>> Hello
>> You can create a map of these points contining the elevation as
>> attribute. Once you output this map you could sort points using the
>> elevation values.
>> you can do this for instance using v.to.rast to convert the points to
>> raster, them combine this map with elevation using r.mapcalc (assigning
>> elevation to the points), and them output the map using r.out.xyz.
>> To sort the points you can use any sort program or a spreadsheet.
> Maybe directly using v.what.rast might be easier...
> And, Thomas, have you checked the category values of the points ? If the
> points were created in stream order than the cat values should give the
> correct order.
> Moritz
>> Best regards
>> Juan Carlos Torres
>> El 15/04/14 04:52, Thomas Adams escribió:
>>> All:
>>> I have a collection of points that represent the centerline of a
>>> river. I need to output them in upstream to downstream order (or the
>>> reverse). A simple v.out.ascii does not do this because of the channel
>>> meanders. It's critical to get the x,y locations of these points in
>>> the correct order.
>>> Any help is appreciated!
>>> Regards,
>>> Tom
>>> --
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>> --
>> =======================================================================
>> Juan Carlos Torres                      |http://lsi.ugr.es/~jctorres
>> Laboratorio de Realidad Virtual         | Tlf.: (+34) 645 885 167
>> Dpto. Lenguajes y Sistemas Informaticos |       (+34) 958 249 307
>> ETS. Ing. Informatica                   |     interno ugr  71 260
>> Univ. de Granada                        | FAX: (+34) 958 243 179
>> =======================================================================
>> _______________________________________________
>> 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/20140415/ee8a19d4/attachment-0001.html>

More information about the grass-user mailing list