MapInfo Pro

Expand all | Collapse all

MapInfo Pro with PostGIS via Universal Data

  • 1.  MapInfo Pro with PostGIS via Universal Data

    Posted 07-22-2019 21:37
    Has anyone had any success connecting to a PostGIS database?

    We have created one in our team which we can successfully use with QGIS and Tableau, but when ever I try to connect to it from MapInfo Pro (17.0.3) using Open Universal Data, MapInfo crashes (vanishes) just after it's finished creating the objects.

    Kalu

    ------------------------------
    Kalu Ribush
    Senior Mapping Specialist
    Department of Economic Development, Jobs, Transport and Resources (DEDJTR)
    Melbourne NT
    ------------------------------


  • 2.  RE: MapInfo Pro with PostGIS via Universal Data

    Pitney Bowes
    Posted 07-23-2019 08:31
    Hi Kalu:
    Curious why you are using Open Universal Data to connect to PostGIS?
    MIPro can connect to PostGIS directly as an RDBMS.
    Were you having issues using PostGIS directly from MIPro?

    ------------------------------
    Bill Wemple
    Principal QA Engineer
    Pitney Bowes
    Troy, NY
    ------------------------------



  • 3.  RE: MapInfo Pro with PostGIS via Universal Data

    Pitney Bowes
    Posted 07-23-2019 18:56
    Hi @Kalu Ribush

    Yes the PB Software Support team has successfully setup systems previously (using RDBMS as per comment from Bill), we can assist with any problems you are encountering.

    Thanks,
    Ashley​

    ------------------------------
    Ashley Crane
    Regional Director, Software Support
    Pitney Bowes
    ------------------------------



  • 4.  RE: MapInfo Pro with PostGIS via Universal Data

    Posted 07-23-2019 20:29
      |   view attached
    Hi Bill, Ashley

    Until this week I hadn't tried opening a PostGIS data source before.

    Some analysts in our department have recently set up a PostGIS database to store spatial data to publish to Tableau.  For various reasons PostGIS works best for them. I thought I'd try connecting to the database from MapInfo, because I'm likely to be asked to create some cartographic product of some of the Tableau maps they have created.

    Initially I tried connecting using Open Universal Data, but after numerous attempts it crashed MapInfo.

    I have just tried connecting via Open DBMS Table - using the steps in the attached document. I can see the tables in the database, but after attempting to open them, I either get only the non-spatial browser data or I get an error messages such as shown below:

    Is this because the data in the PostGIS database was loaded from QGIS and not MapInfo Pro? Does MapInfo Pro only support data loaded into the database by Easy Loader?

    I'd also be keen to hear if you can open data from a PostGIS Database using Open Universal Data, without it crashing. If it does, then this should be reported as a bug.

    Regards



    ------------------------------
    Kalu Ribush
    Senior Mapping Specialist
    Department of Economic Development, Jobs, Transport and Resources (DEDJTR)
    Melbourne NT
    ------------------------------



  • 5.  RE: MapInfo Pro with PostGIS via Universal Data

    Pitney Bowes
    Posted 30 days ago
    Hi Kalu,

    Good questions. Short answer: Yes these errors are likely due to data being loaded by another GIS, yes MapInfo Pro can read data from another package if it is loaded/registered in a certain manner.

    Longer answer: MapInfo Pro (& some other PB products) require a table called "MapInfo_MapCatalog" to be present, this contains metadata about spatial tables/views and is used by MapInfo Pro to know how to download from PostGIS (or any RDBMS). The MapCatalog can be created by:
    1. Easyloader Utility (EasyLoader will automatically create MapCatalog during table upload if it doesn't exist)
    2. MBX (there is a Catalog tool available)
    3. Manually (we provide a description of the table definition in the User Guide - I can share a link if you'd like). It's also possible to manually populate this so if data is uploaded by another application you can manually (or programmatically) enter the appropriate information

    There a full description of the MapCatalog in the section "Creating a Map Catalog in the DBMS" MapInfo Pro v17.02 User Guide .If the table you are trying to open was loaded from another GIS then the MapCatalog wouldn't exist (or be populated). This would likely be the cause the types of errors you have encountered. I had a quick look through the steps in the Word doc, these are broadly the correct process to connect.

    A quick way to test the connection you have setup to the RDBMS:
    1. Grab any TAB file you have lying around, use EasyLoader + the same RDBMS connection to upload to PostGIS
    2. Close MapInfo Pro, reopen MapInfo Pro
    3. Open RDBMS & open from PostGIS as either linked (download) or live TAB file

    If #3 executes correctly we know the connection is working fine (also you have the benefit of automatically creating a MapCatalog during Step #1).

    Two other quick observations from a Tech Support perspective on working with PostGIS:
    • Make sure you have the PostGIS spatial extension installed with PostGRES SQL
    • There can be performance issues with large PostGIS tables (& associated memory usage in MapInfo Pro), there are ways to optimise performance based on setup of the RDBMS driver, there's a helpful section on this in the User Guide (happy to share a link if you are interested)

    When up & running it is a powerful solution, we definitely have Users actively working with this who reap the benefits.

    Look forward to your update on the issues you've run into.

    Thanks, Ashley

    ------------------------------
    Ashley Crane
    Regional Director, Software Support
    Pitney Bowes
    ------------------------------



  • 6.  RE: MapInfo Pro with PostGIS via Universal Data

    Posted 30 days ago
    Hi Ashley

    Thanks for your explanation.

    I installed Easyloader and successfully uploaded a TAB file into PostGIS, then was able to open it in MapInfo Pro.

    It sounds like it will be complex for me to directly read the PostGIS tables which were created in QGIS for Tableau.  It will probably be less effort for me to try and convert these by a different method, rather than read them directly, and have to manually maintain a MapCatalog in PostGIS.

    Regards
    Kalu

    ------------------------------
    Kalu Ribush
    Senior Mapping Specialist
    Department of Economic Development, Jobs, Transport and Resources (DEDJTR)
    Melbourne NT
    ------------------------------



  • 7.  RE: MapInfo Pro with PostGIS via Universal Data

    Pitney Bowes
    Posted 30 days ago
    Hi Kalu.
    I did manage to open a PostGIS table via Open Universal Data in MIPro.
    First I had to Extend FME using the FME Integration console to be able to access all formats in MIPro.
    FME has a PostGIS and PostgeSQL format listed.  Need to use the PostGIS format
    Then in Specify Data source dialog had to Add a Database Connection and set up the parameters pretty much exactly as would be done in MIPro and test the connection to make sure it worked.
    Then back in the Specify Data source dialog, I had to set up the schema I wanted to use, table list of what table(s) I wanted to download and hit OK
    Brings you to Select Layers dialog to setup how you want layers to appear (styles, colors), paths to tables, etc.
    Hit OK and It prompts for Coordsys and then downloads table, after you select correct coordsys, and hit OK.

    I did find an pretty serious crash issue, and I am going to file an issue and contact SAFE about it, where if I select more than one table from the PostGIS DB to download, MIPro begins to download table(s) then promptly exits without error, no crash dump file, nothing...
    If I just download one table at a time it appears to work fine.  Don't know if crash is from FME and just percolates to MIPro exe and brings the house down or if its an MIPro issue.  I think few, if any, have tried using Open Universal Data within MIPro to download PostGIS data when MIPro can open these tables directly.

    Cheers,

    ------------------------------
    Bill Wemple
    Principal QA Engineer
    Pitney Bowes
    Troy, NY
    ------------------------------



  • 8.  RE: MapInfo Pro with PostGIS via Universal Data

    Posted 30 days ago
    Hi Bill,
    I attempted to connect to the PostGIS database about half a dozen times using Open Universal Data. I followed the same steps as you outlined above.  In all cases was able to connect to the database and MapInfo started importing the data.  MapInfo crashed (vanished from the screen) without warning in all cases, but at different various stages.  In some cases it crashed just around the time it finished importing, in one case the table opened in a browser window, but as soon as I tried to interact with it, MapInfo crashed.  In another case a table opened briefly in a map window (I could see the points correctly mapped), but as soon as I tried to interact with MapInfo, it crashed.
    As you know I have tried opening data using a few different formats available through Open Universal Data, but have run into various issues.  When opening GDB or SDE I still find the attribute data gets scrambled.
    Regards, Kalu

    ------------------------------
    Kalu Ribush
    Senior Mapping Specialist
    Department of Economic Development, Jobs, Transport and Resources (DEDJTR)
    Melbourne NT
    ------------------------------



  • 9.  RE: MapInfo Pro with PostGIS via Universal Data

    Posted 25 days ago
    Hi Kalu,

    We use PostGIS and MapInfo quite a lot and I find it works as well or better then MS SQL/Oracle. As others have said before me the easiest way to do this is to use EasyLoader as this will create the MapInfo primary key (MI_PRINX) and set up the MapCatalog for you.

    However now that you have created a MapCatalog in your database you can use TABLE>Maintenance>Make DBMS Table Mappable option in MI Pro to create a MapCatalog record for any table that exists in the database. If the table contains a valid geometry it will then display as a spatial layer in MapInfo.

    One thing that is a bit confusing is that if your table doesn't have a MI_PRINX you will not be able to open it in Live mode and it will be read-only in Linked mode.

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------