منشور

‏2 متابعين اتباع
0
Avatar

Has anyone successfully exported planned (unflown) missions in *.mme file format from Map Pilot Pro and plotted them in GIS (ArcGIS/QGIS)?

Has anyone tried exporting the mission planning files ( *.mme files) from Map Pilot Pro and had success converting them to something like a KML or similar to allow plotting in GIS (ArcGIS or QGIS). Looking at the files in a text reader, all the lats/longs are visible. I suspect with some coding knowledge, it would be simple to write a script to convert to something readable by GIS, so you could plot planned flightlines on a map for example. However, it becomes quite daunting if you have no programming experience whatsoever. I wonder if anyone had tried this successfully or had found a converter? 

Neil Golding

تعليق رسمي

Avatar

Here is some Python 2.7 code we had laying around for a .MME to KML conversion. Just change the mission_filename to point to a valid .mme file and run it. It will put a KML file for the waypoints in the same location. 

__________________________________________________________________

# plist to KML converter for .mme mission plans
import plistlib

def create_kml(mission_name, waypoint_text):
    kml_start_name = '<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"><Document><name>'
    kml_name_waypoints = '</name><Folder><name>Temporary Places</name><open>1</open><Placemark><name>Mission Plan</name><LineString><tessellate>1</tessellate><coordinates>'    
    kml_waypoints_end = '</coordinates></LineString></Placemark></Folder></Document></kml>'
    
    kml_string = kml_start_name + mission_name + kml_name_waypoints + waypoint_text + kml_waypoints_end
    
    return kml_string

# input path to file here:
mission_filename = '/path/to/file/samplemission.mme'

# read mission plan from plist
mission_data = plistlib.readPlist(mission_filename)

# create string of waypoints
waypoint_string = ''
for w in mission_data['Waypoints']:
    waypoint_string += str(w[0]) + ',' + str(w[1]) + ',' + '0 '

# create KML string
kml_string = create_kml(mission_data['Name'], waypoint_string)

# create filename
kml_filename = mission_filename.replace('.mme', '.kml')

# write it to file
with open(kml_filename, "w") as text_file:
    text_file.write(kml_string)

Zane
إجراءات التعليق ارتباط ثابت

الرجاء تسجيل الدخول لترك تعليق.

3 تعليقات

0
Avatar

Or... Run it here.

ttps://www.online-python.com/hYTHwlrUkv

Open your .mme file so it shows like the 'samplemission.mme' tab shown here.

 

 

Then edit the mission_filename to match the name of the .mme file in the tab.

 

Then copy the output text from the console and paste it into a new plain text file.  

Zane 0 أصوات
إجراءات التعليق ارتباط ثابت