VERIFIED SOLUTION i

How to create points where polylines from 2 separate tables intersect using MapInfo Pro and the overlay nodes function

Product affected: MapInfo Pro™
This article shows how to use "Overlay Nodes" in MapInfo Pro to find the location of intersections between 2 polyline tables.

From the MapInfo Pro 16.0 HELP:
 -------------------------------------------------------------------------------------------------------------------------------------------------
Adding Nodes to an Object Using the Overlay Nodes onto Target Command
When you choose to overlay nodes onto an object using the Overlay Nodes onto Target command, MapInfo Pro calculates all points where the target objects intersect the currently selected objects. MapInfo Pro then adds nodes to the target objects at the points of intersection unless the target objects already have nodes at those locations. If the target objects do not intersect the selected objects, MapInfo Pro does not add any nodes.
If you use Overlay Nodes onto Target to add nodes to a line, MapInfo Pro converts the line to a polyline. If you use Overlay Nodes onto Target to add nodes to an ellipse, rectangle or rounded rectangle object, MapInfo Pro converts the object to a region. Overlay Nodes onto Target does not affect text or point objects, and you may not use point or text objects to add nodes to other objects.
To add nodes to an existing object:
  1. Select one or more objects in the editable map layer of the active Map window. These are the objects to which you want to add nodes.
  2. On the SPATIAL tab, in the Edit group, click Set Target. The objects you selected in Step 1 appear in a different style to indicate that they are the editing targets.
  3. Select one or more objects from any layer of the active Map window. Presumably, these are objects that intersect your target object(s).
  4. On the SPATIAL tab, in the Edit group, click Nodes and Overlay Nodes onto Target.
MapInfo Pro adds nodes, if appropriate, to the target object(s).
-----------------------------------------------------------------------------------------------------------------------------------

A MapInfo Pro user has 2 separate tables of polylines (i.e. Streets, etc.) and wants to create points located where the polylines intersect.

This screenshot shows the 2 street layers ("red" and "blue") with circles added to illustrate the where the 2 layers intersect and this is where the intersection points will be created:


User-added image


The first step in this process involves using the "overlay nodes" function on both polyline tables in order to place nodes where the tables intersect.
To add nodes to "Blue":
1) Select all objects from "Blue", make the table editable, and then go to
     Spatial > Edit > Set Target

(The selected objects will typically show a different style color to indicate the target has been set)

User-added image


2) Select all objects in the "Red" table (Right-click on the layer in Layer control and choose "Select all") and
then  choose
Spatial > Edit > Overlay Nodes onto Target

User-added image


This action will place nodes on the target table ("Blue") wherever the objects intersected objects from the "Red" table.

User-added image


3) Now the same procedure of overlay nodes is done on the "Red" table to make sure there are nodes on BOTH tables where they intersect.

Both tables now have nodes placed at the locations of intersections through the use of the overlay nodes function.

4) The goal is to extract the coordinates of the nodes in both tables. 
This could be done manually by exporting the tables to mid/mif format and then editing the formatting of the resultant mif file to
then create points, as the mid/mif export displays the coordinates of the nodes of the table being exported.

Here is the mif export of the "Blue" streets table:

Version   300
Charset "Neutral"
Delimiter ","
CoordSys Earth Projection 1, 62
Columns 1
  ID Integer
Data

Pline 16
-79.808822 32.305126
-80.919232 32.591249
-81.813078 32.82157
-82.252933 32.385068
-82.624918 32.015918
-83.72341 31.866843
-84.451574 31.768024
-84.889947 30.633445
-85.161942 29.92948
-88.61231 29.681587
-88.71764 30.441321
-88.789878 30.96237
-89.343032 31.187572
-89.804694 31.375526
-89.411455 32.326412
-88.967478 33.399986
    Pen (3,2,255)



The user could manually copy the coordinate data and then import as a text file to create points, etc. but attached is a 3rd-party tool that will automatically
create a new point table based on the nodes in a table or selection and this "all2pts.mbx" tool is attached.
(Note: this is a 3rd-party tool and is not supported by PB and is only provided as a courtesy).

5) Use the 3rd-party “all2pts.mbx” tool to convert all nodes in both tables, including the new overlay nodes found at the intersections in each table, to new tables made up of points:

User-added image

Here are the 2 new point tables created by the ALL2PTS tool (red dots for the Red table and blue stars for the Blue table):

User-added image



6) Now use the MapInfo Pro tool “Coordinate Extractor” to update each of these new point tables with the coordinates and save each table.
 
The steps above created 2 new point tables based on the coordinates of each node in each table, including the new nodes created from the overlay procedure.
Since those points located at the intersections will have identical coordinates, a query can find those point objects from either table
that have coordinates that match the coordinates of the points from the other table.
 
 
7) Run a simple SQL query between the 2 new point tables where long = long and lat = lat to find the point objects in the 1st table listed in the "From Tables" section that are located at the intersections - in this example it will be objects from the "blue_pts" table….
The end result of this query will be those locations of intersections.


User-added image


7) Save that query as a table (Home > Save Copy As), open it back into MapInfo Pro and then use the "Create Points " function
to create point objects (Spatial > Create > Create Points).

Here  are the point objects created from this process (black stars), showing the location o intersections between 2 different tables:


User-added image








 
UPDATED:  April 16, 2018