Import Coordinates

Donald Newcomb newcomb at navo.hpc.mil
Mon Apr 27 04:36:15 EDT 1998


I have no idea how you can import this in binary format but I import
this type of text file every day as an ASCII digit file. You need to use
sed or awk to flip the x-y into y-x, add a header and add one line with
the letter "L" and the count of the points in each line at the beginning
of each line. 

L 3
55 26
59 37
47 28
L 14
etc.

If you have the contour values somewhere, then you can create a digit
attribute
file which is a list in the form:

L X Y V

where L is the literal "L", X & Y a point on the line (I use the first
vertex) and V is the contour value. I have some awk scripts to create
these files from some formats we use on other systems but the scripts
need to be designed for your specific data.

Once you do this, you just run v.in.ascii and v.support and you are
ready for v.digit.
 
> Filippidis Vangelis wrote:
>    I have an txt file (i export it from MapInfo)
> with the X and Y coordinates of some contours.
> It has the following format :
> 
> x y
> x y
> ....
> x y
> 
> How i can import it to GRASS in BINARY format
> so i can edit it from v.digit ?
> 
> I have Slakware Linux 3.0.4 with GRASS 4.2.1 V.13
> (Great Job Markus... :) )
> 

-- 
Donald R. Newcomb              * newcomb at navo.hpc.mil         
Naval Oceanographic Office     * newcombd at navo.navy.mil
Stennis Space Center, MS 39522 * Voice: (228) 688-5998
FAX: (228) 688-5485            * DSN: 485-5998



More information about the grass-user mailing list