Re: Extracting central beam from ASCII XYZ bathymetry
Paul Wessel <[email protected]>
| Newsgroups | gmane.comp.gis.gmt.user |
|---|---|
| Message-ID | <[email protected]> |
If all you have a triplets of xyz with not sequence info (time) then you are kind of stuck. I guess I would try this: plot the points using psxy with some CPT for the z values, then turn into a PNG for Google Earth. Then load it into Google Earth and eyeball where you think the center line might be and create that track using the GE tools, then save as KML and kml2gmt to get the path. -p On Mar 10, 2014, at 11:19 AM, Brent Wood <[email protected]> wrote: > Hi Juan, > > If you are running Linux (or Mac), using the text processing tools could probably do this on text files, depending on just what the structure of your XYZ files is. > On Windows, I figure there will be some version of awk you can install to make it useful :-) > > For example, if you just want to print the middle field in a row of text, cat your file through this command: > > awk '{print ( $((NF+1)/2) ) }' > > note that in awk, NF is the number of fields (columns) in the line of text > - add 1, divide by two will give you the number of the middle column > prefix this with "$" to get the value of this column, & print it > > eg: > echo "1 2 3 4 5" | awk '{print ( $((NF+1)/2) ) }' > 3 > echo "1 2 3 4 5 6" | awk '{print ( $((NF+1)/2) ) }' > 3 > echo "1 2 3 4 5 6 7" | awk '{print ( $((NF+1)/2) ) }' > 4 > > Something like this might work for you? > > Cheers, > > Brent Wood > > From: Juan Diaz-Naveas <[email protected]> > To: [email protected] > Sent: Tuesday, March 11, 2014 9:40 AM > Subject: [GMT-HELP] Extracting central beam from ASCII XYZ bathymetry > > Dear all, > > I have a data set with several multibeam lines, but they are stored as XYZ ASCII data. > > I need to find the approximate central beam for each stripe covered by each multibeam bathymetry line. > > Does anyone have an idea on how to accomplish this? > > I was thinking in using project and/or blockmean GMT commands, but actually I cannot figure out how or if there is any sense in trying this way. > > Thank you for any help in advance > > Juan DIaz-Naveas > To unsubscribe, send the message "signoff gmt-help" to [email protected] > > > To unsubscribe, send the message "signoff gmt-help" to [email protected] To unsubscribe, send the message "signoff gmt-help" to [email protected]