New Boundaries from Overlap

148 views
Skip to first unread message

David Orsi

unread,
Nov 13, 2015, 4:56:23 PM11/13/15
to MapInfo-L
I have a two part question:
Background: I have 2,400 DriveTime Polygons and I need to calculate where those DriveTimes overlap and create new boundaries based on those overlapping areas.

My questions are:
1. What is the best way to create new boundaries from the overlap of existing boundaries?
2. After creating the boundaries, is there a way to make the unique ID's of the original boundaries carry over into the newly created boundaries from the overlap? In other words is Store 1 and Store 5 have overlap and I create the new boundary from that overlap, can I make the newly formed boundary reflect the ID's from Store 1 and Store 5?

Thank you very much!

Tony Pilkington

unread,
Nov 14, 2015, 2:20:59 AM11/14/15
to mapi...@googlegroups.com
David, this mbx was designed to break a collection of polygons into unique common linework segments with IDs of the 2 adjoining polygons as fields in the output table (linework.tab). As a test case I include an old table of Africa to decompose. An output value of –1 indicates no neighbour; sea?
--
--
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.
For more options, visit https://groups.google.com/d/optout.


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6176 / Virus Database: 4460/10995 - Release Date: 11/14/15

Border Neighbours Folder.zip

Andrew Harfoot

unread,
Nov 16, 2015, 6:58:11 AM11/16/15
to mapi...@googlegroups.com
Hi David,

The method you are looking for is usually known as a Union, but isn't implemented as a single operation in MapInfo (unless somebody tells me otherwise). Here are the steps you'd go through:

To create the overlap polygons, you should use the Enclose operator - create a new table with (as a suggestion) an OverlapID (integer), DTPolyIDs (character), OverlapCount (integer) attributes. Add the new table to the map, make it editable, select all the DT polys, and then run Object > Enclose. Untick the box saying 'Ignore region objects'.

You can then use a number of Table > Update Column commands to populate the attributes of your new table:

To generate a unique ID for the overlap polygons:

Update Table: OverlapPolys
Column to Update: OverlapID
Expression: rowid

To Count the number of overlaps:

Update Table: OverlapPolys

Column to Update: OverlapCount
Get value from table: DT_polygons (the original table)
Join: Where objects from table OverlapPolys are within objects from DT_polygons
Calculate: Count

To generate a list of the DT polygons that overlap in each polygon:

I'm assuming that there may be more than two DT polygons overlapping within your dataset, which makes the extraction and recording of the original IDs more complex, requiring a select and then update:

SQL Select all the original DT polys that overlap each 'overlap' polygon:

Select Columns: OverlapPolys.DTPolyIDs, DT_polygons.ID
From Tables: OverlapPolys, DT_polygons
Where: OverlapPolys.Obj Within DT_polygons.Obj
Order by: DT_polygons.ID
Into: q_OverlapToUpdate

Gather all the IDs together into a delimited list (With leading and trailing colons on the list eg: :1:23:561: to help with searching subsequently)

Update Table: q_OverlapToUpdate

Column to Update: DTPolyIDs

Calculate: ":"
Update Table: q_OverlapToUpdate

Column to Update: DTPolyIDs
Calculate: DTPolyIDs + ID + ":"

I hope that helps,

Andy
--
--
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.
For more options, visit https://groups.google.com/d/optout.


-- 
Andy Harfoot

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

Tel:  +44 (0)23 8059 2719
Fax:  +44 (0)23 8059 2849

www.geodata.soton.ac.uk

Andrew Harfoot

unread,
Nov 16, 2015, 7:29:21 AM11/16/15
to mapi...@googlegroups.com
Note that if you were only interested in the overlapping areas, then you could select all the polygons from OverlapPolys where OverlapCount < 2 and delete them.

Andy

Uffe Kousgaard

unread,
Nov 16, 2015, 7:39:56 AM11/16/15
to mapi...@googlegroups.com
Hi,

I wrote the attached mapbasic application some years ago for such calculations.
Please have a look if it works for your task.

Regards
Uffe Kousgaard


David Orsi wrote:
overlap.zip
Reply all
Reply to author
Forward
0 new messages