/MapInfo-to-QGIS-style-generator

Generates a QGIS qml file containing the closest match for a MapInfo style.

Primary LanguagePython

 Generates a QGIS qml file containing the closest match for a MapInfo style.

    - Can generate a QGIS Categorized Symbols qml from a list of values and MapInfo Font or MapInfo 3.0 symbols
        Example in mapinfo.txt:
            Non Return Valve| Symbol (101,10502399,9,"MapInfo Cartographic",1,0)
            Actuated Valve| Symbol (101,53456,9,"MapInfo Cartographic",1,0)
            Scour Valve| Symbol (101,16711680,9,"MapInfo Cartographic",0,0)
            Air Valve| Symbol (101,16754768,9,"MapInfo Cartographic",1,0)
        Must be delimited using |
        Supported formats:
            {value} | {label} | {font style}
        or
            {value} | {font style}
    - Using the --UseMapInfo flag MapInfo will be invoked to generate the above text file
      and QML file for you.
    - Does not support custom bmp MapInfo symbols. QGIS uses svg rather the bitmap.
    - WARNING. Little to no error handling at the current time.
    - NOTE: Only symbols are currently supported.  Lines and Regions will be added later.

Usage (WARNING! MAY CHANGE):
    Usage: mapinfoToQgis.py  inputFile outQmlFile [options]

    inputFile must contain a list of values and styles in the following format
    Supported formats:
        {value} | {label} | {font style}
    or
        {value} | {font style}

    inputFile can also be a path to a MapInfo TAB file if you are using the --UseMapInfo switch.
    Options:
      -h, --help            show this help message and exit
      -c COLUMNNAME, --column=COLUMNNAME
                            Name of the column the values are in
      -m, --UseMapInfo
                            If used MapInfo will be invoked to handle to needed query for
                            the correct input.  inputFile must be the path a MapInfo table.
                            Column name must be supplied using -c
                            Only point object tables are currently supported.
                            MapInfo must be installed.

Step by step:
    1. Download latest package from https://github.com/NathanW2/MapInfo-to-QGIS-style-generator
    2. Extact zip
    3. Open OsGeo4W shell (Found under Start->OsGeo4w->OsGeo4W)
    4. Run the following commands in OsGeo4W shell
        cd {folder of extracted zip}
        python mapinfoToQgis.py --help
    5. Follow help commands
    6. Open MapInfo layer in QGIS.
    7. Open layer properties via double click or right click -> properties.
    8. Select Load Style
    9. Load the qml you supplied to mapinfoToQgis.py
    10. Enjoy