Hi Anthony
Your script basically runs these three statements on each table:
Alter table tabName ( modify code Char(10), areaname Char(100), type Char(3) )
Objects Clean From Selection Overlap
Create Index On tabName (code)
1. It changes the width of these three columns: code, areaname, and type.
2. It runs Objects Clean to fix potential spatial data issues, see more details on the process:
Objects Clean statement (from the MapBasic Help)
The objects in the input tablename are first checked for various data problems and inconsistencies, such as self-intersections, overlaps, and gaps. Self-intersecting regions in the form of a figure 8 will be changed into a region containing two polygons that touch each other at a single point. Regions containing spikes will have the spike portion removed. The resulting cleaned object will replace the original input object.
If the Overlap keyword is included, then overlapping areas will be removed from regions. The portion of the overlap will be removed from all overlapping regions except the one with the largest area.
Note: Objects Clean removes the overlap when one object is completely inside another. This is an exception to the rule of "biggest object wins". If one object is completely inside another object, then the object that is inside remains, and a hole is punched in the containing object. The result does not contain any overlaps.
Gaps are enclosed areas where no region object currently exists. In a boundary table, most regions abut other regions and share a common boundary. Just as there should be no overlaps between the regions, there should also be no gaps between the regions. In some cases, both these boundary gaps and holes are legitimate for the data. An example of this would be the Great Lakes in the World map, which separate parts of Canada from the USA. Most gaps that are data problems occur because adjacent boundaries do not have common boundaries that completely align. These gap areas are generally small.
3. It creates an index on the column code.
The script doesn't log much details, and the log that it creates is just printed to the Message window inside MapInfo Pro and so lost when you shut down MapInfo Pro.
If you already do your topological checks in PostGIS, it could seem that this is doing the same. Do you know why this process was put in place?
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------