ESRI Shapefiles in MP

I use ArcGIS quite a lot when planning out flights and I can see the utility in being able to import an ESRI shapefile into Mission Planner. It would allow some users to use a GPS such as a Trimble to shoot GCPs then use them as waypoints and camera trigger points in imagery missions. Is this something that is already incorporated into the MP code and I am just missing it? I guess that the SHP could be exported to a KML/KMZ overlay. With the SHP (from the GPS shots) the exact lat/long of a known ground landmark could be utilized as a GCP which could further enhance the accuracy of the resultant imagery.

Anyone else doing this?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • This describes a temporary solution for the challenge:

    http://diydrones.com/profiles/blogs/converting-shapefiles-to-poly-f...

    • Gents: This is precisely why I finally created an acct. with DIYD! I'm a GISer that realizes the HUGE potential of this blog and work done in DIYD. I've been following the blog for about 10 months but scaled back for the last few and really missed this discussion until today! I'm so glad to see this support and topic. 

      RL's post with the py script is a great start--thanks.

       I was very happy to read the discussion go into OGR/GDAL, but I'm sad to see it went back to .shp as the preference since there are limits inherent in that format. I work with ESRI software daily but I've been easing into QGIS as my hobbyist GIS. The latter plays with python and works well with FGDBs too. Anyhow, I think python might be a great answer here because it could probably accommodate  whatever desktop GIS flavor you like.

      I can't claim to be a programmer--more of a cobbler...but I'm not bad with GIS (+12 yrs exp.). I would be very glad to work with a group to move this along if we can. Since I'm new to this community I'm not sure how this works. PM me if interested?

  • Developer

    latest beta MP supports reprojection on the fly. so you should be able to load almost any coord system.

    • It'll definitely reproject on the fly. It just did something kind of unexpected and REALLY cool. I gave it a polygon SHP instead of a point SHP and it interpreted the polygon centroids as WPTs. That was pretty cool. Maybe not what you wanted to hear, but cool nonetheless!

      This means that in order for us to get WPTs done in ArcGIS (or anything else using SHPs for that matter) we will likely have to set them up first in ArcGIS and then import the point SHP only into MP. The point SHP DBF schema should have at the minimum a field named WP for WPT number and ELEVATION for altitude in meters.

      Side note...

      Would it be possible to get a listing of all of the WPT type codes that MP uses? By that, I mean TAKEOFF, LAND, WAYPOINT, DO_SET_<command>, etc? I noticed that there is definitely a pattern to them, but I haven't figured it out yet. Those of us in ArcGIS could use these as subtypes in a geodatabase where we build our WPT features and set types with a dropdown menu, then export them directly to a SHP for MP.

      ...now if I could just get that pesky KML export from ArcGIS to work right, I could use my tract polygons in MP. This isn't on MP...it is definitely an ArcGIS/ESRI issue. It has been ever since they attempted to implement "Export LYR to KMZ" support in ArcGIS.

    • Michael you rock! I'll give it a good workout tomorrow at the office!

  • Developer

    ok the plan is

    points should have lat/long coords

    "ELEVATION" from the dbf will be read in as the wp altitude.

    "wp" from the dbf file will be sorted an imported from 0 to 99.. etc

     

    all that make sence?

    • Yes, that would be great. I just have 2 questions:

      1) Would there be a limit for the number of WPs?

      2) If the DBF contains other fields that aren't named WP, lat, long or elevation, will MP ignore them? 

      • Developer

        1. only limited by the autopilot itself, currently apm 2 has about 160 wp. and I know that the next pixhawlk release should be around 900 wp's

         

        2. mp will ignore all other values, other than ELEVATION and wp.

         

        ive uploaded the beta of this already.

        • Thanks, I updated the beta. However, when I import the shapefile now, there are 2 problems.

          1) The alt field is populated by the default altitude, which is similar problem to the previous beta. I even tried to edit the DBF by deleting all fields except for WP and elevation. Is there a way to override the default altitude? 

          2) The WPs are not numbered properly anymore. This did not occur in the previous beta.

          In my original flight plan, all flight lines were parallel (except for the take-off/landing), but when I import the SHP, I get crossed lines. See attached screenshots. 

          MP_flightplan_original.JPG

          MP_flightplan_shp_import.JPG

          • Developer

            ok new beta uploading.

            this one has a combination of things

            For Altitude it uses in this order

            1. ELEVATION in dbf

            2. alt in dbf

            3. the Z component of the point.

            for wp number

            1. wp in dbf

            2. order they appear in the file.

            if the wp is in the dbf the points are sorted lowest to highest.

             

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @knightsautoteam: Hi @diyrobocars, we are Orlando's first Autonomous racing club and would love your support. We are hosting our first K…
Jan 20
DIY Robocars via Twitter
RT @Heavy02011: #VirtualRaceLeague: @DIYRobocars Race #14 - #ParkingLotNerds join us January 15th for #AutonomousRacing #RoboRace ⁦@DAVGtec…
Jan 16
DIY Robocars via Twitter
RT @chr1sa: And after that came our races, 50 in all. This battle between these two Russians was the best we've ever seen -- incredible fig…
Jan 16
DIY Robocars via Twitter
RT @chr1sa: Before our @DIYRobocars virtual race this weekend, we had a presentation from the team that won the Indy Autonomous Challenge i…
Jan 16
DIY Drones via Twitter
Dec 12, 2021
DIY Robocars via Twitter
Dec 12, 2021
DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
Dec 4, 2021
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28, 2021
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26, 2021
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25, 2021
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23, 2021
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23, 2021
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23, 2021
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20, 2021
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20, 2021
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9, 2021
More…