Skip to main content

Hello. I have a txt file which contains "blocks" of data, separated by line containing #####. I need to extract information from each "block", and each time the #### appears that means the new epoch starts. For each block I check if it contains eg. "Station point:", "PPM", "MWF". Each Feature is then written in DB. Not all blocks give results for each Tester.

Here is an example of such file:

2020-03-23 08:01:13.8810 Info ###############################################################################################################################################

 

2020-03-23 08:01:13.8810 Info Processing pointgroup 'MWS200_Fix' (Type:'Freie Stationierung') measured by 'MWS200'. GON/M]

 

2020-03-23 08:01:13.8810 Info Station point: 'MWS200'

 

2020-03-23 08:01:13.9122 Info Station coords: 2660392.8147,1251984.6680,416.3654

 

2020-03-23 08:01:13.9435 Info Reference coordinates of 'MWF204': E=2660397.8542,N=1251975.6158,H=416.0325

 

2020-03-23 08:01:13.9435 Info Calculated polar reference of 'MWF204': 147.8954,102.0449,10.3420

 

2020-03-23 08:01:13.9435 Info Measurement of 'MWF204' at 23.03.2020 08:00:20: Hz=147.8987, V=102.0421, Slope=10.3411, Temperature=11.1, Pressure=1013.3, AtmosPPM=0.0, SlopeAtmosPPMCorrected=10.3411, NullDist=10.3420, SlopeDistDiff=-0.0009, RefPPM=89.1845, VzCorr=0.0028, Azimuth=167.6609, Orientation=19.7621

 

2020-03-23 08:01:13.9747 Info Reference coordinates of 'MWF205': E=2660348.7659,N=1251956.1415,H=416.8883

 

2020-03-23 08:01:13.9903 Info Calculated polar reference of 'MWF205': 243.6485,99.3660,52.4608

 

2020-03-23 08:01:13.9903 Info Measurement of 'MWF205' at 23.03.2020 08:00:35: Hz=243.6504, V=99.3665, Slope=52.4610, Temperature=11.1, Pressure=1013.3, AtmosPPM=0.0, SlopeAtmosPPMCorrected=52.4610, NullDist=52.4608, SlopeDistDiff=0.0002, RefPPM=-4.2401, VzCorr=399.9995, Azimuth=263.4139, Orientation=19.7635

 

2020-03-23 08:01:14.0216 Info Reference coordinates of 'MWF206': E=2660342.7413,N=1251965.7471,H=416.4775

 

2020-03-23 08:01:14.0372 Info Calculated polar reference of 'MWF206': 257.2349,99.8669,53.5082

 

2020-03-23 08:01:14.0372 Info Measurement of 'MWF206' at 23.03.2020 08:00:48: Hz=257.2375, V=99.8669, Slope=53.5103, Temperature=11.1, Pressure=1013.3, AtmosPPM=0.0, SlopeAtmosPPMCorrected=53.5103, NullDist=53.5082, SlopeDistDiff=0.0021, RefPPM=-39.7455, VzCorr=0.0000, Azimuth=277.0003, Orientation=19.7628

 

2020-03-23 08:01:14.0685 Info Reference coordinates of 'MWF207': E=2660336.9264,N=1251975.0892,H=416.4712

 

2020-03-23 08:01:14.0685 Info Calculated polar reference of 'MWF207': 269.4285,99.8815,56.6827

 

2020-03-23 08:01:14.0841 Info Measurement of 'MWF207' at 23.03.2020 08:00:58: Hz=269.4313, V=99.8816, Slope=56.6835, Temperature=11.1, Pressure=1013.3, AtmosPPM=0.0, SlopeAtmosPPMCorrected=56.6835, NullDist=56.6827, SlopeDistDiff=0.0008, RefPPM=-14.6829, VzCorr=399.9998, Azimuth=289.1939, Orientation=19.7625

 

2020-03-23 08:01:14.1310 Info Reference coordinates of 'MWF209': E=2660388.8483,N=1252016.3496,H=416.5453

 

2020-03-23 08:01:14.1310 Info Calculated polar reference of 'MWF209': 372.3055,99.6415,31.9072

 

2020-03-23 08:01:14.1310 Info Measurement of 'MWF209' at 23.03.2020 08:01:14: Hz=372.3090, V=99.6413, Slope=31.9087, Temperature=11.1, Pressure=1013.3, AtmosPPM=0.0, SlopeAtmosPPMCorrected=31.9087, NullDist=31.9072, SlopeDistDiff=0.0015, RefPPM=-48.4750, VzCorr=0.0002, Azimuth=392.0710, Orientation=19.7620

 

2020-03-23 08:01:14.1466 Info Number of measured reference points: 5

 

2020-03-23 08:01:14.1466 Info Surveying Orientation: 19.762610, 0.000607 (valid)

 

2020-03-23 08:01:14.1466 Info VzCorrection: 0.000452, 0.001320 (valid)

 

2020-03-23 08:01:14.1622 Info PPM: -3.5918, 54.8919 (valid)

 

2020-03-23 08:01:14.1778 Info -------------------------------------------------------------------------------------------------------------------------------

 

2020-03-23 08:01:14.1778 Info Results of free station calculation (Reduced). Solution:ROBUST dGON/M]

 

2020-03-23 08:01:14.1778 Info Station Coordinates: 2660392.8148, 1251984.6679, 416.3655

 

2020-03-23 08:01:14.1935 Info Standard Deviations: 0.0003, 0.0004, 0.0002

 

2020-03-23 08:01:14.1935 Info Orientation: 19.76276, 0.000301

 

2020-03-23 08:01:14.1935 Info Scale: 1.00002113, 0.00000992

 

