0% found this document useful (0 votes)
32 views2 pages

Techtips Bufferfunction

Uploaded by

Fauzan Zaini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Techtips Bufferfunction

Uploaded by

Fauzan Zaini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

techtips

By Greg Bachinsky

Using the Buffer( ) Function Enables


MapInfo Professional Users to
See Locations with Related Data
®
ANY RETAILER WILL TELL YOU THAT LOCATING CUSTOMERS IS A MISSION-CRITICAL ACTIVITY. WITH MAPINFO PROFESSIONAL ,

USERS HAVE THE ABILITY TO CREATE BUFFERS TO LINK LOCATION DATA WITH CUSTOMER DATA AND VISUALIZE IT ON A MAP.

WHILE THE MAPINFO PROFESSIONAL MENU ALLOWS FOR STANDARD BUFFER CREATION, A SIMPLER WAY TO CREATE BUFFERS

AND RETAIN RELATED DATA IS AVAILABLE.

A common customer relationship This creates a new “Buffer” table. The store information can be trans-
management (CRM) task is locating ferred to the Buffer table with a SQL
From here, it is easy to find the
customers who are within a particular Select statement, but a simpler way
Customer table point objects that
distance from a company’s store, to create the buffers would be to
fall within the Buffer table objects
warehouse or distribution center perform the following:
by joining them through Query>
and joining that store data with the
SQL Select.
customer data. When two tables are
represented graphically as symbols,
it is a simple matter within MapInfo
Professional to create buffers around
the company stores and find all the
customers that fall within the buffers.
However, linking all the data can be
a little tricky.
For example, our map represents
our store locations as red stars
and our customer locations as blue
diamonds. The standard process to
create buffers is as follows.
1. Go to Map>Layer Control and
make the Cosmetic layer editable by
placing a check mark under the pencil
icon for that layer, and click OK.
However, if we browse the Buffer 1. Go to File>Save Copy as, and
2. Go to Query>SQL Select. From
table, it is hard to tell which original save a copy of the Store table.
the Table dropdown, choose the
store location is associated with each Call it Store_Buffers.
Store table.
buffer. The browser only contains one
2. Go to File>Open Table and
3. Uncheck the Browse Results box ID column populated with zeros.
open the new Store_Buffers table.
above the OK button, and click OK.
3. Go to Options>Show MapBasic
4. Go to Objects>Buffer and fill in
Window.
the desired radius and smoothness
of the buffers. For this example, 4. In the window, type: Update Store_
use 10 and 100 respectively. Buffers set obj=Buffer(obj,100,10,”mi”)
5. Select “One Buffer for Each Object”. 5. Then hit the Enter key on your
Click OK. keyboard.
6. Go to Map>Save Cosmetic objects,
and save the buffers to a new layer.

AN EXCERPT FROM MAPINFO MAGAZINE


www.mapinfo.com/magazine
6. Go to File>Save Table and save Now, it is easy to see what customer
the changes made to the Store_ is related to which store location.
Buffers table.
The parameters for the Buffer() func-
tion can be adjusted for resolution,
radius size and units of measure such
as “mi”, “ft” or “km”. Simply change
This turns all the point objects in the values within the parentheses:
the Store_Buffers table into buffer
Buffer(obj,Resolution of the buffer,
objects with a radius of 10 miles and
Radius of the buffer,“Units of measure”).
a smoothness of 100. If we browse
the table, Store_Buffers will have all Higher resolution values make
the columns and data of the original smoother and more accurate buffers,
Store table that is represented by the but take longer to draw. As for
points, or red stars in this example. the type of units available, see
Appendix D, p. 619 of the MapInfo
Professional v6.5 User’s Guide for
a more complete listing of choices.
Other MapInfo® MapBasic® functions
can be found in the MapBasic
Reference Guide, included on the
When we perform a query through MapInfo Professional v6.5 CD.
SQL Select and join the Customer
table to the Store_Buffers table Greg Bachinsky is technical support
where Customer.obj is within specialist with MapInfo Corporation.
Store_Buffers.obj, the resulting
query will have all the columns
and data from both base tables.

AN EXCERPT FROM MAPINFO MAGAZINE


www.mapinfo.com/magazine

You might also like