MapInfo Pro

 View Only

MapInfo Monday: GeoJSON Export via OGR Vector Files

  • 1.  MapInfo Monday: GeoJSON Export via OGR Vector Files

    Employee
    Posted 07-03-2023 03:55

    Happy #MapInfoMonday!

    A few years ago, I discussed exporting to GeoJSON using the Pything Quick Start add-in. With MapInfo Pro v2021, we extended our support for GeoJSON making it more accessible.

    You can now open GeoJSON files in MapInfo Pro and export tables to GeoJSON files from within MapInfo Pro using the OGR Vector Files support. In this article, I will focus on the export process.

    Export to GeoJSON File

    With the table, you want to export open, select Export from the Table tab.

    You will first have to select the table(s) to export. You can choose one or more tables from the Export Table dialog.

    You can also select the table or tables from the Table List that you want to export, and then right-click and choose Export... from the Table Context menu. This will take you directly to the Export Table(s) to File(s) dialog as you already have selected the table(s) you want to export.

    In the Export Table(s) to FIle(s) dialog, you can now specify where you want to save the exported file and what format, you want to export the files into.

    If you selected multiple tables, you can control the output path and the names of the files as you see below. You can use the Name Pattern field to control the name of the output files by merging the input file name with additional fixed strings.
    After selecting the input files and specifying GeoJSON as the output format, you will be presented with the GeoJSON Export Options dialog. These options can be used to control the resulting GeoJSON file.
    If you click the Help button, you will be sent to the GeoJSON GDAL Documentation page where you can read more about the options.
    When you click the OK button in the final dialog, the selected tables will get exported to GeoJSON files in the specified folder. The export runs in the background and can be seen in the Tasks Window allowing you to continue to use MapInfo Pro while the export process is ongoing. 
    When the export process has finished, you can click on the process in the Tasks Window and get access to additional capabilities around the exported file. This can as an example open up Windows Explorer showing you the exported file.

    In an upcoming #MapInfoMonday article, I will cover opening GeoJSON files. I will discuss opening local files as well as accessing GeoJSON via an URL Stay tuned.



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------