Map Maker Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Legacy versions Map Maker
 Legacy questions
 error converting a .dra file to a .shp file
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Antoine

France
31 Posts

Posted - 02/05/2015 :  16:16:04  Show Profile
Hi,

I want to create a .gpx file containing the limits (i.e. boundaries) of a property. I then want to transfer this file to a GPS, so that I can find these limits on the ground.

My starting point was a large .dra file including many polygons. I did “live layer actions / basic operation / set all objects to one style”, then “polygon manipulation / join adjacent polygons of the same style”, and eventually “basic operation / convert polygons to lines”.

(In fact, it was a bit more complicated that this, because my polygon drawings were a bit of a mess, so I also had to clean some polygons and parasite lines, then to use the “join” tool.)

Well, eventually, I got to the point where I had a .dra file containing 27 lines (ex-polygons) which I could convert to a .shp file, then to a .gpx file.

But it did not work… Let me explain you what I did.

I went to “utilities / vector utilities / export files / to ArcView shape file”. I chose my export .dra file and went to “next step”; I chose “line” then “next step”; I chose “export default database” then “next step”; I chose the “target file” then “finish. I could see the correct preview of my file, then confirmed “save”.

Fine, everything up to there is fine. I have two new files in my registry, a .shp and a .shx file.

I first tried to open the .shp file with Google Earth Pro, but it would not work: GEP answers me that some projection information is missing and also that a .prj file is missing.

So I tried to open this .shp file with DNR Garmin. I get 2367 points; here is what they look like:

TRACK 1 47,0448659025464 -91,8380332114526 5210804,07498169 588265,37833023 true

TRACK 2 47,044481540156 -91,8376830584949 5210761,75737000 588292,61048031 Faux

TRACK 14 47,0248878374472 -91,8229548917797 5208601,11743927 589444,11836815 Vrai

TRACK 15 47,0249172238147 -91,8229315515625 5208604,40966797 589445,84288025 Faux

Then I saved this file to a .gpx file. However, I cannot open this file with Garmin Map Source or Base Camp.

I know I am not very far from the solution, but I cannot manage: please help again!

Thanks a lot.

Antoine.


Antoine

Irvine

United Kingdom
51 Posts

Posted - 11/05/2015 :  10:30:14  Show Profile
Antoine

This topic might be of some help.

I used the route .dra > export to .shp > use Mapwell to convert to .gpx and it worked well.

http://www.latitudecartography.co.uk/forum/topic.asp?TOPIC_ID=1579

Irvine
Go to Top of Page

Antoine

France
31 Posts

Posted - 11/05/2015 :  20:46:51  Show Profile
Thank you Irvine.

What I want to do is a simple conversion from a .dra polygon to a .gpx track, not to an image or a map. I already did that previously with another .dra polygon, so I know it is feasible, but for an unknown reason, it does not work any longer...



Antoine
Go to Top of Page

Antoine

France
31 Posts

Posted - 11/05/2015 :  21:27:54  Show Profile
I just tried with Mapwel. Creating an .img file worked well, and I believe I could have used it with my Garmin 60Csx GPS. Less nice than a track, but usable.

However, what I want to do is to send my final .gpx track file to people using a smartphone plus this application called ViewRanger. And for this, I definitely need a .gpx track file...

Antoine
Go to Top of Page

Philippe

France
295 Posts

Posted - 26/05/2015 :  17:07:15  Show Profile
Bonjour Antoine,

Custom vector layers on an Android smartphone?
Hmmm, kind of magic!

It works fine with OSMAnd.
You'll need the GDAL/OGR library and a python command (ogr2osm.py).
You'll find OSMAnd on the Playstore.
GDAL/OGR comes with the OSGeo4W package.
You'll find the python command somewhere on the net with some translations examples.

The translation of your DBF attributes to Open Street Map tags and the creation of a custom renderer is time consuming, believe me!
But that's a good investment.

Then something like :
python "C:\OSGeo4W64\bin\ogr2osm.py" -f -o PCn.osm --positive-id --no-upload-false --add-version -t "C:\OSGeo4W64\bin\translations\PCn.py" -v --epsg=2154 ..\shp\PC_v0.shp
could render the nature of culture of cadastral parcels (with their number) on a standard OSM base layer with OSMAnd on your Android smartphone.

Let me know.

Bon courage!


Philippe
Go to Top of Page

Antoine

France
31 Posts

Posted - 03/07/2015 :  13:31:39  Show Profile
Hello Philippe,

You’re my only friend in this cruel world !

Kind of magic? No, since I already did it, and eventually managed to do it again.


My goal was to transfer some polygons from MapMaker to a GPS (either Garmin 60csx or this Android “ViewRanger” app on my smartphone). In other words, I wanted to convert a .dra file to a .gpx file.

When I say polygon, I actually mean line, not surface, even though the line draws something like a surface.

My objective was to be able to look for the limit of a property on the field, with the device in the hand, looking at the line closing up on the screen while walking in the right direction (see photo).

And this is feasible, here is how I did it.


A) Within MM

My starting point was a large .dra file including many polygons. I did:

Top Menu / live layer actions / basic operation / set all objects to one style;

then:

polygon manipulation / join adjacent polygons of the same style;

and eventually:

basic operation / convert polygons to lines.

In fact, it was a bit more complicated that this, because my polygon drawings were a bit of a mess, so I also had to clean some polygons and parasite lines, then to use the “join” tool.

Eventually I got to the point where I had a clean .dra file containing 27 lines (ex-polygons).


B) Export .dra files from MapMaker

First, I had to create a database for my .dra file (I found that the database created automatically when saving a .dra file does not include as much information as when using this method):

Top Menu / Utilities / Database Utilities / Generate a database from DRA / Select DRA / Tick all the data option boxes.

Then, I exported my .dra file to a couple of ArcView shape files (.shp + .shx):

Top Menu / utilities / vector utilities / export file / ESRI - ArcView shape file

I chose my export .dra file and went to “next step”; I chose “line” then “next step”; I chose “export default database” then “next step”; I chose the “target file” then “finish. I could see the correct preview of my file, then confirmed “save”.


C) Convert .shp + .shx files to a single .gpx file using OziExplorer (even trial version)

Import the file:

File / open a file / import ESRI / polyline polygon

then

“import” / choose the right .shp file

then choose the correct datum, zone, format, field & description.


Export the file:

File / save file / export to GPX / save


Job done!


(For some unknown reason, the method proposed here:

http://www.gerhardbechtold.com/LUPMIS/Manual/5.4.6-change-a-shape-file-to-gpx.html

did not worked in my case…)




Antoine
Go to Top of Page

Antoine

France
31 Posts

Posted - 03/07/2015 :  13:50:02  Show Profile
Here is the photo of the Android "ViewRanger" app on my smartphone. You can see the limits in black. They are a .gpx file opened in the app.

http://www.zimagez.com/zimage/acercarto0041.php


Antoine

Edited by - Antoine on 03/07/2015 16:26:04
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
Forum Powered By: Snitz Forums 2000 Version 3.4.06
Return to home page