2020-03-23 08:01:14.2091 Info Hz, HzResid, HDist, ResidHDist, HeightDiff, ResidHDiff, E, N, H

 

2020-03-23 08:01:14.2091 Info MWF204, 147.89873, 0.000749 (ok), 10.3595, -0.0010 (ok), -0.3324, 0.0006 (ok), 2660397.8542, 1251975.6158, 416.0325

 

2020-03-23 08:01:14.2091 Info MWF205, 243.65038, -0.000905 (ok), 52.4794, -0.0009 (ok), 0.5224, -0.0003 (ok), 2660348.7659, 1251956.1415, 416.8883

 

2020-03-23 08:01:14.2247 Info MWF206, 257.23750, -0.000225 (ok), 53.5311, 0.0010 (ok), 0.1121, 0.0001 (ok), 2660342.7413, 1251965.7471, 416.4775

 

2020-03-23 08:01:14.2247 Info MWF207, 269.43134, 0.000076 (ok), 56.7041, -0.0004 (ok), 0.1056, -0.0000 (ok), 2660336.9264, 1251975.0892, 416.4712

 

2020-03-23 08:01:14.2247 Info MWF209, 372.30895, 0.000804 (ok), 31.9305, 0.0008 (ok), 0.1800, 0.0002 (ok), 2660388.8483, 1252016.3496, 416.5453

 

2020-03-23 08:01:14.2560 Info Take the orientation from the free station module.

 

2020-03-23 08:01:14.2560 Info Free station valid.

 

2020-03-23 08:01:14.2716 Info -------------------------------------------------------------------------------------------------------------------------------

 

2020-03-23 08:01:27.9104 Info ###############################################################################################################################################

 

2020-03-23 08:01:27.9104 Info Processing pointgroup 'MWS200_Ori' (Type:'Orientierung') measured by 'MWS200'. nGON/M]

 

2020-03-23 08:01:27.9104 Info Station point: 'MWS200'

 

2020-03-23 08:01:27.9416 Info Station coords: 2660392.8148,1251984.6679,416.3655

 

2020-03-23 08:01:27.9729 Info Reference coordinates of 'MWF209': E=2660388.8483,N=1252016.3496,H=416.5453

 

2020-03-23 08:01:27.9729 Info Calculated polar reference of 'MWF209': 372.3082,99.6417,31.9072

 

2020-03-23 08:01:27.9729 Info Measurement of 'MWF209' at 23.03.2020 08:01:28: Hz=372.3092, V=99.6411, Slope=31.9082, Temperature=11.1, Pressure=1013.3, AtmosPPM=0.0, SlopeAtmosPPMCorrected=31.9082, NullDist=31.9072, SlopeDistDiff=0.0010, RefPPM=-30.8218, VzCorr=0.0006, Azimuth=392.0709, Orientation=19.7617

 

2020-03-23 08:01:27.9885 Info Number of measured reference points: 1

 

2020-03-23 08:01:27.9885 Info Surveying Orientation: 19.761675, 0.000000 (valid)

 

2020-03-23 08:01:27.9885 Info VzCorrection: 0.000594, 0.000000 (valid)

 

2020-03-23 08:01:28.0041 Info PPM: -30.8218, 0.0000 (valid)

 

2020-03-23 08:01:28.0041 Info Surveying orientation taken.

 

2020-03-23 09:00:56.9693 Info ###############################################################################################################################################

 

2020-03-23 09:00:56.9693 Info Processing pointgroup 'MWS200_Fix' (Type:'Freie Stationierung') measured by 'MWS200'. GON/M]

 

2020-03-23 09:00:56.9849 Info Station point: 'MWS200'

 

2020-03-23 09:00:57.0006 Info Station coords: 2660392.8148,1251984.6679,416.3655

 

2020-03-23 09:00:57.1256 Info Number of measured reference points: 0

 

2020-03-23 09:00:57.1256 Info Surveying Orientation: 0.000000, 0.000000 (not valid)

 

2020-03-23 09:00:57.1412 Info VzCorrection: 0.000000, 0.000000 (not valid)

 

2020-03-23 09:00:57.1412 Info PPM: 0.0000, 0.0000 (not valid)

 

2020-03-23 09:00:57.1568 Info -------------------------------------------------------------------------------------------------------------------------------

 

2020-03-23 09:00:57.1724 Info Results of free station calculation (Polar). Solution:ROBUST sGON/M]

 

2020-03-23 09:00:57.1724 Info Station Coordinates: 0.0000, 0.0000, 0.0000

 

2020-03-23 09:00:57.1724 Info Standard Deviations: 0.0000, 0.0000, 0.0000

 

2020-03-23 09:00:57.1881 Info Orientation: 0.00000, 0.000000

 

2020-03-23 09:00:57.1881 Info Scale: 1.00000000, 0.00000000

 

2020-03-23 09:00:57.1881 Info Free station not valid!

 

2020-03-23 09:00:57.2037 Info -------------------------------------------------------------------------------------------------------------------------------

 

Many thanks in advance for your assistance!

I created a little WS for You. Let me Know if it was what you needed read_blocks.fmw


I created a little WS for You. Let me Know if it was what you needed read_blocks.fmw

Many thanks for your prompt answer! It does the job on a small file. I however have hourly reading of such text files, which can be really long. The result is written then in DB (see the Image). So far I have read text file, line by line and then using Tester and AtributeSplitter extracted the information if line contains certain string (check for string, take the string on e.g. 5th losition of the list). I had some issues with missing data, so I wanted to look at the file splitting by section (epochs). I am very much beginner so I appreciate all your help!

Thanks!


@kana If @cdalessandro's workspace doesn't work because of the size of your data, try using the AttriubteCreator Enable Adjacent Feature Attributes option under Advanced: Attribute Value Handling. Here's an example.


Reply