I went to look into the data and deleting duplicates appears to be very easy because each object is tagged with what seems to be a globally unique ID. Here is what I did: Downloaded ZIP archives for ON and QC, unpacked both. Created a new MAP file. Imported all SHP files from the ON archive, moved created components into a folder named 'ON'. Imported all SHP files from the QC archive, moved created components into a folder named 'QC'. Opened 'watercourse_1' drawing (ON), I assume this is the data you are interested in. Dropped 'watercourse_1 2' drawing (QC) into the same window. Formatted one of the drawings to thick gray, the other to thin blue, saw something like this (the objects overlap): (This is when I zoomed closer to the objects, then Alt-clicked those that seem to be on top of each other to see what fields they contain and noted that the values in 'feature_id' coincide and look like globally unique identifiers.) Opened a command window using View - New Command Window - SQL. Ran the following query (I ran it in three steps, you can run it as a whole): --SQL9 -- step 1 ALTER TABLE [watercourse_1 Table] (ADD INDEX [feature_id_x] BTREE ([feature_id])); -- step 2 ALTER TABLE [watercourse_1 Table 2] (ADD INDEX [feature_id_x] BTREE ([feature_id])); -- step 3 DELETE FROM [watercourse_1 Table] WHERE [feature_id] IN (SELECT [feature_id] FROM [watercourse_1 Table 2]); The money step is the third one which deletes objects from one drawing which have a matching [feature_id] in the other drawing. But if you run that step without preparation, it will run slowly. To make it run fast, I build indexes on the involved fields in steps 1 and 2 - technically, for this particular case you can get away doing just step 2, but it is generally a good idea to build indexes on both (who knows what other queries we will need, so let's just reflect that [feature_id] is unique in both drawings in the data). The steps run in 0.830 + 3.009 + 15.465 = a bit more than 18 seconds on a test machine, and after that the overlapping objects are only left in 'watercourse_1 2' (QC). Attachments: qc-on-overlap.png
|