Is iemand op de hoogte van een tool/script beschikbaar om de juiste Breedte-/Lengtegraad waarden te berekenen voor FAA obstructie-evaluatie indieningen? Het specifieke formaat staat hieronder vetgedrukt.<\/P>
<\/P>
Glad it could be of use... If there are any modifications you need, let me know
Thanks, Dan. I noticed that ESRI has a Military Tool, in particular it has a conversion tool, but none of them actually convert to the FAA format. Thanks again!
I totally don't like the leave out the negative sign in the longitude, but I have flags in there to check for it and keep it more general
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">dd_mm_ss</SPAN><SPAN class="punctuation token">(</SPAN>dd<SPAN class="punctuation token">,</SPAN> cal_long<SPAN class="operator token">=</SPAN><SPAN class="token boolean">True</SPAN><SPAN class="punctuation token">,</SPAN> deg_sign<SPAN class="operator token">=</SPAN><SPAN class="string token">""</SPAN><SPAN class="punctuation token">,</SPAN> use_quad<SPAN class="operator token">=</SPAN><SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"""decimal degrees to deg dec min"""</SPAN> <SPAN class="keyword token">if</SPAN> deg_sign <SPAN class="operator token">!=</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">:</SPAN> deg_sign <SPAN class="operator token">=</SPAN> u<SPAN class="string token">'\N{DEGREE SIGN}'</SPAN> deg <SPAN class="operator token">=</SPAN> int<SPAN class="punctuation token">(</SPAN>dd<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">if</SPAN> deg <SPAN class="operator token"><</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">:</SPAN> quad <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'S'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'W'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">[</SPAN>cal_long<SPAN class="punctuation token">]</SPAN> deg <SPAN class="operator token">=</SPAN> abs<SPAN class="punctuation token">(</SPAN>deg<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">else</SPAN><SPAN class="punctuation token">:</SPAN> quad <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'N'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'E'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">[</SPAN>cal_long<SPAN class="punctuation token">]</SPAN> <SPAN class="keyword token">if</SPAN> <SPAN class="operator token">not</SPAN> use_quad<SPAN class="punctuation token">:</SPAN> quad <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN> mins<SPAN class="punctuation token">,</SPAN> secs <SPAN class="operator token">=</SPAN> divmod<SPAN class="punctuation token">(</SPAN>dd<SPAN class="operator token">*</SPAN><SPAN class="number token">3600</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">60</SPAN><SPAN class="punctuation token">)</SPAN> degs<SPAN class="punctuation token">,</SPAN> mins <SPAN class="operator token">=</SPAN> divmod<SPAN class="punctuation token">(</SPAN>mins<SPAN class="punctuation token">,</SPAN> <SPAN class="number token">60</SPAN><SPAN class="punctuation token">)</SPAN> frmt <SPAN class="operator token">=</SPAN> <SPAN class="string token">"{}{}-{:0.0f}-{:05.2f}{}"</SPAN><SPAN class="punctuation token">.</SPAN>format<SPAN class="punctuation token">(</SPAN>deg<SPAN class="punctuation token">,</SPAN> deg_sign<SPAN class="punctuation token">,</SPAN> mins<SPAN class="punctuation token">,</SPAN> secs<SPAN class="punctuation token">,</SPAN> quad<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">return</SPAN> frmt<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
To use, set up the field calculator with the python parser and provide a field name which is used for 'dd' and cal_long
ie for latitude
dd_mm_ss(!LatField!, cal_long=False) and
dd_mm_ss(!LongField!, cal_long=True
you can ignore the other two flags unless you need negative signs and/or the N,S,E,W quadrants.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.