Lines vs Polylines

65 views
Skip to first unread message

Mats Elfström

unread,
Aug 18, 2010, 9:47:23 AM8/18/10
to mapi...@googlegroups.com
Hi!

A comment on the current thread on the beginning and end points of lines and polylines.
It seems as if the distinction between lines and polylines eludes users and often causes problems.
Add to that the possibility of an object with multiple segments.

Still, obtaining the beginning and end coordinates of a line object must be regarded as such a basic task that these different flavors of line objects should be dealt with inside the ObjectGeography function, instead of having the user first determine line type and then traverse all nodes and segments in order to reach the end.
I mean, how often do you really want to locate the Nth node of the Nth segment of any line.

What is the logical reason for treating line objects with two or three nodes as unrelated species?
I'm of the curious kind and seldom content with the answer "That's how it is - get used to it" when I trip over a seemingly unnecessary obstacle.

Comments are welcome.

Regards, Mats.E
--
______________________________________________
Mats Elfström, Väpplingvägen 21, SE-227 38 LUND, Sweden
tel: +46 46 145959 / mob: +46 70 595 39 35
alt e-mail: mats.e...@telia.com


Uffe Kousgaard

unread,
Aug 18, 2010, 10:11:42 AM8/18/10
to mapi...@googlegroups.com
Hi Mats,

The reason is lines and polylines are stored differently inside the TAB file (a line is more compact than a polyline with 2 nodes). And lines can not be smoothed.

But I agree, the mapbasic API should be the same for both object types.

For the same reason my ToolBox (http://www.routeware.dk/toolbox.php) contains a function for swapping between lines and polylines (not listed on the website, but it's in there!). If you change to polylines, mapbasic programming gets easier. If you change to lines, the TAB file gets more compact.

Kind regards
Uffe Kousgaard



Mats Elfström wrote:
--
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

Thomas Bacon

unread,
Aug 18, 2010, 10:13:06 AM8/18/10
to mapi...@googlegroups.com

I have to agree with Mats on this. Surely one would assume that the function in question would apply to both types of line objects. The ObjectInfo function to select the Nth node of the Nth segment could still apply for those cases where it may be needed.

It seems every time I work with polyline datasets I have to use this convoluted method to determine the beginning/end coordinates of an object (and I’ve usually forgotten that ObjectGeography doesn’t work, so it ends up becoming even more of a pain!).

 

To anyone at MI; is there a good reason why the functions are designed like this? Any possibility of this being improved in future releases?

 

Regards,

 

Tom

 


--
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



The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. Any views or opinions expressed in this e-mail may be solely those of the author and are not necessarily those of Mouchel. Mouchel Limited, Registered in England at Export House, Cawsey Way, Woking, Surrey, UK, GU21 6QX Registered No : 1686040

Mats Elfström

unread,
Aug 18, 2010, 10:40:18 AM8/18/10
to mapi...@googlegroups.com
Uffe wrote "The reason is lines and polylines are stored differently inside the TAB file", and so it is, but that is the cause of the problem.
The reason remains to be revealed.

Mats.E

2010/8/18 Uffe Kousgaard <uf...@routeware.dk>
Reply all
Reply to author
Forward
0 new messages