MapInfo Pro

Expand all | Collapse all

Mapinfo to WKT

  • 1.  Mapinfo to WKT

    Posted 02-01-2019 04:40
    Edited by Krishna Bejawada 02-01-2019 05:13
    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 02-01-2019 09:19
    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 02-01-2019 09:40
    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 02-04-2019 11:56
    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​

    Andrew Harfoot
    University of Southampton