Map Room Home page  
written by Nigel James
 
Contents
 
   
MAPINFO How to...  
No. 4: Create custom boundary areas  
(References to tables, folders etc., are not applicable outside the Map Room, so if you are located elsewhere, you should substitute your own)  
   

This explains how to use MapInfo to create custom boundary areas (such as new regions). These could be special administrative areas which cannot be created by combining existing areas, or sub-divisions of existing areas. These new regions can be named and used to create thematic maps. How to No.1 should be used for step-by-step instructions on creating maps and layouts.

This simple example creates a new country within Sudan.

 
   

1. Open the politic3 table in the Global Insight folder on drive D, then zoom in on Sudan so that it fills most of the mapper window.

2. Open the Layer Control and make the cosmetic layer editable. Click OK to close the dialog.

3. Press S on the keyboard to activate snap. This useful feature 'snaps' the nodes of a line you are drawing to existing nodes in another object, to make exact matches easier and quicker.

4. Click the polygon drawing tool on the Drawing toolbox.

5. Move the cursor to the point where the borders of Sudan, Chad and Libya meet. You will see the cursor change to a large cross, which indicates that the point will snap to the node on the world table at that position.

6. The new country will have the existing boundary between Sudan and Chad and a new boundary within Chad itself.

7. You can now start to draw the new country, but there is one more feature which you can use to make things easier, and that is autotrace.

8. Autotrace will as it suggests, automatically trace an existing line. This will save a lot of work when copying the existing border.

9. Now you can start to draw the new country. Using the polygon tool, click once at the point where the borders of Sudan, Chad and Libya meet. Then hold down the shift key and move the cursor to the next border junction to the south, where Sudan, Chad and the Central African Republic meet. As you move to this point, you will see the line highlighted, which indicates that it has been autotraced. Click once to complete the first section of the polygon. Now move across into Sudan and draw a multiple section border to take in about one third of the country, clicking once each time you wish to change direction. Finish the shape by clicking on the first point.

10. You will now have a new country sitting within Sudan and using the existing border between Sudan and Chad.

11. You can save this new country by opening the Map menu and selecting Save cosmetic objects. The Transfer cosmetic objects to layer list will say <new>, indicating that it will save to a new layer. Click the Save... button and save the layer in your user folder.

12. To add attribute data to your new country, such as a name you will have to add fields to the table. To do this, open the Table menu and select Maintenance, then Table Structure. Highlight the name of your new country and click OK.

13. You will that a field called ID has been created. This identifies your object with an integer number, but it should have a name, so click the New Field button, then in the Field Information boxes enter Country_name as name (note the underscore - no spaces are allowed, and do not start a field name with a number or non-alphabetic character) and select Character as type. Character fields must have the size stated, so make this large enough for the longest name. For this example the country will be called West Sudan, so make the field at least 10 characters.

14. Click OK to confirm the changes. To add the name to the table, open the new table in a browser, then click in the Country_name field and enter the name. Click another table cell to confirm the entry then save the table. You can now label your new country using the label tool or by clicking the autolabel checkbox in the layer control.

15. You can add further fields if you wish, for any other attribute data you need to add.

16. Although you now have a new country, the old Sudan still exists in its entirety, but really it should now be smaller as it has lost the area of the new country. To modify this, you must save a copy of Sudan to you user folder, because it has to be edited. Click Sudan in the maper window to select it, then open the File name and click Save Copy As. Save the selection to your folder.

17. Now open the saved Sudan (and close the politic3 table for the moment to make it easier to see what you are doing). Make sure that West Sudan is still on top.

18. You now need to erase that part of Sudan which is under West Sudan. To do this, open the Layer control and make the Sudan layer editable. Click OK. Now click Sudan again to select it.

19. Open the Objects menu and click Set Target. A diamond pattern will appear on Sudan. Now click once on West Sudan, then open the Objects menu again and click Erase.

20. You will see the Data Disaggregation dialog. Leave value selected for now and click OK. This will reduce the data values where appropriate. That part of Sudan which is now West Sudan has been erased.

21. Save Sudan again. Rather than saving the new West Sudan as a new table, you could have added it to an existing table, in which case it will acquire the existing fields and you do not need to add them. The existing table should be a copy in your own folder.

NB: Remember that you are permanently changing objects, so you must work on editable copies, and always save any original data to a separate table first, just in case!

 
   
This is a brief and specific guide to this topic, for more general information, see: MapInfo - an easy guide for new users  
Nigel James
Bodleian Library 2000
 
Bodleian Library Map Room