MapInfo Pro

 View Only

How to Register a COG GeoTiff with a mapbasic command

  • 1.  How to Register a COG GeoTiff with a mapbasic command

    Posted an hour ago

    Hello all,

    I have a large number of COG GeoTiff files stored on my file server.

    I want to write a mapbasic script that loops through all geotiffs in one folder and builds tab files for them, so that other MapInfo users can open them.

    I only have the GeoTiff, there is no associated TFW file

    What is the mapbasic command to Register a COG GeoTiff that reads the coordinate information from the header of the GeoTiff?

    I succeed in manually opening the GeoTiff with the Open Table command. I am prompted to choose a Coordinate System, but MapInfo then reads the relevant coordinate information itself, and builds the .tab file successfully.

    But when I use the mapbasic command Register Table, it does not read the coordinate information and thus builds a bad .tab file. In this bad .tab file all the real-world coordinates are (0,0)

    What mapbasic command can I use to duplicate the "Open Table" functionality?



    ------------------------------
    Nick Lawrence
    Senior Spatial Science Officer
    Department of Transport and Main Roads (QLD)
    Brisbane QLD
    ------------------------------