MapInfo Pro Developers User Group

 View Only
  • 1.  finding Missing vertex between two tables.

    Posted 03-20-2022 23:45
      |   view attached

    Hi There,

    I have two (polyline) tables which is overlapping one on another layer. Please see below attachment. 

    Now, I would like to find out where there missing overlap one on another using mapinfo sql or Mapbasic.

    Thanks in advance.

    Regards
    Venu



    ------------------------------
    Venu I
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: finding Missing vertex between two tables.

    Employee
    Posted 03-22-2022 10:13
    Hi

    I haven't worked this out completely yet but here are a few ideas to get you started:

    1. Create points for all your nodes for all your lines, both the new and the old. You need to keep track of the ID/Name of the lines that the points belong to and maybe even also the segment and node number
    2. When you have the two tables with points, the new and the old, you can run a query to find the points in the new that do not match/intersect any point in the old. I'd create a small buffer around the old points to find the new points that aren't within any of the small buffers

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 3.  RE: finding Missing vertex between two tables.

    Employee
    Posted 03-23-2022 05:05
    Hi

    Some further descriptions for the ideas above:

    1. Use the tool Objects3DtoPoints3D from the MapInfo Marketplace to create nodes from your two tables.

    2. Run this query to find the new points that don't "overlap" an old point:
    Select *
    From LinesNew_2Dpnts
    Where Not OBJ Within Any (Select Buffer(obj, 12, 1, "m") From LinesOld_2Dpnts)
    Into Selection

    The query result should now show you the nodes that are new or not on top of an old node.
    Do note that I have used a tolerance of 1 meter for finding old nodes. You can lower this if you want.
    Also not that the query compares the new nodes to all the old nodes.
    It doesn't take into account what object the node belongs to.

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------