Table Comparison

39 views
Skip to first unread message

MEG

unread,
Nov 29, 2021, 10:04:49 PM11/29/21
to MapInfo-L
I want to compare two MapInfo tables and find orphans.

For example, if Table 1 has a line segment that Table 2 doesn't contain,   then the Table 1  segment would be marked (tagged).   Conversely,  if Table 2 has a segment that Table 1 doesn't contain, then the Table 2 segment would be marked.

Certainly, once the files have been processed, the marked (tagged) segments could be easily exported.

Could a buffering technique be used to find the "matched" segments and then do a select to find the "unmatched" (orphan) segments?

Is there a utility or sample code that does this?  Or some code that could be used as a starting point?

Thanks,

MEG


Peter Horsbøll Møller

unread,
Dec 2, 2021, 4:47:29 AM12/2/21
to mapi...@googlegroups.com

Hi MEG

 

You should be able to do this using a sub-select that creates a buffer around the line segments in one of the tables and then compare this to the line segments in the other table.

This will give you all the line segments that match completely (=are entirely within the buffer created).

I use a 1 meter buffer which you can change all depending on the tolerance you want to apply

 

Select *

From Highways

Where OBJ Entirely Within Any (Select Buffer(OBJ, 12, 1, "m") From HighwaysModified)

Into Selection

 

If you now use Invert Selection, MapInfo Pro will select all the records weren’t entirely within any of the buffers from the sub select

 

Switch the order of the two table names to compare the other table.

 

Peter Horsbøll Møller

www.precisely.com

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

From: mapi...@googlegroups.com <mapi...@googlegroups.com> On Behalf Of MEG
Sent: 30. november 2021 04:05
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] Table Comparison

 

This message originated Externally. Use proper judgement and caution with attachments, links, or responses.

 

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/ba875651-e7ac-4b5b-90fe-0ff15e5eb5a6n%40googlegroups.com.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages