Skip to main content
  • 10000+ Posts
  • 53,364 Replies
10000+ Posts
Parsing points and lines from text file coordinate lists

I have some data in text files that may contain both points and lines. Each line contains a code and either a sub-code or a coordinate set: 05 1          2302     6826513.392   548235.740  257.374            05 31         2302     6826704.339   548284.671  275.511            09 91 05 1          2302     6826513.392   548235.740  257.374            05 2          2302     6826518.762   548233.548  257.950            05 3          2302     6826525.326   548234.694  258.184            05 4          2302     6826532.691   548235.254  258.606            09 99The first column is the first code, '05' is always followed by a coordinate, '09' is always followed by a sub-code: '09 91' defines start of a line, '09 99' defines end of a line. So the short example above contains two points and a polyline with four vertices. Any suggestions on how I can turn this text file into two points and a polyline?I

Badge Winners

  • English Speaker
    ipl02has earned the badge English Speaker
  • Conversationalist
    juanmaherehas earned the badge Conversationalist
  • Online Training
    mohamed_alihas earned the badge Online Training
  • Teacher (Bronze)
    nwsehas earned the badge Teacher (Bronze)
  • Socializer (Ice Breaker)
    nwsehas earned the badge Socializer (Ice Breaker)
Show all badges

Community Stats

32,407
Posts
123,175
Replies
40,515
Members