Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Master
    Join Date
    Feb 2011
    Location
    Sofia
    Age
    31
    Posts
    919
    Rep Power
    213

    Post mp2shp a tool for converting Polish .mp into Garmin .shp

    mp2shp

    DESCRIPTION:

    A script for converting maps in Polish (.mp) format into ESRI .shp .shx .dbf suitable for Garmin Mapsource Product Creator.

    AUTHOR: vasyusya

    FEATURES:

    What it does and what does not
    -- reads lines, poins and areas from 0 level of .mp
    -- transforms types of features to GRMN_TYPE text constants according to the external _type table. Currently, the table contains basic mapping from Navitel typeset
    -- for areas uses only Label and Data0, dumps them to areas.shp
    -- for lines which are not roads (based on GRMN_TYPE) does the same
    -- for roads
    -- splits a polyline into links at each routing node and nodes with defined z-level
    -- recalculates routing restrictions
    -- takes name from Label or SreetDescr
    -- takes region from RegionIdx or from RegionName
    -- takes country from CountryIdx or from CountryName
    -- reads RoutingParam (speed_fmt is 1, i.e.km/h, change in the preamble)
    -- reads Numbers field (street numbering) and add numbering info
    -- converts prefixes and suffixes in name
    -- dumps this to roads.shp
    -- for poi which are not addressable dumps Label and Data0 to points.shp
    -- for addressable poi also adds contact info as in roads
    -- all other info is (in the current version) skipped
    -- for polygons of addressable types (listed in config) optionally creates address and arrive points with appropriate info
    -- road sign info is added.

    LIMITATIONS:

    Due to the difference in data structures, the script can fail with poorly prepared of too sophisticated Polish input.
    In particular, each road is splitted in routing nodes and nodes with defined z-levels. If the road contains street numbering, these split nodes need to have first/last numbers set, because no interpolation is done.
    Always check last lines of output and _logfile.txt

    INSTALL:

    See INSTALL for Linux or README.WINDOWS (in Russian) for Windows

    USAGE:

    Review and edit _types. You should know how types are mapped. The supplied file contains basic mapping from Navitel typeset which I used for testing.
    Also supplied is _types.garmin by hiderMD (hider@skynet.md). You can rename it to _types and use instead.

    Put all files in the same directory and run

    ./_mp2shp1.pl flie.mp

    As a result you should obtain files areas.* lines.* poi.* points.* roads.*

    If the last line of output was anything else then "Done", the shapes are most likely broken
    Always check the last line of the output and the content of _logfile.txt

    TYPES MAPPING:

    You can edit the _types file to change types transformation from
    mp to Garmin types. Format is
    <mp_type><TAB><shapetype><TAB><garmin_type>

    Here

    mp_type is input type as used in .mp file

    shapetype is 1 for poi, 3 for polylines, 5 for polygons

    garmin_type is a text constant as defined in manual for MPC,
    if empty, the script will complain or die
    if NONE the object is silently skipped

    To get the list of types which are missing, type

    ./_checktypes.pl file.mp

    and look at _missing.txt

    TROUBLESHOOTING:

    If the script dies, the known reasons are:

    Necessary libraries are not installed properly. Read INSTALL

    Your .mp file contains areas or lines of types not described in _types. Edit _types. Notice that the delimiters are tabs, not spaces.

    Broken system, input file or bug in the script (report if so)

    To see the content of the resulting shapes you can use

    ./_dumpshp

    Edit the last lines of the script to uncomment what you want to dump.

    DOWNLOAD LINK:

    [Only registered and activated users can see links. ]

    Haven't tried myself this tool but don't think there is problem with it.

  2.    Advertissements


  3. #2
    Navigation software expert

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

    Default

    This tool by vasyusya is the best now and it works great!
    I want to remind that in set of the script an executable file (_mp2shp1.exe) for Windows is included, if you don’t want to install Perl.
    The current version of mp2shp is [Only registered and activated users can see links. ]!

    Note:
    The executable file (_mp2shp1.exe) runs from the command line!
    Put the (_mp2shp1.exe, _config, _types, filename.mp) files in a separate folder and run: ‘_mp2shp1.exe filename.mp
    Last edited by Cnfhbr; 29th July 2011 at 19:01.

  4. #3
    Junior Member
    Join Date
    Jul 2010
    Location
    SG
    Posts
    1
    Rep Power
    0

    Default

    What a great converter, thanks vasyusya!

    BTW, anyone able to install Shapelib in Perl on Windows Vista?

  5. #4
    Junior Member
    Join Date
    Mar 2011
    Location
    warsaw
    Age
    39
    Posts
    1
    Rep Power
    0

    Default

    yes, it works fine on my windows vista

  6. #5
    Junior Member
    Join Date
    Aug 2011
    Location
    Portugal
    Age
    41
    Posts
    1
    Rep Power
    0

    Default

    Great tool
    works fine
    thx

  7. #6
    Junior Member
    Join Date
    Jan 2011
    Location
    ankara
    Age
    45
    Posts
    1
    Rep Power
    0

    Default

    Cnfhbr, do you know by chance how can I add label2 or label3 attribute for roads? seems like this converter completely ignores any other fields than the ones preset in there...

  8. #7
    Navigation software expert

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

    Default

    Quote Originally Posted by james cook View Post
    seems like this converter completely ignores any other fields than the ones preset in there...
    In my view the script ignores these fields intentionally, as useless for the MPC.

    Which specifically attributes of Garmin Shapefiles, in your opinion, should correspond to these Polish attributes (Label2 and Label3) when you convert?

  9. #8
    Junior Member
    Join Date
    Nov 2011
    Location
    Ukraine
    Posts
    1
    Rep Power
    0

    Default

    Quote Originally Posted by ddabcd277 View Post

    DOWNLOAD LINK:

    [Only registered and activated users can see links. ]
    Download link not working

  10. #9
    Navigation software expert

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

    Default

    @carpaty

    [Only registered and activated users can see links. ]

  11. #10
    Junior Member
    Join Date
    May 2010
    Location
    Trinidad &Tobago
    Posts
    2
    Rep Power
    0

    Default

    Anybody has a contact email for the author of mp2shp. I urgently required his services with regards to this program....




    carpaty can you PM me again. My popup blocker in explorer prevented me from seeing
    yor reply...




    Cnfhbr I got to see your message, but I cannot post a reply. PM me your email address or some form of contact, so that I can indicate the urgency of my request...

 

 
Page 1 of 2 12 LastLast

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.