I am currently working on a MapBasic tool that generates start and end coordinates for a polyline layer. So far I have successfully populated 4 columns in a table (SX, EX, SY, EX) with coordinates of start and end nodes. The tool then exports the table as a csv. Now I want to open the exported table (I can do this) then create points based on these 4 columns in mapbasic. How would I go about doing this?
I would recommend that you insert the start and end coordinates as separate rows in your table. In that way you can create points for these individually like explanined below.
I'm assuming that you have already: - created your new table - made this new table mappable - read the coordinates from the polyline into varialbes called fX1, fY1, fX2, fY2
Insert Into NODE_POINTS (X, Y, OBJ) Values (fX1, fY1, CreatePoint(fX1, fY1)) Insert Into NODE_POINTS (X, Y, OBJ) Values (fX2, fY2, CreatePoint(fX2, fY2))
In this way you insert the values into columns called X and Y and at the same time you create a point for each of the start and end points