Streamlining Guidance Request
Posted: Sun Aug 21, 2022 12:48 pm
Hello,
My regex powers are mediocre on good days. I've manged to accomplish what I need to do one step at a time, but the repeated chore makes me wonder if the process might be streamlined. I'm not asking for somebody to do the work for me, but rather I'm hoping for guidance on the best approach to consolidate my one-step-at-a-time formula - see my steps noted below. The gist of it is to take the portion of a Global Mapper Pixels to Points HTML report showing final adjusted camera locations (table) and convert it into a tab delimited format.
Thanks very much for any thoughts.
Kelly
My regex powers are mediocre on good days. I've manged to accomplish what I need to do one step at a time, but the repeated chore makes me wonder if the process might be streamlined. I'm not asking for somebody to do the work for me, but rather I'm hoping for guidance on the best approach to consolidate my one-step-at-a-time formula - see my steps noted below. The gist of it is to take the portion of a Global Mapper Pixels to Points HTML report showing final adjusted camera locations (table) and convert it into a tab delimited format.
Thanks very much for any thoughts.
Kelly
Code: Select all
3:33 AM Thursday, August 18, 2022 (VKB)
Final Camera Locations HTML Wrangle for TextPad & RegEx
Beginning with P2P's Pixels to Points Processing Report.htm open in browser
Ctrl+u to show html source
Locate table beginning with
<tbody><tr>
<th>Filename</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Elevation</th>
<th>Roll</th>
<th>Pitch</th>
<th>Yaw</th>
</tr>
Then copy everything beneath it until the end of the table
</tr>
</tbody></table><br>
Paste into new TextPad document and begin cleanup
Replace with nothing
\t
<td align="left">
<td align="center">
<td align="right">
°
m
N
W
Replace ^69 with -69 (or whatever your longitude)
Replace </td>\n with \t
Replace <tr>\n with nothing
Replace </tr>\n with \n
Doing this last bit will allow loading text file into Global Mapper (Y/Northing first)
Column cut DJI_0000 and paste at end of last tab
Replace ^\t with nothing
Insert column header row
Latitude Longitude Elevation Roll Pitch Yaw Filename
When you're done, should look smoething like
Latitude Longitude Elevation Roll Pitch Yaw Filename
44.9521476511 -69.1742673904 36.144 0.000 -86.960 175.866 DJI_0090
44.9520710267 -69.1742679789 36.810 0.000 -87.283 177.629 DJI_0091
44.9520062489 -69.1742633697 36.983 0.000 -87.593 177.971 DJI_0092
44.9519419705 -69.1742591335 36.745 0.000 -87.938 178.182 DJI_0093
44.9518775907 -69.1742574740 36.776 0.000 -88.267 177.975 DJI_0094