Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Tables without a geometry type constraint will allow users to insert any geometry type into the table which may not be desirable. Clients such as QGIS and iShare GIS enforce a single geometry type per layer while MapInfo does not. To avoid this a geometry type constraint can be added to the table.
  • Default geometry type constraints such as those added by ogr2ogr when data is loaded via a Spatial Data Transformation Workflow Task may be too restrictive for MapInfo. If a table is loaded as MULTIPOLYGON but contains a mix of POLYGON and MULTIPOLYGON features (as is quite common) saving an edit to a polygon in MapInfo will fail as the update statement issued by MapInfo Professional will attempt to insert a POLYGON which will fail the constraints check. This can be overcome by dropping the MULTIPOLYGON constraint and replacing it with a check for MULTIPOLYGON or POLYGON

    Code Block
    languagesql
    titleDrop existing constraint and add new inclusive geometry type check
    ALTER TABLE countryside.tpo DROP CONSTRAINT enforce_geotype_wkb_geometry;
     
    ALTER TABLE countryside.tpo ADD CONSTRAINT enforce_geotype_wkb_geometry CHECK (geometrytype(wkb_geometry) = 'POLYGON'::text OR geometrytype(wkb_geometry) = 'MULTIPOLYGON'::text OR wkb_geometry IS NULL);


  • MapInfo Professional has a hard limit to the total number of characters defined across all character fields in a table. If the value of adding the size of all character fields combined is greater than 4049 (discussion on MapInfo mailing list)

    Note

    As the Postgres SDW database is commonly Unicode which is not fully supported by MapInfo Professional, character fields over 127 characters long (half of 254) are not currently editable.