Scott :
 
You asked about the automatic creation of Line objects, saying:
 
"I have a line table with no map objects on it that I would like to
automatically digitize from data with an existing table.
My line table(has not object data, like a spreadsheet) would have two
fields, one called start and the other called stop.
I would like to automatically digitize this from object information that I
have in a point table.
 
You may be interested in a free Mapbasic tool program called CRE8LINE.MB to help automate the kind of activity you describe.  CRE8LINE attempts to provide equivalent functionality to the standard MapInfo Pro menu command Table>Create Points.
 
Recall that, to use Table>Create Points, you start with a MapInfo table containing two Float columns (say X and Y) then specify a Symbol style and create Point symbols in the Obj column. To use CRE8LINE you start with a MapInfo table containing four Float columns (X1,Y1 X2 and Y2), specify a Pen style and create Line objects in the Obj column.
 
Suppose your two tables are called LineTab (your spreadsheet-like line table ) and PointTab (your table of points).  With CRE8LINE, you would need to perform these seven steps:
 
1. add four float columns X1,Y1,X2,Y2 to LineTab
 
3. use Table>Update Column to update X1 from CentroidX(PointTab.obj)- join LineTab and PointTab on LineTab.Start=PointTab.Point
 
4. use table>Update Column again to update Y1 from CentroidY(PointTab.Obj)
 
5. use Table>Update Column to update X2 from CentroidX(PointTab.obj)- join LineTab and PointTab on LineTab.Stop=PointTab.Point
 
6. use Table>Update Column again to update Y2 from CentroidY(PointTab.Obj)
 
7. use CRE8LINE on LineTab to create the Line objects connecting (X1,X2) to (Y1,Y2).
 
If you'd like to try a copy of CRE8LINE.MBX for MapInfo Pro 4.1.2 or later, then just ask.
 
Regards
 
David M Haycraft                   Phone/Fax:  61 + 2 + 6231 8104
Information Analysis Assocs  P/L   Mobile:     0412 001 134
ACN 085 516 105                    Email:      [EMAIL PROTECTED]
1 Cumming Place, Wanniassa         Web:        www.acslink.aone.net.au/actaa/iaa.htm
A.C.T. 2903, Australia             A MapInfo Partner

 

Reply via email to