Combining polylines

601 views
Skip to first unread message

Uffe Kousgaard

unread,
Aug 27, 2015, 2:19:59 PM8/27/15
to mapinfo-l
We have been hit by surprise how combine works on polylines.

Combine polyline A-B-C with C-B-D. We expected A-B-C-B-D, but got A-B,
B-C and C-D (3 sections).
These polylines represent routes and all of a sudden the combined route
is too short, since C-B is left out.
Doing it manually in code (the way we want it) would make it all very
slow. Unless someone has seen a command to do it diffently?

I don't think documentation states what should be expected, so we can
not really complain.

Another test shows combining line A-B-C with B-C-D gives A-B-C-D. That
was mostly FYI, not part of our needs.


Regards
Uffe Kousgaard

Peter Horsbøll Møller

unread,
Aug 27, 2015, 4:04:18 PM8/27/15
to mapi...@googlegroups.com
Uffe,

Have a look at the Set Combine Version statement.

I vaguely recall having run into weird behaviours when combining polylines a while back.
Apparently this was caused by the new algorithm trying to be smart.

I think I fixed it by forcing MapInfo Pro use the old algorithm using Set Combine Version 950.

But isn't B-C-C-B what you would call a spike and what isn't wanted?
I can see why you want it in this case however.
I'm not sure my issue was exactly that but maybe the old algorithm still works better.

Peter Horsbøll Møller
Pitney Bowes
--
--
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.

________________________________

Uffe Kousgaard

unread,
Aug 27, 2015, 4:54:32 PM8/27/15
to mapi...@googlegroups.com
Hi Peter,

Set combine changes behaviour for polygon combining according to
documentation.
And a test shows no effect on our case.

Regards
Uffe

Eric Blasenheim

unread,
Aug 27, 2015, 9:10:11 PM8/27/15
to MapInfo-L
Uffe,
When you say you got "A-B, B-C and C-D (3 sections)." you mean the nodes for B and the nodes for C were repeated in each section?
That does sound strange. Can you send me the data?
Regards,
Eric Blasenheim
Pitney Bowes Software

Uffe Kousgaard

unread,
Aug 28, 2015, 2:34:40 AM8/28/15
to mapi...@googlegroups.com
Hi Eric,

Here is the data. Almost as simple as it can be. Just select the 2 records and combine them.

Regards
Uffe


Eric Blasenheim wrote:
combine_data.ID
combine_data.MAP
combine_data.DAT
combine_data.TAB

Andrew Harfoot

unread,
Aug 28, 2015, 5:06:17 AM8/28/15
to mapi...@googlegroups.com
Hi Uffe,

In my experience this is how the combine command has always (since v6!) worked on polylines - overlapping sections are merged, and if the resulting object is disaggregated, the linework is split at junctions / network nodes. It's always been a reliable (if undocumented) way to clean network like data as long as the combined object isn't too large.

It sounds like what you are looking for is the Create Object As Merge type functionality, but this command only accepts polygons unfortunately. Both other combine operations provide Union functionality, which isn't what you are after in this case.

Cheers,

Andy
-- 
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,
Aug 28, 2015, 5:27:44 AM8/28/15
to mapi...@googlegroups.com
Thinking about it some more, the Merge functionality wouldn't be sufficient either as you are still looking to join the two line sections, not have then as separate parts in an aggregate object.

It sounds like you considered the Alter Object command which will be slower than a whole object command, I haven't tried this, but how does the Alter Object route compare with writing out and appending to a MIF file and then importing that?

Cheers,

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.

Uffe Kousgaard

unread,
Aug 28, 2015, 7:42:02 AM8/28/15
to mapi...@googlegroups.com
Hi Andrew,

Yes, it was Alter Object I had in mind, but I think it is too slow.
We have decided not to test any of the methods, but do it all in a different way in next version.

Regards
Uffe
Reply all
Reply to author
Forward
0 new messages