Sie sind auf Seite 1von 4

Voronoi in MapInfo

The Voronoi diagram is the nearest-neighbour map for a set of points. Each region contains those points that are nearer one input site than any other input site. I have used Vornoi regions as to assign points in one layer to points in another layer; and also to transfer information from points in one layer to points in another layer. For example, in the map below, the green points are the address points, the red points are the retail centres. Im going to use it to calculate which retail centre each LLPG address pointis closest to and then to copy the retail centre name to each address point in its region:-\

Creating Voronoi regions


1. Using the menu, select Table, Voronoi 2. Table Voronoi dialogue box, from I have selected Town_Centre_Points in Perform Voronoi Using Objects From. I have selected New in Store Objects In Table 3. In the New Table dialogue box, choose what view to use for the new table and whether to base its structure on an existing table. I have selected Add To Current Mapper and to use Town Centre Points as the Table Structure. Press OK when finished. 4. The Table Structure dialogue box appears. You can make any desired changes to the table structure. Press Create when finished. 5. In the Create New Table box, select the file name and location for the new table that will contain the Voronoi regions. 6. The Voronoi regions have now been created around the points. They contain the same information as the Retail Centre points that were used to create them:-

The Voronoi regions can be manually resized to cover the extremities of the borough

Voronoi regions are regular MapInfo region tables once they are created:

Their appearance may be changed using the Region Style feature. Their structure can be changed using Table, Maintenance, Modify Table Structure They can be saved using the Save Table command to be re-used in future Workspaces.

Using the Voronoi Regions to Update Other Points


Now I can use a spatial join to update the Address Points with the name of their nearest centre. Firstly, I need to add a field called Nearest Centre to the Address Points table. It is vital that this is the same format of the corresponding field in the Retail Centres table (e.g. 50 characters) or

the Table Update command will fail. You can check the structure of other tables by following the first two steps of the following points:-

To add this field:1. From the menu, select Table, Maintenance, Modify Table Structure. 2. In the modify Table Structure box, press the Add Field button. 3. Enter the field name (e.g. Nearest_centre) and select the type (e.g. 50 characters). Note that spaces are not permitted in field names. 4. Press OK when complete 5. The Address Point layer will disappear from the map. Press the Add Layer (green + ) in the Layer Panel to add it. 6. Use the menu to select Table, Update Column 7. In the Update Column box, select:1. Table to Update (Address Point) 2. Column to Update (Nearest_centre). 3. Get Value From (Retail Centre Voronoi) 4. Calculate Value 5. Of Feature Name 8. As the data is coming from another table, the join must be specified. Press the Join button and select Where object from Retail centre Voronoi is Within object contains object from Address Points. 9. Press Ok. The column update results will be displayed:

The Specify Join button can be used to specify either attribute or spatial joins.

An attribute join is based on the data in one row matching the data in another. For example Where the post code in the address layer matching the postcode in a table of geo-coding information. A spatial join is based on the spatial relationship between the two layers:A point layer is Within a region layer A region layer Contains a point layer A polyine layer or another region layer Intersects another polyline or region layer.

Das könnte Ihnen auch gefallen