title: Convert data to GeoJson
body: <p>I have a text file and want to change the format of data to GeoJson format. Firstly, I want to parse it to separated parts. I could not make a code, using python, to do that. Would you help me please to parse the data and make the GeoJson format. The initial data format is like below. </p>
  
  <pre><code>.A DAQT2 170314 C DH124045 /HGIRS 479.7:
  
  .A DAMT2 170314 C DH115756 /HGIRS 425.1:
  
  .A DBQT2 170314 C DH123840 /HGIRS 436.6:
  
  .A DBDT2 170314 C DH120419 /HGIRS 472.3:
  
  .A DDDT2 170314 C DH120204 /HGIRS 400.6:
  
  .A DCNT2 170314 C DH120806 /HGIRS 412.9:
  
  .A DBUT2 170314 C DH124633 /HGIRS 404.1:
  
  .A DBBT2 170314 C DH121511 /HGIRS 453.4:
  
  .A DDNT2 170314 C DH123336 /HGIRS 0.2:
  
  .A DAXT2 170314 C DH123031 /HGIRS 438.1:
  </code></pre>
  
  <p>I generated the following code till now to separate the data (parse them) first, as follows, but it returns a line of data. I want the output to be line by line.</p>
  
  <pre><code>file = open('test1.txt', 'r')
  lines = file.readlines()
  length=lines[0].split('\n')
  number_of_lines=len(length)
  
  lines=str(lines)
  data=lines.split(' ')
  data=str(data)
  data=data.split('\n')
  
  file.close()
  file = open('test1.txt', 'w')
  
  file.write(str(data))
  file.write('\n')
  file.close()
  
  file = open('test1.txt', 'w')
  file.write(str(data))
  file.write('\n')
  file.close()
  </code></pre>
  
  <p>The output is like:</p>
  
  <pre><code>['["[\':", \'1117\', \'AM\', \'CDT\', \'TUE\', \'MAR\', \'14\', 
  "2017\\\\n\',", "\':\\\\n\',", "\':", \'HOURLY\', \'ACCUMULATOR\', 
  \'INFORMATION\', "TABLE\\\\n\',", "\':\\\\n\',", "\':", \'NOTE:\', \'\', 
  \'ERRONEOUS\', \'REPORTS\', \'MAY\', \'BE\', \'RECEIVED\', \'UNDER\', 
  "CERTAIN\\\\n\',", "\':", \'\', \'\', \'\', \'\', \'\', \'\', \'\', 
  \'WEATHER\', "CONDITIONS\\\\n\',", "\':\\\\n\',", "\':", 
  "**********************************************************\\\\n\',", "\':", 
  \'ID\', \'\', \'\', \'\', \'LOCATION\', \'\', \'\', \'\', \'\', \'\', \'\', 
  \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', 
  \'ACCUMULATOR\', "VALUE\\\\n\',", "\':", 
  "**********************************************************\\\\n\',", 
  "\':CITY", \'OF\', \'DALLAS\', \'ALERT\', "SYSTEM\\\\n\',", "\'.A", 
  \'DDFT2\', \'170314\', \'C\', \'DH103231\', \'/HGIRS\', "516.8:\\\\n\',", 
  "\'.A", \'DCVT2\', \'170314\', \'C\', \'DH110026\', \'/HGIRS\', 
  "536.0:\\\\n\',", "\'.A", \'DDJT2\', \'170314\', \'C\', \'DH102056\', 
  \'/HGIRS\', "0.0:\\\\n\',", "\'.A", \'DDUT2\', \'170314\', \'C\', 
  \'DH100503\', \'/HGIRS\', "3.6:\\\\n\',", "\'.A", \'DDUT2\', \'170314\', 
  \'C\', \'DH100533\', \'/HGIRS\', "3.9:\\\\n\',", "\'.A", \'DDUT2\', 
  \'170314\', \'C\', \'DH100603\', \'/HGIRS\', "4.0:\\\\n\',", "\'.A", 
  \'DDUT2\', \'170314\', \'C\', \'DH100703\', \'/HGIRS\', "4.2:\\\\n\',", 
  "\'.A", \'DDUT2\', \'170314\', \'C\', \'DH101603\', \'/HGIRS\', 
  "4.5:\\\\n\',", "\'.A", \'DDUT2\', \'170314\', \'C\', \'DH103404\', 
  \'/HGIRS\', "4.7:\\\\n\',", "\'.A", \'DDWT2\', \'170314\', \'C\', 
  \'DH100740\', \'/HGIRS\', "0.0:\\\\n\',", "\'.A", \'DCXT2\', \'170314\', 
  \'C\', \'DH105825\', \'/HGIRS\', "614.1:\\\\n\',", "\'.A", \'DCRT2\', 
  \'170314\', \'C\', \'DH101815\', \'/HGIRS\', "381.1:\\\\n\',", "\'.A", 
  \'DBGT2\', \'170314\', \'C\', \'DH103921\', \'/HGIRS\', "394.2:\\\\n\',", 
  "\'.A", \'DBUT2\', \'170314\', \'C\', \'DH105533\', \'/HGIRS\', 
  "404.1:\\\\n\',", "\'.A", \'DBRT2\', \'170314\', \'C\', \'DH101936\', 
  \'/HGIRS\', "447.6:\\\\n\',", "\'.A", \'DBRT2\', \'170314\', \'C\', 
  \'DH103306\', \'/HGIRS\', "447.6:\\\\n\',", "\'.A", \'DBZT2\', \'170314\', 
  \'C\', \'DH102317\', \'/HGIRS\', "397.1:\\\\n\',", "\'.A", \'DATT2\', 
  \'170314\', \'C\', \'DH102058\', \'/HGIRS\', "448.6:\\\\n\']"]']
  </code></pre>