Creating Points in Map Basic

1,632 views
Skip to first unread message

rogerD

unread,
Nov 1, 2008, 8:21:19 AM11/1/08
to MapInfo-L
Please help me with a beginner's problem!
I have a regular task to create a map showing the locations of a few
hundred points, which I do by importing a spreadsheet, and using
Create Points from the MI menu to tell it which columns to use for X
and Y coordinates.
I would like to use Map Basic to automate the process, and have
written what I thought would be a very simple program. I have got as
far as importing the spreadsheet and making the table mappable using
'Create Map for mytable Coordsys ...". The empty map is made and I
can add it to the mapper using the Layers control.
What I can't do is to get MB to create the points using the correct
two columns. I have tried using Create Point and Insert Point in
various ways, but the best I can do is to create a single point.
What do I need to do in Map Basic to get the same function on the
whole table that I get using Create Points in the MI menu?

Kent.T...@state.mn.us

unread,
Nov 1, 2008, 8:48:43 AM11/1/08
to mapi...@googlegroups.com

Create Map For tablename CoordSys Earth Projection 1, 74
Set CoordSys Table tablename
UPDATE tablename Set Obj = CreatePoint(lng, lat)

This is the script I use.
____________
Kent Treichel
GIS Analyst
Tax Research
Minnesota Department of Revenue
MS 2230
600 North Robert St
St. Paul, MN 55146-2230
651-556-6150
fax 651-556-3103




rogerD <r...@btinternet.com>     11/01/2008 07:21 AM
Sent by: mapi...@googlegroups.com
Please respond to: mapi...@googlegroups.com

To
MapInfo-L <mapi...@googlegroups.com>
cc
Subject
[MI-L] Creating Points in Map Basic


rogerD

unread,
Nov 1, 2008, 9:01:17 AM11/1/08
to MapInfo-L
Many Thanks Kent. That is exactly what I needed.
-R
Reply all
Reply to author
Forward
0 new messages