You are on page 1of 10

Selecting Points from a Voronoi

Summary: Using Voronoi objects to create a region table based on zip-code boundaries that are closest to a specific set of points Question: using a point table of service locations, is it possible to create a region map based on the zip-codes that are closest to these points? Answer: This can be accomplished by using the Create Voronoi function. Step 1: Open the point layer.

Step 2: Open the Zip-code boundary layer.

Selecting Points from a Voronoi


Step 3: Choose Map > Layer Control and make the zip-code layer invisvle:

Step 4: Make your point layer editable and add 4 points that would fall outside the edge of the US. You need to do this so the Voronoi polygons reach all the zip-codes in the US.

Step 5: Make the cosmetic layer editable and then select all the points in the point layer using the marquee select tool Step 6: Choose the Object Menu and Select Voronoi

Selecting Points from a Voronoi

The result will be displayed as below:

Step 7: Choose Map > Save Cosmetic Objects, leave the drop down menu on <new> and click save.

Save this layer as a table:

Selecting Points from a Voronoi

Step 8: Choose Query > SQL Select. Set up the dialog as shown below:

Make sure the Voronoi Table is first in the From Tables list and use Contains Function. This will extract all the data fr om the points and add it to the Voronoi polygons. Click OK and a browser will pop up that shows the information in the query.

Selecting Points from a Voronoi


Close this when finished. Step 9: Choose File > Save Query to save the query as a table. Step 10: Choose File > Close Table and Close the Query.

Step 11: Choose File > Open and Open the table just saved

There is now a polygon for each point. It is now necessary to create a table of zip-code objects that will contain the Region ID that is attributed to each voronoi polygon. Use the SQL Query function for this. Step 12: Choose Query > SQL Select Set it up like the dialogue below.

Selecting Points from a Voronoi

Notice how the Zip-code table is first. This is because it is necessary to have a table of zip-code polygons in the resulting query. After clicking OK, a browser for the query will be displayed. Notice how the market code from the Voronoi object that was closest to each point in the original table is now displayed.

Step 13: Choose File > Save Copy As. Save the new query as a table. Then, click File > Close Table to close the query. Go back to the File Menu and Choose Open, and open the table that was just saved.

Selecting Points from a Voronoi

Step 14: Choose Table > Combine Objects Using Column.

Set up the following dialog as shown below:

Selecting Points from a Voronoi


Click Create

Add and remove any fields that will appear in the final table here. When done, click Create.

Then, give it a name and click Save.

Selecting Points from a Voronoi


Pay attention to the next dialog. If the Market Code Column was a numeric, then change its data aggregation setting to Value.

The final result will be shown similar to below:

A table of region objects, created from zipcodes that were closest to the points in the original table.

Selecting Points from a Voronoi

You might also like