Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default How to make vector map Topo map "FriPro-v5"

    In order not to clutter the sticky Garmin Mapsource Creator thread I start a new one even if I suspect that most issues are about MPC.

    What I want is to build a new version of the topo map FriPro "version 5", in vector style, not raster.

    - This is what I have:

    ESRI shape files in about 36 layers with corresponding .shp .dbf .shx .prj type files in SWEREF99.
    The data are now avalible for free download and use since the turn of the year from the swedish "Lantmäteriverket". This gives the opportunity to create an up-to-date version of the topo map. Data can be downloaded in shape or mapinfo format.

    - This is what I have done so far:

    Importing the shape files to QGIS works fine and I can see the different type of i.e. roads in the roads layer.
    (The reason for using QGIS is that it is free and kind people have made style files for theese maps in order to make them look good.)
    Converting the .shp files to WGS84 (needed by MPC) made with OGR2GUI64 seems to work fine.
    Importing the WGS84 files to QGIS works fine and I can see the different types of roads in the layer just as before the map datum conversion.
    With the help of suitable .qml files the map looks really good in QGIS, with the help of .typ files the same good look would hopefully be possible in an .img file for Garmin gps and MapSource/BaseCamp.
    Routing ability is not neccessary even if it would be possible, it is a topo map and roads/paths are not always connected properly.

    I have started with the two layers that contains the roads and footpaths in order to keep it simple.
    With MPC8.3 an .img file and also MapSource install CD is generated. Map looks OK in MapSource/BaseCamp.
    BUT, all roads are of the same type. The different type of roads have been lost in the MPC processing and the generated .typ file contains no polylines as expected.
    MPC gave one error in log file but beside from that it seems to process OK.

    Warning: 1 Unrecognized Line features in file G:\Projekt\vl_20.shp: Type: - Link id: 0


    That is as far as I have come for now.
    I do not know how the attributes for i.e. different types of roads are stored in an .shp file (or the .dbf file?) but it seems that they are lost by MPC.

    Hopfully someone can point me in the right direction...

  2.    Advertissements


  3. #2
    Navigation software expert

    Cnfhbr's Avatar
    Join Date
    Jan 2010
    Location
    CIS
    Posts
    1,217
    Rep Power
    476

    Default

    Quote Originally Posted by Smulan View Post
    I do not know how the attributes for i.e. different types of roads are stored in an .shp file (or the .dbf file?) but it seems that they are lost by MPC.
    There are examples of the road shapefiles in the folder 'Sample' of the MPC distro.
    In addition, for a start you need to read the 'Feature Types' and 'GARMIN Shapefile Specification' of the MPC Help.
    Ie your Swedish shapefiles must first be converted to Garmin shapefiles.

  4. #3
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default

    Ok, thanks.
    I will do some reading in that section.
    I browsed the MPC help but now I know what to work on.

  5. #4
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default

    Making some progress slowly...

    I have managed to generate a map (.img) from one of the shape files or layers.
    I used a road layer with only polylines in order to learn how the process works.

    If someone else works with this map, please add your info.
    This is how I have done so far:

    1 - : Transform the SWEREF99 projection to WGS84 with OGR2GUI64 program. Works fine, single files or whole folder can be transformed. WGS84 is 4326 (ESPG:4326) and should be given in the projection field, not obvious for those of us not working with these issues...

    2 - : With DBF Commander I open the corresponding .dbf file. Change the record layout so that the fields are named "name" and "grmn_type" which seems to be the names MPC wants as can be seen in the sample files from MPC. (?) Seems as the length and type of the fields can be changed without problems (?)

    3 - : With DBF Commander change the values in "name" from the numeric code from the source to characters and change the numbers given in my source files to a name that will show in the map, Change the values in the grmn_type to names that MPC will accept, I found the acceptable names from MPC "Edit Feature Display Properties" "Garmin Lines" or "Custom Lines". I chosed to map each of the roads I wanted to be used to "CUSTOMIZABLE_LINE_X". Find and replace function of DBF Commander works fine but takes a lot of time since there are many (over 100 000 vectors just for the roads in my district) records to search and replace.

    4 - : With MPC give a product name, select a build folder location and add map/shape file(s).
    Configure map builds and Edit Feature Display Styles. Here I can see the acceptable Feature Types and also edit the lines so that I can have the line that I want (this can later be changed with TypViewer).

    5 - : In MPC "Product Configuration" tab "Detailed" uncheck "Enable Route Calculation" since I do not want a routable map because the roads and especially the foot-paths are not connected always and any routing will produce bad results.

    6 - : In MPC "Product Configuration" tab "Install" check the "Create Product Image" so that a gmapsupp.img is produced that I can copy to an usb stick folder garmin and see the map in BaseCamp for quick feedback of the result.

    7 - : Build map. This takes a lot of time also with the "easy" file I have tested with so I suppose it will need overnight compilation for the larger ones.

    The generated gmapsupp.img looks just as expected and I can also play with TypViewer to change the apperence of the map so far so good. I will try with a layer with polygons next and hopefully learn some more and read help files again, however some questions needs to be solved.

    There are 36 layers in this map and each layer has many types that needs to be mapped to "grmn_type", this must be made manually in DBF Commander and will take a lot of time but it is a one time job so OK.

    I suppose that I can generate one .img file for each layer and the join them in GmapTool, generating all 36 layers in one batch of MPC seems heavy but maybe it will work...

    All generated .img files will initially have the same FID but I assume that I can handle that with GmapTool.

    Some symbols have an angle of direction defined, have not found out how to specify this in "Garmin style" yet.

    Have not tested the generated map in a gps yet.

    To be continued...

  6. #5
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default

    Time for a progress report.
    Small steps forward and I have now generated a map that begins to look promising.
    The generated map works fine in my gpsmap64s also.

    [Only registered and activated users can see links. ]

    The problem with editing the huge (>300 000 records) dbf files I had using DBF Commander almost stopped me when 24 h of cpu was not enough but I found another program. The DBF Viewer 2000 did the same job in two seconds, what a relief! (30 days trial license and not too expensive so I can consider buying it).

    I have added 9 layers so far and all works more or less as expected but I need to learn more on some parameters.
    The generated typ file works fine and can be edited with TYPViewer.
    The "Detail Count" must be controlled better, now all details show up disregarding scale. I mostly use the type "CUSTOMIZABLE_LINE_XX)" and the count is 3 as default.
    "Number of feature layers" is 3 by default, what does this really mean, can be increased to 5? And the handling of "Scale of layers" must be understood better (by me...)
    When editing the look of bitmaps and lines there is a choice of "Wide Tool" or "Thin Tool", I have not figured out the effect of that yet.
    And I hope to get the background colour to white (255,255,255) which is not the case in the FriPro v4 which have a grey shadow also over areas defined as white in the typ file.


    Thanks to kravets in MPC thread [Only registered and activated users can see links. ]
    Your info works and I can alter the licence file to suit my preferences.

    I will continue with adding more layers like colours for fields, woods, parks etc. and houses and so on.

  7. #6
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default

    Not as easy as I thought, there are many grmn_type keys that needs to be mapped to corresponding keys from the shape files vendor (Lantmäteriet). One small typo error gives error message from MPC that does not give any clue to what is wrong and there are amny keys and layers. And the processing with MPC takes all night to complete.

    But, I have found out a workaround. I have made a map with the parts that are interesting for me, the things that have changed since the FriProv4 map which is the roads and paths. The rest of the things in the FriProv4 describes the parts of the nature that does not change like lakes, streams, mountains etc.
    So, using the shape files of the layers for the roads, paths etc and producing a map with transparent background checked in MPC was fairly easy.
    The other part of the workaround is to use TYPViewer to make all roads, paths etc in FriProv4 invisible and then use MapSource to produce a .img file without roads.

    With both maps loaded into the gps and selected I can now see the new "FriProv5" in my gpsmap64s!

    Below are prints from the FriProv4 original, the FriProv4 without roads and my transparent road map. A new road can be seen in the road map.


    [Only registered and activated users can see links. ]


    [Only registered and activated users can see links. ]


    [Only registered and activated users can see links. ]

    I have not been able to combine the two maps with gmaptool, they have different mapIDs and different TYP files. It would be nice to have them combined i.e. for my gpsmap60CSx and for easy viewing in MapSource.

  8. #7
    GPSPower Helper

    x-trail's Avatar
    Join Date
    Jul 2010
    Location
    Europe
    Posts
    324
    Rep Power
    163

    Default

    Join the two .img files to one .img file using using as "Mapset FID" the mapID of the map with the most complicated TYP file (map with no roads). Use PID=1.
    Then Split the new .img (mapset) for Mapsource, using again as "Mapset FID" the same map ID as you did above.
    Mapsource will now read this mapset as one file and is going to use only the TYP file of the map, whose mapID you gave to the mapset.
    Open this TYP file and add (copy-paste in the center window) all the elements of the other map's TYP file. Now Mapsource will draw both maps using one TYP.

  9. #8
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default

    Thanks x-trail for pointing me in the right direction, the method worked well in most aspects.
    Shows up fine in BaseCamp after installing to the computer, in Mapsource however it does not work well.
    When zooming in and out some of the roads shows and some disappeares randomly, maybe at tile borders.
    When "merging" the two typ files I realized that I had chosen the same grmn_type key that was used in the FriPro4 map so I will have to change a couple of my choises.
    I also changed the FID of the finished map (with GMTK) in order not to have problem with the installed FriPro4 in my computer. Now the maps can co-exist in the computer.
    With MapInstall I produced a gmapsupp.img and it worked fine in my gpsmap 60CSx and 64s.

    I will continue with the typ-ing and adjusting with this "workaround" solution, possibly trying to add more layers from the shape files to make a complete map. After working with the typ file for FriPro4 I can see that the producer has used grmn_type keys that does not exist in MPC as a selection and I am not sure that I can get all the effects I would like to have as tilted text etc.

  10. #9
    Navigation software expert

    Cnfhbr's Avatar
    Join Date
    Jan 2010
    Location
    CIS
    Posts
    1,217
    Rep Power
    476

    Default

    Quote Originally Posted by Smulan View Post
    I am not sure that I can get all the effects I would like to have as tilted text etc.
    Just what do you mean by that?
    I've never heard that Garmin units can support "italics" in vector maps.
    I may be a bit did not understand you.

  11. #10
    Vip Master
    Smulan's Avatar
    Join Date
    Oct 2010
    Location
    Who knows?
    Posts
    159
    Rep Power
    117

    Default

    Sorry, I was maybe unclear there. I meant rotated text, not horizontal as usual, the rotation can also be applied to symbols like road barriers i.e.
    The angle of rotation is defined in the original .dbf file like below where "trikt" means the direction of the text. The adjustement of the text in relation to the line, in this case the elevation curve, is also defined in the .dbf

    [Only registered and activated users can see links. ]

    The result is what can be seen below, blue text along streams and brown text inserted in elevation curves.

    [Only registered and activated users can see links. ]

    This is not really important but more of aestethic interest so I will not go deeper into that...

 

 
Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.