MapInfo Products KnowledgeBase
Product:
MapInfo Professional
Version:
8.0, 7.8, 7.5 b21, 7.5 b22, 7.5 b23, 7.5 b24, 7.0 b22, 7.0 b26, 7.0 b27
Platform:
All Windows Platforms
Category:
Object Manipulation
Summary:
Get points that are within a donut.
Question:
How to create rings around site locations and get back the points that are within x to y distance.
Answer:
1.
Open the table of customers and locations.
2.
Choose
Table>Buffer
. The
table buffer
dialog box will appear.
a. In the
buffer objects from table
drop down, choose the locations table. For the
store results in table
dropdown, choose new.
b. Click next.
c. Uncheck
open new mapper
and check
add to current mapper
, click create.
d. The
new table structure
dialog box appears. Click create.
e. Give a name to this new table that will contain the buffers. Type in a name and click save.
f. The
buffer objects
dialog box appears. The value for the radius will be the outer radius size.
If it is desired to return customers within 3-5 miles from the locations, choose 5 miles for the radius size.
Choose
one buffer for each object
. Click next.
g. Click OK.
3. Go into layer control and make the cosmetic layer editable. Click OK.
4.
Choose
Window>New Browser Window
and open the locations table. Click OK.
5.
Choose
Query>Select All
. Go back to the map window and click on its title bar.
6.
Choose
Objects>Buffer
.
a. The
buffer objects
dialog box appears. The value for the radius will be the inner radius.
If it is desired to return customers within 3-5 miles from the locations, choose 3 miles for the radius size.
Choose
one buffer for each object
. Click OK.
7. Go into layer control and make the buffer layer editable. Click OK.
8.
Choose
Window>New Browser Window
. Choose the buffer table. Click OK.
9.
Choose
Query>Select All
. Go back to the map window and click on its title bar.
10.
Choose
Objects>Set Target
.
11.
Choose
Query>Select All From Cosmetic Layer
.
12.
Choose
Objects>Erase
. In the
data
disaggregation
dialog box, click OK. Donuts should now appear (circles with the center cut out).
Now it is possible to select the points that fall within these donuts.
13.
Choose
Query>SQL Select
. In the from tables area, choose the customer table and then choose the buffer table.
Click OK. ***To remove duplicates, use the group by columns.
Note:
Spherical Buffers in MapInfo are approximations. A single point is used (usually the center of the MBR) to calculate distances. In Longitude\Latitude (which is what spherical really means), the X distance varies depending on the value. So, the distances on a spherical distance may be off. How far off depends on the situation.
In MapInfo Professional 8.0, use the new Object Distance functionality. The Nearest MapBasic statement may return the desired results. It's possible to enter a minimum and maximum distance, which can mimic concentric rings if that is what is desired. The results will be more accurate.
Last Modified:
Document URL:
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/E1FEBD7ADC3C190F8525701B006A0106
Get points that are within a donut.^E1FEBD7ADC3C190F8525701B006A0106^Y