Pitney Bowes
MapInfo Pro™ Monthly Journal
Something a bit more advanced... Clearing Map objects without deleting the whole record

adv A very useful map editing function is the Clear Map Objects Only menu command. For example, there may be instances where we need to re-geocode a set of data. Perhaps the addresses have been improved or updated. The Table > Geocode command in MapInfo Professional does not have an option to overwrite the existing points when geocoding the table again. Therefore, before re-geocoding the table, it is necessary to get rid of the existing points.

Clear Map Objects Only is a menu command that deletes the map objects without deleting the attribute data.

The command can be found in the Edit menu.

clear
Figure 1: Edit -> Clear Map Objects Only.

Using the Clear Map Objects Only menu command

This command is fairly straightforward to use. The requirements are

(1) The layer for which you wish to clear map objects must be editable.
(2) You must select the objects you want clear. (You can select the entire table.)
(3) Click on Edit > Clear Map Objects Only.

What if I make a mistake? Edit > Undo and File > Revert table

When you take the steps above, there is no warning. The map objects will be deleted.

If you have made an error and you notice right away you can try using the Edit > Undo command. The Undo command can only undo the single most recent action, also, it is limited in the scope (or size) of what has to be undone. If you deleted a large number of objects the command may not be available. Furthermore, a preference can be found in the System Preferences dialog box (Options > Preferences menu command) that permits you to control the overall number of objects and maximum memory to reserve for executing an "Undo".

If Undo is not available to you then you can use the File > Revert Table menu command. This restores the table back to its last saved version. This would mean losing multiple changes you have made to the table.

Another way to delete all of the Map Objects in a table

The technique described above can be used on a selection of a few rows or a selection of the entire table. An alternative to getting rid of all of the map objects for an entire table is to use the Table Structure menu command.

modify

To get rid of all of the map objects in the table uncheck Table is Mappable. This operation is permanent and cannot be undone in any way, once you click OK. You will get this warning before the operation proceeds.

delete

"Behind the scenes, this making the table "unmappable" eliminates the files that contain the Map Objects. Merely deleting the objects is slightly different. The table can continue to hold map objects, it is just there are no objects in the table.

And one final note about Creating Points...

If you use the Table > Create Points capability, you do not need to use the techniques in this article to re-do a create points operation. Within the Create Points dialog box there is an option to overwrite existing points. You would need the techniques in this article if you are going to re-geocode a table.

Article by Piyush Trika, Data Dev, Noida

When not writing articles for the MapInfo Professional journal, Piyush loves to explore ways to innovate with diverse geospatial data and its utilization, read lifestyle and health articles/magazines and enjoys cooking.