GeoReferencePlates
GeoReferencePlates copied to clipboard
Help generating airport diagrams
Hi again :)
I'm trying to build the geo pdfs for the airports. It seems tough that the DTPP does not download automatically.
Calling /load_dtpp_metadata.pl . 1801
explicitly exits because this:
https://github.com/jlmcgraw/GeoReferencePlates/blob/c89f1ca9e479d98068a03b2b2237c9ca06ef5f17/load_dtpp_metadata.pl#L88-L114
The commented code seems to download the catalog though so I wonder why is it commented.
After that I try to generate the airport diagram for one airport using
./georeferenceAirportDiagramsViaDb.pl -p -s -aSBP ./dtpp-1801/
Supplied airport ID: SBP
Processing 1 charts
SW-3, SBP, 70000, APD, AIRPORT DIAGRAM, , 00989AD.PDF, , N, , CA
./dtpp-1801/00989AD.PDF
DBD::SQLite::db prepare failed: no such table: airports at ./georeferenceAirportDiagramsViaDb.pl line 557.
DBD::SQLite::db prepare failed: no such table: airports at ./georeferenceAirportDiagramsViaDb.pl line 557.
The file can be found but not locationinfo.db
is empty.
https://github.com/jlmcgraw/GeoReferencePlates/blob/c89f1ca9e479d98068a03b2b2237c9ca06ef5f17/georeferenceAirportDiagramsViaDb.pl#L137-L139
Where is the locationinfo.db
supposed to come from?
cheers
So I added some fixes and now the generation starts correctly but does not succeed.
The output is the following ./georeferenceAirportDiagramsViaDb.pl -v -d../processFaaData/nasr.sqlite -p -s -aSMX output/dtpp-1801/
ends up with
Found 0 potential Ground Control Points
Only found 0 ground c5ontrol points in output/dtpp-1801/00379AD.PDF, can't georeference
Was this georeferencing working before?
Here is the full output
Supplied airport ID: SMX
Supplied airport lat/long db: ../processFaaData/nasr.sqlite
Processing 1 charts
SW-3, SMX, 70000, APD, AIRPORT DIAGRAM, , 00379AD.PDF, , N, , CA
output/dtpp-1801/00379AD.PDF
Directory: output/dtpp-1801/
File: 00379AD
Suffix: .PDF
TargetPdf: output/dtpp-1801/00379AD.PDF
OutputPdf: output/dtpp-1801/marked-00379AD.pdf
TargetPng: output/dtpp-1801/00379AD.png
TargetTif: output/dtpp-1801/00379AD.tif
TargetVrt: output/dtpp-1801/CA-SMX-00379AD-PDF-AIRPORT-DIAGRAM.vrt
targetStatistics: ./statistics.csv
Airport ID: SMX
Airport Latitude: 34.8999335
Airport Longitude: -120.458074111111
Airport Name: SANTA MARIA PUB/CAPT G ALLAN HANCOCK FLD
34 N, 121 W
PDF Mediabox size: 387.36x594
PDF Mediabox center: 193.68x297
PDF X/Y Ratio: 0.652121212121212
PNG size: 1614x2475
Scalefactor PDF->PNG X: 4.16666666666667
Scalefactor PDF->PNG Y: 4.16666666666667
PNG X/Y Ratio: 0.652121212121212
Object streams: 26
:findAllIcons
mutool show output/dtpp-1801/00379AD.PDF 0 x
error: object out of range (0 0 R); xref size 26
error: cannot load object (0 0 R) into cache
No output from mutool show. Is it installed? Return code was 0
mutool show output/dtpp-1801/00379AD.PDF 1 x
Stream 1: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 2 x
Stream 2: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 3 x
Stream 3: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 4 x
Stream 4: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 5 x
Stream 5: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 6 x
Stream 6: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 7 x
Stream 7: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 8 x
Stream 8: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 9 x
Stream 9: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 10 x
Stream 10: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 11 x
Stream 11: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 12 x
Stream 12: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 13 x
Stream 13: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 14 x
Stream 14: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 15 x
Stream 15: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 16 x
Stream 16: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 17 x
Stream 17: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 18 x
Stream 18: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 19 x
Stream 19: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 20 x
Stream 20: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 21 x
Stream 21: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 22 x
Stream 22: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 23 x
Stream 23: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 24 x
Stream 24: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
mutool show output/dtpp-1801/00379AD.PDF 25 x
Stream 25: :findLatitudeAndLongitudeLines
0 Lines :findLatitudeAndLongitudeTextBoxes
:findAllTextboxes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>00379AD</title>
<meta name="Author" content=""/>
<meta name="Creator" content="MicroStation 8.11.7.443 by Bentley Systems, Incorporated"/>
<meta name="Producer" content="Adobe PDF Library 9.0"/>
<meta name="CreationDate" content=""/>
</head>
<body>
<doc>
<page width="387.360000" height="594.000000">
<word xMin="19.216400" yMin="23.632143" xMax="38.052884" yMax="27.843243">16147</word>
<word xMin="117.339000" yMin="24.812243" xMax="143.921838" yMax="30.643343">SANTA</word>
<word xMin="145.915750" yMin="24.812243" xMax="172.498588" yMax="30.643343">MARIA</word>
<word xMin="174.492501" yMin="24.812243" xMax="239.629626" yMax="30.643343">PUBLIC/CAPTAIN</word>
<word xMin="241.623538" yMin="24.812243" xMax="247.381957" yMax="30.643343">G</word>
<word xMin="249.375869" yMin="24.812243" xMax="276.397368" yMax="30.643343">ALLAN</word>
<word xMin="278.391280" yMin="24.812243" xMax="317.822889" yMax="30.643343">HANCOCK</word>
<word xMin="319.816801" yMin="24.812243" xMax="342.411815" yMax="30.643343">FIELD</word>
<word xMin="344.619600" yMin="24.812343" xMax="373.238727" yMax="30.643443">(SMX)</word>
<word xMin="18.208500" yMin="34.054326" xMax="69.625880" yMax="43.124526">AIRPORT</word>
<word xMin="72.630635" yMin="34.054326" xMax="130.045507" yMax="43.124526">DIAGRAM</word>
<word xMin="291.836100" yMin="37.741843" xMax="311.063307" yMax="41.952943">SANTA</word>
<word xMin="312.505492" yMin="37.741843" xMax="333.174884" yMax="41.952943">MARIA,</word>
<word xMin="334.617069" yMin="37.741843" xMax="369.546784" yMax="41.952943">CALIFORNIA</word>
<word xMin="175.790900" yMin="38.965643" xMax="196.125685" yMax="43.176743">AL-379</word>
<word xMin="197.731401" yMin="38.965643" xMax="214.854755" yMax="43.176743">(FAA)</word>
<word xMin="224.677159" yMin="102.328215" xMax="228.800893" yMax="108.651000">VA</word>
<word xMin="226.533459" yMin="99.162416" xMax="229.772591" yMax="102.603100">R</word>
<word xMin="228.082759" yMin="94.114556" xMax="231.321891" yMax="97.555200">1</word>
<word xMin="228.881531" yMin="88.908846" xMax="232.919691" yMax="94.952965">2.</word>
<word xMin="230.079959" yMin="87.607456" xMax="233.319091" yMax="91.048100">8</word>
<word xMin="232.267359" yMin="80.481062" xMax="235.506491" yMax="83.921600">E</word>
<word xMin="324.901200" yMin="51.420243" xMax="339.500299" yMax="55.631343">ATIS</word>
<word xMin="342.785425" yMin="51.420243" xMax="360.853618" yMax="55.631343">121.15</word>
<word xMin="296.863800" yMin="57.899043" xMax="317.276236" yMax="62.110143">SANTA</word>
<word xMin="318.807321" yMin="57.899043" xMax="339.219757" yMax="62.110143">MARIA</word>
<word xMin="340.750843" yMin="57.899043" xMax="362.522882" yMax="62.110143">TOWER</word>
<word xMin="320.779000" yMin="64.377843" xMax="337.172812" yMax="68.588943">118.3</word>
<word xMin="340.815882" yMin="64.377843" xMax="360.852763" yMax="68.588943">239.25</word>
<word xMin="330.168600" yMin="70.856643" xMax="344.151465" yMax="75.067743">GND</word>
<word xMin="345.765369" yMin="70.856643" xMax="359.393175" yMax="75.067743">CON</word>
<word xMin="343.515900" yMin="77.335443" xMax="360.583488" yMax="81.546543">121.9</word>
<word xMin="195.282700" yMin="128.089423" xMax="222.454254" yMax="131.976523">JANUARY</word>
<word xMin="223.910081" yMin="128.089423" xMax="235.556696" yMax="131.976523">2015</word>
<word xMin="179.287600" yMin="136.008123" xMax="202.715614" yMax="139.895223">ANNUAL</word>
<word xMin="204.103201" yMin="136.008123" xMax="218.595157" yMax="139.895223">RATE</word>
<word xMin="219.982743" yMin="136.008123" xMax="227.076087" yMax="139.895223">OF</word>
<word xMin="228.463674" yMin="136.008123" xMax="251.586419" yMax="139.895223">CHANGE</word>
<word xMin="144.280093" yMin="158.511073" xMax="148.491391" yMax="163.187900">J</word>
<word xMin="169.066600" yMin="163.145543" xMax="178.215636" yMax="167.356643">HS</word>
<word xMin="180.005353" yMin="163.145543" xMax="183.584788" yMax="167.356643">3</word>
<word xMin="109.311134" yMin="172.937000" xMax="113.522330" yMax="176.271894">P</word>
<word xMin="106.437434" yMin="170.016900" xMax="110.648630" yMax="173.351897">U</word>
<word xMin="121.274700" yMin="166.169043" xMax="130.423736" yMax="170.380143">HS</word>
<word xMin="132.213453" yMin="166.169043" xMax="135.792888" yMax="170.380143">4</word>
<word xMin="155.151088" yMin="187.394613" xMax="159.362392" yMax="190.824200">K</word>
<word xMin="145.333900" yMin="184.629239" xMax="148.672950" yMax="188.840344">A</word>
<word xMin="190.620500" yMin="187.333443" xMax="204.038618" yMax="191.544543">ELEV</word>
<word xMin="190.620500" yMin="193.812243" xMax="202.378593" yMax="198.023343">226</word>
<word xMin="114.014763" yMin="237.412573" xMax="118.026861" yMax="241.738400">C</word>
<word xMin="196.076054" yMin="239.854700" xMax="200.088088" yMax="243.034752">A</word>
<word xMin="227.518759" yMin="260.506459" xMax="231.729838" yMax="265.178900">N</word>
<word xMin="277.006500" yMin="265.656843" xMax="290.766583" yMax="269.867943">TWR</word>
<word xMin="231.409114" yMin="267.702916" xMax="235.620252" yMax="271.055500">P</word>
<word xMin="180.520558" yMin="272.819000" xMax="184.731653" yMax="276.141159">X</word>
<word xMin="284.925200" yMin="277.174943" xMax="333.832866" yMax="281.386043">ADMINISTRATION</word>
<word xMin="239.385154" yMin="283.989100" xMax="243.397188" yMax="287.169152">A</word>
<word xMin="173.911792" yMin="282.890300" xMax="178.122746" yMax="286.230280">B</word>
<word xMin="189.227495" yMin="281.597901" xMax="193.438590" yMax="284.919991">0</word>
<word xMin="186.734626" yMin="279.084500" xMax="190.945722" yMax="282.406590">5</word>
<word xMin="184.241758" yMin="276.571100" xMax="188.452853" yMax="279.893190">1</word>
<word xMin="100.491200" yMin="278.909572" xMax="104.291018" yMax="282.921922">C</word>
<word xMin="103.485000" yMin="281.340172" xMax="107.284776" yMax="285.352522">1</word>
<word xMin="227.420416" yMin="275.146523" xMax="231.432445" yMax="283.705200">A4</word>
<word xMin="99.945724" yMin="264.701148" xMax="103.957874" yMax="268.306500">C</word>
<word xMin="134.945283" yMin="267.460683" xMax="141.238382" yMax="274.107800">20</word>
<word xMin="139.109386" yMin="261.735976" xMax="145.402030" yMax="268.381849">3.</word>
<word xMin="142.231783" yMin="260.304759" xMax="146.442830" yMax="264.088900">2</word>
<word xMin="160.807501" yMin="253.299294" xMax="166.835119" yMax="259.086300">B3</word>
<word xMin="211.577600" yMin="245.900714" xMax="215.414028" yMax="250.111589">M</word>
<word xMin="176.783063" yMin="269.050001" xMax="180.994158" yMax="272.372091">4</word>
<word xMin="174.290195" yMin="266.536601" xMax="178.501290" yMax="269.858691">0</word>
<word xMin="171.797326" yMin="264.023200" xMax="176.008422" yMax="267.345290">0</word>
<word xMin="169.304458" yMin="261.509800" xMax="173.515553" yMax="264.831890">8</word>
<word xMin="250.420014" yMin="289.983337" xMax="254.631152" yMax="293.335900">Q</word>
<word xMin="21.232000" yMin="287.757243" xMax="46.381358" yMax="291.968343">3454.0’N</word>
<word xMin="272.233114" yMin="307.036216" xMax="276.444252" yMax="310.388800">S</word>
<word xMin="69.016983" yMin="336.625136" xMax="73.228030" yMax="340.409100">U</word>
<word xMin="71.426783" yMin="333.311523" xMax="75.637830" yMax="337.095700">P</word>
<word xMin="342.587800" yMin="308.561843" xMax="354.915274" yMax="312.772943">FIRE</word>
<word xMin="335.892900" yMin="315.040843" xMax="360.239600" yMax="319.251943">STATION</word>
<word xMin="287.531514" yMin="323.082704" xMax="291.742652" yMax="326.435300">T</word>
<word xMin="269.350863" yMin="320.124037" xMax="273.363093" yMax="328.680600">A6</word>
<word xMin="102.344483" yMin="315.680836" xMax="106.555530" yMax="319.464800">X</word>
<word xMin="226.830459" yMin="313.992251" xMax="231.214738" yMax="321.936400">B5</word>
<word xMin="105.452683" yMin="308.543883" xMax="111.745782" yMax="315.191000">75</word>
<word xMin="249.238300" yMin="307.665341" xMax="259.578543" yMax="312.040300">A5</word>
<word xMin="92.976183" yMin="325.699183" xMax="99.269282" yMax="332.346300">51</word>
<word xMin="97.140286" yMin="319.973233" xMax="103.433384" yMax="326.620349">89</word>
<word xMin="77.391700" yMin="312.145972" xMax="81.191518" yMax="316.158322">C</word>
<word xMin="80.385500" yMin="314.576672" xMax="84.185276" yMax="318.589022">2</word>
<word xMin="268.482546" yMin="298.818739" xMax="272.493876" yMax="303.274400">R</word>
<word xMin="78.021024" yMin="295.875848" xMax="82.033174" yMax="299.481200">C</word>
<word xMin="291.404100" yMin="292.796443" xMax="321.135308" yMax="297.007543">TERMINAL</word>
<word xMin="275.854054" yMin="321.266100" xMax="279.866088" yMax="324.446152">A</word>
<word xMin="327.758200" yMin="326.055043" xMax="338.616191" yMax="330.266143">FBO</word>
<word xMin="60.221483" yMin="345.856376" xMax="66.514430" yMax="352.503000">0.</word>
<word xMin="63.344183" yMin="341.562513" xMax="69.637030" yMax="348.209300">3%</word>
<word xMin="302.847414" yMin="339.900237" xMax="307.058552" yMax="343.252800">U</word>
<word xMin="282.898400" yMin="335.024043" xMax="292.047436" yMax="339.235143">HS</word>
<word xMin="293.837153" yMin="335.024043" xMax="297.416588" yMax="339.235143">2</word>
<word xMin="38.092824" yMin="353.033848" xMax="42.104974" yMax="356.639200">C</word>
<word xMin="315.038500" yMin="346.720743" xMax="324.187536" yMax="350.931843">HS</word>
<word xMin="325.977253" yMin="346.720743" xMax="329.556688" yMax="350.931843">1</word>
<word xMin="314.546554" yMin="360.928400" xMax="318.558588" yMax="364.108452">A</word>
<word xMin="296.686634" yMin="361.718400" xMax="300.897830" yMax="365.053582">%</word>
<word xMin="292.962734" yMin="357.934400" xMax="298.415130" yMax="362.530557">.6</word>
<word xMin="290.480034" yMin="355.411500" xMax="294.691230" yMax="358.746457">0</word>
<word xMin="226.698316" yMin="367.447967" xMax="230.710345" yMax="371.905800">E</word>
<word xMin="303.825283" yMin="368.972408" xMax="308.036479" yMax="372.307404">O</word>
<word xMin="300.969034" yMin="366.070000" xMax="305.180230" yMax="369.404997">D</word>
<word xMin="329.783908" yMin="381.401034" xMax="333.995186" yMax="390.384600">A7</word>
<word xMin="337.174008" yMin="384.828834" xMax="341.385286" yMax="393.812400">A8</word>
<word xMin="311.793734" yMin="377.069600" xMax="316.004930" yMax="380.404597">N</word>
<word xMin="342.297800" yMin="384.296614" xMax="348.391018" yMax="388.507752">W</word>
<word xMin="308.279038" yMin="401.389100" xMax="313.732016" yMax="405.983020">.6</word>
<word xMin="305.795429" yMin="398.868093" xMax="310.006607" yMax="402.201412">2</word>
<word xMin="303.311233" yMin="396.346196" xMax="307.522411" yMax="399.679516">0</word>
<word xMin="300.827038" yMin="393.824300" xMax="305.038216" yMax="397.157620">3</word>
<word xMin="32.390200" yMin="396.387547" xMax="36.439641" yMax="400.598642">2</word>
<word xMin="50.891200" yMin="402.722443" xMax="64.309318" yMax="406.933543">ELEV</word>
<word xMin="50.891200" yMin="409.201243" xMax="62.649293" yMax="413.412343">209</word>
<word xMin="260.798616" yMin="421.858023" xMax="264.810645" yMax="430.253500">H2</word>
<word xMin="22.887800" yMin="421.295543" xMax="48.037158" yMax="425.506643">3453.5’N</word>
<word xMin="278.590200" yMin="420.863666" xMax="285.206479" yMax="425.074604">H</word>
<word xMin="338.168155" yMin="418.472099" xMax="342.379371" yMax="421.899700">3</word>
<word xMin="340.577833" yMin="415.878871" xMax="344.789049" yMax="419.306473">0</word>
<word xMin="228.528954" yMin="413.629200" xMax="232.740068" yMax="416.980412">H</word>
<word xMin="319.193918" yMin="412.393170" xMax="325.322608" yMax="417.963900">B7</word>
<word xMin="201.965000" yMin="406.148636" xMax="211.106332" yMax="410.359877">E3</word>
<word xMin="180.544100" yMin="412.163343" xMax="191.402091" yMax="416.374443">FBO</word>
<word xMin="345.107400" yMin="407.545743" xMax="366.241273" yMax="411.756843">CARGO</word>
<word xMin="348.265725" yMin="413.952743" xMax="366.167111" yMax="418.163843">RAMP</word>
<word xMin="308.001618" yMin="426.630888" xMax="312.013908" yMax="429.907500">H</word>
<word xMin="310.671718" yMin="423.736470" xMax="314.684008" yMax="427.013100">1</word>
<word xMin="26.611100" yMin="382.118972" xMax="30.410918" yMax="386.131322">C</word>
<word xMin="29.604900" yMin="384.549572" xMax="33.404676" yMax="388.561922">3</word>
<word xMin="333.211314" yMin="372.892537" xMax="337.422452" yMax="376.245100">V</word>
<word xMin="307.382334" yMin="372.587000" xMax="311.593530" yMax="375.921817">W</word>
<word xMin="50.718983" yMin="383.361783" xMax="57.012082" yMax="390.008900">02</word>
<word xMin="54.883086" yMin="377.637076" xMax="61.175730" yMax="384.282949">3.</word>
<word xMin="58.005483" yMin="376.205859" xMax="62.216530" yMax="379.990000">2</word>
<word xMin="5.967275" yMin="237.857031" xMax="12.442275" yMax="257.303031">SW-3,</word>
<word xMin="5.967275" yMin="261.195031" xMax="12.442275" yMax="268.979031">04</word>
<word xMin="5.967275" yMin="270.925031" xMax="12.442275" yMax="284.148031">JAN</word>
<word xMin="5.967275" yMin="286.094031" xMax="12.442275" yMax="301.662031">2018</word>
<word xMin="5.967275" yMin="305.554031" xMax="12.442275" yMax="311.392031">to</word>
<word xMin="5.967275" yMin="315.284031" xMax="12.442275" yMax="323.068031">01</word>
<word xMin="5.967275" yMin="325.014031" xMax="12.442275" yMax="338.629030">FEB</word>
<word xMin="5.967275" yMin="340.575031" xMax="12.442275" yMax="356.143031">2018</word>
<word xMin="178.373501" yMin="236.492250" xMax="182.385681" yMax="239.896000">A</word>
<word xMin="181.021998" yMin="233.360694" xMax="185.033919" yMax="236.764600">3</word>
<word xMin="189.263688" yMin="223.921901" xMax="193.474992" yMax="227.351400">L</word>
<word xMin="121.222666" yMin="221.046174" xMax="127.398524" yMax="226.509200">B2</word>
<word xMin="149.992700" yMin="196.054162" xMax="153.319001" yMax="200.265237">2</word>
<word xMin="146.940500" yMin="199.090062" xMax="150.266713" yMax="203.301137">A</word>
<word xMin="61.329500" yMin="435.837843" xMax="76.621874" yMax="440.048943">RWY</word>
<word xMin="78.260577" yMin="435.837843" xMax="93.552951" yMax="440.048943">02-20</word>
<word xMin="76.693698" yMin="442.316743" xMax="89.975194" yMax="446.527843">PCN</word>
<word xMin="91.682327" yMin="442.316743" xMax="95.096594" yMax="446.527843">6</word>
<word xMin="96.803727" yMin="442.316743" xMax="120.710419" yMax="446.527843">F/B/Y/U</word>
<word xMin="76.673696" yMin="448.795543" xMax="91.260911" yMax="453.006643">S-70,</word>
<word xMin="92.965822" yMin="448.795543" xMax="108.685098" yMax="453.006643">D-90,</word>
<word xMin="110.390008" yMin="448.795543" xMax="131.796866" yMax="453.006643">2S-114,</word>
<word xMin="133.501777" yMin="448.795543" xMax="154.335784" yMax="453.006643">2D-150</word>
<word xMin="61.329500" yMin="455.274243" xMax="76.621874" yMax="459.485343">RWY</word>
<word xMin="78.260577" yMin="455.274243" xMax="93.552951" yMax="459.485343">12-30</word>
<word xMin="76.725282" yMin="461.753143" xMax="90.034079" yMax="465.964243">PCN</word>
<word xMin="91.744722" yMin="461.753143" xMax="98.587291" yMax="465.964243">56</word>
<word xMin="100.297934" yMin="461.753143" xMax="124.253770" yMax="465.964243">F/B/X/U</word>
<word xMin="76.694751" yMin="468.231843" xMax="91.301983" yMax="472.442943">S-75,</word>
<word xMin="93.009233" yMin="468.231843" xMax="112.164580" yMax="472.442943">D-181,</word>
<word xMin="113.871830" yMin="468.231843" xMax="135.308062" yMax="472.442943">2S-175,</word>
<word xMin="137.015313" yMin="468.231843" xMax="157.877909" yMax="472.442943">2D-400</word>
<word xMin="333.013400" yMin="437.060943" xMax="347.564080" yMax="441.272043">FIELD</word>
<word xMin="333.949200" yMin="444.475743" xMax="347.367318" yMax="448.686843">ELEV</word>
<word xMin="334.957000" yMin="451.314643" xMax="346.715093" yMax="455.525743">261</word>
<word xMin="319.722400" yMin="492.728443" xMax="331.480493" yMax="496.939543">393</word>
<word xMin="74.359400" yMin="514.490463" xMax="104.677206" yMax="519.025563">CAUTION:</word>
<word xMin="106.263861" yMin="514.490463" xMax="114.374842" yMax="519.025563">BE</word>
<word xMin="115.961497" yMin="514.490463" xMax="136.410309" yMax="519.025563">ALERT</word>
<word xMin="137.996964" yMin="514.490463" xMax="146.457009" yMax="519.025563">TO</word>
<word xMin="148.043664" yMin="514.490463" xMax="176.597110" yMax="519.025563">RUNWAY</word>
<word xMin="178.183765" yMin="514.490463" xMax="209.567803" yMax="519.025563">CROSSING</word>
<word xMin="211.154458" yMin="514.490463" xMax="254.349557" yMax="519.025563">CLEARANCES.</word>
<word xMin="107.258100" yMin="522.121163" xMax="141.563108" yMax="526.656263">READBACK</word>
<word xMin="143.122427" yMin="522.121163" xMax="151.093663" yMax="526.656263">OF</word>
<word xMin="152.652982" yMin="522.121163" xMax="164.778243" yMax="526.656263">ALL</word>
<word xMin="166.337561" yMin="522.121163" xMax="194.399058" yMax="526.656263">RUNWAY</word>
<word xMin="195.958376" yMin="522.121163" xMax="224.362923" yMax="526.656263">HOLDING</word>
<word xMin="225.922242" yMin="522.121163" xMax="270.967836" yMax="526.656263">INSTRUCTIONS</word>
<word xMin="272.527154" yMin="522.121163" xMax="278.072091" yMax="526.656263">IS</word>
<word xMin="279.631410" yMin="522.121163" xMax="312.720149" yMax="526.656263">REQUIRED.</word>
<word xMin="35.845700" yMin="539.932243" xMax="64.657229" yMax="544.143343">12028.0’W</word>
<word xMin="151.890800" yMin="540.508143" xMax="180.702329" yMax="544.719243">12027.5’W</word>
<word xMin="18.208500" yMin="556.257426" xMax="69.625880" yMax="565.327626">AIRPORT</word>
<word xMin="72.630635" yMin="556.257426" xMax="130.045507" yMax="565.327626">DIAGRAM</word>
<word xMin="18.352500" yMin="569.159443" xMax="37.190154" yMax="573.370543">16147</word>
<word xMin="255.122000" yMin="539.932243" xMax="283.933529" yMax="544.143343">12027.0’W</word>
<word xMin="291.836100" yMin="554.545843" xMax="311.063307" yMax="558.756943">SANTA</word>
<word xMin="312.505492" yMin="554.545843" xMax="333.174884" yMax="558.756943">MARIA,</word>
<word xMin="334.617069" yMin="554.545843" xMax="369.546784" yMax="558.756943">CALIFORNIA</word>
<word xMin="116.859700" yMin="568.525743" xMax="143.442538" yMax="574.356843">SANTA</word>
<word xMin="145.436450" yMin="568.525743" xMax="172.019288" yMax="574.356843">MARIA</word>
<word xMin="174.013201" yMin="568.525743" xMax="239.150326" yMax="574.356843">PUBLIC/CAPTAIN</word>
<word xMin="241.144238" yMin="568.525743" xMax="246.902657" yMax="574.356843">G</word>
<word xMin="248.896569" yMin="568.525743" xMax="275.918068" yMax="574.356843">ALLAN</word>
<word xMin="277.911980" yMin="568.525743" xMax="317.343589" yMax="574.356843">HANCOCK</word>
<word xMin="319.337501" yMin="568.525743" xMax="341.932515" yMax="574.356843">FIELD</word>
<word xMin="344.619600" yMin="567.952343" xMax="373.238727" yMax="573.783443">(SMX)</word>
<word xMin="375.011903" yMin="336.696969" xMax="381.486903" yMax="356.142970">SW-3,</word>
<word xMin="375.011903" yMin="325.020970" xMax="381.486903" yMax="332.804970">04</word>
<word xMin="375.011903" yMin="309.851970" xMax="381.486903" yMax="323.074970">JAN</word>
<word xMin="375.011903" yMin="292.337970" xMax="381.486903" yMax="307.905970">2018</word>
<word xMin="375.011903" yMin="282.607970" xMax="381.486903" yMax="288.445970">to</word>
<word xMin="375.011903" yMin="270.931970" xMax="381.486903" yMax="278.715970">01</word>
<word xMin="375.011903" yMin="255.370969" xMax="381.486903" yMax="268.985970">FEB</word>
<word xMin="375.011903" yMin="237.856970" xMax="381.486903" yMax="253.424970">2018</word>
<word xMin="102.155034" yMin="165.665300" xMax="106.366230" yMax="169.000482">%</word>
<word xMin="98.431134" yMin="161.881200" xMax="103.883430" yMax="166.477457">.5</word>
<word xMin="95.948334" yMin="159.358400" xMax="100.159530" yMax="162.693357">0</word>
<word xMin="83.845058" yMin="173.161000" xMax="89.302253" yMax="177.739490">.6</word>
<word xMin="81.353295" yMin="170.648201" xMax="85.564390" yMax="173.970291">2</word>
<word xMin="78.860426" yMin="168.134800" xMax="83.071522" yMax="171.456890">2</word>
<word xMin="76.367558" yMin="165.621400" xMax="80.578653" yMax="168.943490">1</word>
<word xMin="58.018100" yMin="168.400643" xMax="71.436218" yMax="172.611743">ELEV</word>
<word xMin="58.018100" yMin="174.879543" xMax="69.776193" yMax="179.090643">217</word>
<word xMin="205.813400" yMin="143.926823" xMax="212.832855" yMax="147.813923">0.1</word>
<word xMin="214.236746" yMin="143.926823" xMax="219.537838" yMax="147.813923">W</word>
<word xMin="105.437800" yMin="145.102739" xMax="108.776850" yMax="149.313844">A</word>
<word xMin="177.434126" yMin="194.848199" xMax="185.221400" yMax="200.923783">20</word>
<word xMin="76.511567" yMin="144.240800" xMax="80.722626" yMax="147.549321">1</word>
<word xMin="74.008432" yMin="146.743934" xMax="78.219492" yMax="150.052455">2</word>
<word xMin="92.317300" yMin="143.138062" xMax="95.643601" yMax="147.349137">1</word>
<word xMin="89.265100" yMin="146.173962" xMax="92.591313" yMax="150.385037">A</word>
<word xMin="22.167900" yMin="155.226743" xMax="47.317258" yMax="159.437843">3454.5’N</word>
</page>
</doc>
</body>
</html>
:findLatitudeTextBoxes2
LatRegex1: Degrees: 34, minutes: 54.0, declination: N && 121, airportLongitudeDeclination, W
Degrees: 34, Minutes 54.0, declination:N ->34.9
LatRegex1: Degrees: 34, minutes: 53.5, declination: N && 121, airportLongitudeDeclination, W
Degrees: 34, Minutes 53.5, declination:N ->34.8916666666667
LatRegex1: Degrees: 34, minutes: 54.5, declination: N && 121, airportLongitudeDeclination, W
Degrees: 34, Minutes 54.5, declination:N ->34.9083333333333
$VAR1 = {
'34.8916666666667' => {
'CenterX' => '35.462479',
'CenterY' => '170.598907',
'Decimal' => '34.8916666666667',
'Height' => '4.21109999999999',
'Text' => '34-53.5N',
'Width' => '25.149358'
},
'34.9' => {
'CenterX' => '33.806679',
'CenterY' => '304.137207',
'Decimal' => '34.9',
'Height' => '4.21109999999999',
'Text' => '34-54.0N',
'Width' => '25.149358'
},
'34.9083333333333' => {
'CenterX' => '34.742579',
'CenterY' => '436.667707',
'Decimal' => '34.9083333333333',
'Height' => '4.21109999999999',
'Text' => '34-54.5N',
'Width' => '25.149358'
}
};
Found 3 Potential latitude text boxes
:findLongitudeTextBoxes2
LonRegex1: Degrees: 120, Minutes 28.0, declination:W ->-120.466666666667
LonRegex1: Degrees: 120, Minutes 27.5, declination:W ->-120.458333333333
LonRegex1: Degrees: 120, Minutes 27.0, declination:W ->-120.45
LonRegex3: Degrees: 217, minutes: 0., declination: W && 121, airportLongitudeDeclination, W
$VAR1 = {
'-120.45' => {
'CenterX' => '269.5277645',
'CenterY' => '51.962207',
'Decimal' => '-120.45',
'Height' => '4.21109999999999',
'Text' => '120-27.0W',
'Width' => '28.811529'
},
'-120.458333333333' => {
'CenterX' => '166.2965645',
'CenterY' => '51.386307',
'Decimal' => '-120.458333333333',
'Height' => '4.21109999999999',
'Text' => '120-27.5W',
'Width' => '28.811529'
},
'-120.466666666667' => {
'CenterX' => '50.2514645',
'CenterY' => '51.962207',
'Decimal' => '-120.466666666667',
'Height' => '4.21109999999999',
'Text' => '120-28.0W',
'Width' => '28.811529'
}
};
Found 3 Potential longitude text boxes
:outlineEverythingWeFound
:findClosestLineToTextBox
latitudeTextBoxes
$VAR1 = {
'34.8916666666667' => {
'CenterX' => '35.462479',
'CenterY' => '170.598907',
'Decimal' => '34.8916666666667',
'Height' => '4.21109999999999',
'Text' => '34-53.5N',
'Width' => '25.149358'
},
'34.9' => {
'CenterX' => '33.806679',
'CenterY' => '304.137207',
'Decimal' => '34.9',
'Height' => '4.21109999999999',
'Text' => '34-54.0N',
'Width' => '25.149358'
},
'34.9083333333333' => {
'CenterX' => '34.742579',
'CenterY' => '436.667707',
'Decimal' => '34.9083333333333',
'Height' => '4.21109999999999',
'Text' => '34-54.5N',
'Width' => '25.149358'
}
};
:findClosestLineToTextBox
longitudeTextBoxes
$VAR1 = {
'-120.45' => {
'CenterX' => '269.5277645',
'CenterY' => '51.962207',
'Decimal' => '-120.45',
'Height' => '4.21109999999999',
'Text' => '120-27.0W',
'Width' => '28.811529'
},
'-120.458333333333' => {
'CenterX' => '166.2965645',
'CenterY' => '51.386307',
'Decimal' => '-120.458333333333',
'Height' => '4.21109999999999',
'Text' => '120-27.5W',
'Width' => '28.811529'
},
'-120.466666666667' => {
'CenterX' => '50.2514645',
'CenterY' => '51.962207',
'Decimal' => '-120.466666666667',
'Height' => '4.21109999999999',
'Text' => '120-28.0W',
'Width' => '28.811529'
}
};
findIntersectionOfLatLonLines
$VAR1 = {};
Ground Control Points command line string
Found 0 potential Ground Control Points
Only found 0 ground c5ontrol points in output/dtpp-1801/00379AD.PDF, can't georeference
Touching output/dtpp-1801/noPoints-CA-SMX-00379AD-PDF-AIRPORT-DIAGRAM.vrt
Success: 0, Fail: 0, No Text: 0, No Points: 1, Chart: 1/1
Jan, This definitely did work at one point but I haven't used it in about two years. I'll take a look and see if I can get it back to functional status
That would be great thanks 🙏 Meanwhile I'm trying to found out how all that works :)
In the meantime, I've added an old database from the 1601 cycle so you can see what the output is and whether it would ultimately be of any use to you.
Hi, thanks for the update. I tested again and here are my observations:
- Copy the nasr db
cp ../processFaaData/nasr.sqlite .
- Get all the pdf plates from FAA DDTPP*_201801.zip
./download_dtpp.py
- Extract the plates. This also contains the catalog .xml
mkdir dtpp-1801
unzip 'DDTPP?_201801.zip' -d dtpp-1801
- Parse the xml file and generate the dtpp-1801.sqlite
./load_dtpp_metadata.pl -d . 1801
Here there is a logic to create a .png in the convertPdfToPng
method but it runs only on charts marked as updates or added in the xml. So when starting from scratch, not all .pdfs will be converted to .png. I'm not sure if this matters or not
https://github.com/jlmcgraw/GeoReferencePlates/blob/bb146d9ea7e66affd33827ad32dd1bac3dae7704/load_dtpp_metadata.pl#L438-L444
- Do the georeferencing
./georeference_airport_diagrams_via_db.pl -p -s -aSBP -c1801 dtpp-1801/
Supplied airport ID: SBP
Supplied cycle: 1801
Processing 1 charts
SW-3, SBP, 70000, APD, AIRPORT DIAGRAM, , 00989AD.PDF, , N, , CA
dtpp-1801/00989AD.PDF
LonRegex3: Degrees: ., minutes: 5, declination: W && 121, airportLongitudeDeclination, W
Argument "." isn't numeric in abs at ./georeference_airport_diagrams_via_db.pl line 1679.
Only found 0 ground control points in dtpp-1801/00989AD.PDF, can't georeference
Touching dtpp-1801/noPoints-CA-SBP-00989AD-PDF-AIRPORT-DIAGRAM.vrt
Success: 0, Fail: 0, No Text: 0, No Points: 1, Chart: 1/1
The parsed coordinates seem to be ok-ish
LonRegex3: Degrees: ., minutes: 5, declination: W && 121, airportLongitudeDeclination, W
but abs($main::airportLongitudeDegrees) - abs($degrees) <= 1 );
fails because degrees
is not a number
I noticed that when I use the the pdf from the example directory (CA-SFO-AIRPORT-DIAGRAM.PDF
, it works correctly.
./georeference_airport_diagrams_via_db.pl -p -s -aSFO -c1801 dtpp-1801/
Supplied airport ID: SFO
Supplied cycle: 1801
Processing 1 charts
SW-2, SFO, 70000, APD, AIRPORT DIAGRAM, , CA-SFO-AIRPORT-DIAGRAM.PDF, , N, , CA
dtpp-1801/CA-SFO-AIRPORT-DIAGRAM.PDF
LonRegex3: Degrees: 188.196800, minutes: 22, declination: W && 123, airportLongitudeDeclination, W
LonRegex3: Degrees: 318.491400, minutes: 23, declination: W && 123, airportLongitudeDeclination, W
LonRegex3: Degrees: 448.498000, minutes: 24, declination: W && 123, airportLongitudeDeclination, W
Setting orientation to landscape
0.000029114844969, -0.000029114844969, -122.4208174, 37.6416227, -122.3444492, 37.6020556, 1.93009343621357
$pixelSizeX, $pixelSizeY, $upperLeftLon, $upperLeftLat, $xPixelSkew, $yPixelSkew
2.6982277965e-09, -3.04539344382e-21, -122.344462421, 37.6416104257, -3.08567286696e-05, -2.45352809145e-05
Sucess!
Success: 1, Fail: 0, No Text: 0, No Points: 0, Chart: 1/1
I believe the pdf text format changed and the reg exp don't match anymore the coordinates.
This is the debug output when I use the sample CA-SFO-AIRPORT-DIAGRAM.PDF
:
:findLatitudeTextBoxes2
LatRegex3: Degrees: 37, minutes: 37, declination: N && 123, airportLongitudeDeclination, W
Orientation is Landscape
Degrees: 37, Minutes 37, declination:N ->37.6166666666667
LatRegex3: Degrees: 37, minutes: 38, declination: N && 123, airportLongitudeDeclination, W
Orientation is Landscape
Degrees: 37, Minutes 38, declination:N ->37.6333333333333
$VAR1 = {
'37.6166666666667' => {
'CenterX' => '244.888693',
'CenterY' => '532.092',
'Decimal' => '37.6166666666667',
'Height' => '-10.2478',
'Text' => '37-37N',
'Width' => '4.2133'
},
'37.6333333333333' => {
'CenterX' => '82.344393',
'CenterY' => '531.0122',
'Decimal' => '37.6333333333333',
'Height' => '-10.2478',
'Text' => '37-38N',
'Width' => '4.2133'
}
};
Found 2 Potential latitude text boxes
and this when I use the latest cycle for the same airport 00375AD.PDF
:findLatitudeTextBoxes2
LatRegex3: Degrees: 13, minutes: 37, declination: N && 123, airportLongitudeDeclination, W
$VAR1 = {};
Found 0 Potential latitude text boxes
The program is looking for regular expressions that represent how certain elements of the diagram are drawn. If how these are rendered has changed since I worked with it last then the program will no longer work.
On Feb 5, 2018, at 2:59 AM, Jan Chaloupecky [email protected] wrote:
I noticed that when I use the the pdf from the example directory (CA-SFO-AIRPORT-DIAGRAM.PDF, it works correctly.
./georeference_airport_diagrams_via_db.pl -p -s -aSFO -c1801 dtpp-1801/ Supplied airport ID: SFO Supplied cycle: 1801 Processing 1 charts SW-2, SFO, 70000, APD, AIRPORT DIAGRAM, , CA-SFO-AIRPORT-DIAGRAM.PDF, , N, , CA dtpp-1801/CA-SFO-AIRPORT-DIAGRAM.PDF LonRegex3: Degrees: 188.196800, minutes: 22, declination: W && 123, airportLongitudeDeclination, W LonRegex3: Degrees: 318.491400, minutes: 23, declination: W && 123, airportLongitudeDeclination, W LonRegex3: Degrees: 448.498000, minutes: 24, declination: W && 123, airportLongitudeDeclination, W Setting orientation to landscape 0.000029114844969, -0.000029114844969, -122.4208174, 37.6416227, -122.3444492, 37.6020556, 1.93009343621357 $pixelSizeX, $pixelSizeY, $upperLeftLon, $upperLeftLat, $xPixelSkew, $yPixelSkew 2.6982277965e-09, -3.04539344382e-21, -122.344462421, 37.6416104257, -3.08567286696e-05, -2.45352809145e-05 Sucess! Success: 1, Fail: 0, No Text: 0, No Points: 0, Chart: 1/1 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
yep :) I'm trying to understand how to parsing logic works to see if I can fix it
So the way I did it originally was to load PDFs into Inkscape and inspect objects there to find out what the commands were to draw them and then create regexes to find those commands in the expanded form of the PDFs
On Feb 5, 2018, at 7:50 AM, Jan Chaloupecky [email protected] wrote:
yep :) I'm trying to understand how to parsing logic works to see if I can fix it
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
hmm they appear to be the same
but the output of the pdftotext
does not report the same words
. Here I'm manually grepping for the 37 38’ N
:
pdftotext CA-SFO-AIRPORT-DIAGRAM.pdf -bbox - | grep ">37</word>" -A 2
<word xMin="242.782043" yMin="67.031900" xMax="246.993497" yMax="75.250900">37</word>
<word xMin="242.783012" yMin="53.801505" xMax="246.995143" yMax="65.558900">37’</word>
<word xMin="242.784243" yMin="52.105240" xMax="246.995343" yMax="56.784100">N</word>
--
<word xMin="80.237743" yMin="68.111700" xMax="84.449197" yMax="76.330700">37</word>
<word xMin="80.238712" yMin="54.881205" xMax="84.450843" yMax="66.638700">38’</word>
<word xMin="80.239943" yMin="53.185040" xMax="84.451043" yMax="57.863900">N</word>
the new plate does not find anything
pdftotext 00375AD.PDF -bbox - | grep ">37</word>" -A 2
ok, getting closer:
in the new pdfs, the text seems to be in html (note the '
)
<word xMin="28.780443" yMin="283.508163" xMax="32.993943" yMax="308.497700">122°23'</word>
<word xMin="28.783043" yMin="281.811897" xMax="32.994143" yMax="286.490800">W</word>
the old pdf not
<word xMin="31.215243" yMin="436.739000" xMax="35.427051" yMax="448.498000">122</word>
<word xMin="31.216566" yMin="423.509205" xMax="35.428843" yMax="435.266000">24’</word>
<word xMin="31.217943" yMin="421.812897" xMax="35.429043" yMax="426.491800">W</word>
so that's probably why the reg exp does not match. Also how the actual text words are split in the list of <word>
is not the same.