MapInfo Pro

Expand all | Collapse all

Mapinfo to WKT

  • 1.  Mapinfo to WKT

    Posted 19 days ago
    Edited by Krishna Bejawada 19 days ago
    Can we convert Tab fil (line, Polyline, Polygon ) to WKT file using MapInfo?

    ------------------------------
    Krishna Bejawada
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------


  • 2.  RE: Mapinfo to WKT

    Posted 19 days ago
    Hi Krishna.

    There is an online tool that can do this but it has some limitations with regards to the file size etc.

    You can do this in a data flow in Spectrum via Enterprise Designer.

    You can create a custom MapBasic application that will output the Object as a WKT string. Ther eis a tool here, but he goes from WKT to MapInfo objects: WKT2MapInfo.

    The MapInfo Data Access Library that ships with MapInfo Pro 17.0 can also help you convert to WKT. This is again mostly for developers as it's a .NET SDK.

    If you have you data in for example a SQL Server database, you can create a query that converts the spatial record to WKT using the STAsText() method.

    ------------------------------
    Peter Horsbøll Møller
    Pitney Bowes
    ------------------------------



  • 3.  RE: Mapinfo to WKT

    Posted 19 days ago
    Hi Peter,

    Thanks for the response. I have checked the online conversation and it is not helpful for handling the Big data sets.

    I have used  "ToWKT " function in Spatial calculator but to do that either I should use Named Resource or KML as input.
    Pushing data to DB and perform  STAsText() would not be a choice at the moment. Looks like the scope is cornered to write an MB code or the SDK thing.

    But thanks for the suggestions, I will continue the R&D.

    Great Weekend!

    - Krishna

    ------------------------------
    Krishna Bejawada
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------



  • 4.  RE: Mapinfo to WKT

    Posted 16 days ago
    Hi Krishna,

    The open source GDAL toolkit can do this, specifically you would use the ogr2ogr command to translate the TAB file into a CSV file, encoding the geometry as WKT. The command line would be something like:

    ogr2ogr -f "CSV" -lco GEOMETRY=WKT MyWKT.csv MyTabFile.tab​


    ------------------------------
    Andrew Harfoot
    GeoData
    University of Southampton
    ------------------------------