Re: Distance calculation

156 views
Skip to first unread message

Iain Scott

unread,
May 23, 2013, 4:30:38 AM5/23/13
to mapi...@googlegroups.com
Have you tried the Distance Calculator tool? (from Tools>Tools Manager). I think it comes standard with Mapinfo. Seems to do what you are asking.

regards,
Iain

On Wednesday, 22 May 2013 13:21:41 UTC+1, Santhosh Gampa wrote:
Hi Guys,

I am new to this group and stuck with a query in calculating distance.

I have a .tab file containing 500+ samples. Now the point is to calculate the distance from point 1 to 500 with reference to Serial number so that the points do not connect each other randomly (like point 1 with point 200).

Thanks in advance.
Santhosh

Santhosh Gampa

unread,
May 24, 2013, 2:25:06 AM5/24/13
to mapi...@googlegroups.com
Yeah I've tried Distance Calculator tool. But this returns with the calculations in which all the points are not connected in a sequence.

I have zoomed the map a bit and found this. You may go through the snapshot I've attached.

Thanks & Regards,
Santhosh
Distance calculations.jpg

Graeme

unread,
May 24, 2013, 2:46:57 AM5/24/13
to mapi...@googlegroups.com
Have a look at "Connect the dots" mapbasic available from http://www.mapinfotools.com/. I think this will do what your after, I think you basically want to create a single line that goes from point 1 to 2, then continue onto point 2 to 3 ......up to 499 to 500 etc.... as if each point is a node of the polyline, is that right?

Santhosh Gampa

unread,
May 24, 2013, 3:01:52 AM5/24/13
to mapi...@googlegroups.com
Thanks for the response Graeme.

In a way you are right Graeme. But when I use "Connect the dots", it is randomly connecting the dots and calculating distance -- like say the distance between 1 and 300 is also calculated. In this, I need to eliminate the distance between 1 and 300 from total distance.

If it is a single instance, then I can do it without any problem. But there are many instances like 10 instances for only 500 points which is a very small data for me.

I have provided a small example of 500 points. Actually I have huge data containing 50000+ points. I cannot deduct each random distance which is not in a sequence because for 50000+ points "Connect the dots" will create about 100+ random instances which should not be calculated.

It will be great if there is any other feature because this is consuming a lot of time.

Andy Harfoot

unread,
May 24, 2013, 11:10:58 AM5/24/13
to mapi...@googlegroups.com
Hi Santhosh,

Would I be right in saying that your point dataset is comprised of many 'tracks', and these 'random connections' that you describe are the result of the connect the dots tool connecting the start and end points of successive tracks?

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/groups/opt_out.
 
 


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

Santhosh Gampa

unread,
May 26, 2013, 6:01:58 AM5/26/13
to mapi...@googlegroups.com
You are right Andy.
 
I do not want any connectivity of random points. The points should be connected in a sequential manner.
 
Thanks,
Santhosh

David Sherrod

unread,
May 26, 2013, 4:27:52 PM5/26/13
to mapi...@googlegroups.com

The query has advanced to this: you have many points, groups of which define tracks; and you want a line that connects any set of points (a track) to obtain a distance.  One way or another you’ll need to draw a line through each set of points. That’s where Andy and Graeme have led us.

To do this, your GIS needs to know how to group the points and how to arrange them sequentially within groups.  Should sequencing be by serial number?  By date of unit sold? By road distance from a servicing center in each county, parish, or state?  User input is the key here, eh?

 

My programming skills are nascent, so I’d slog along using available tools.  For the mbx Connect The Dots, you must arrange a table so that sequencing corresponds to the order of rows in the table (that’s how CTD is programmed).  In my slog, I’d create a column for track (grouping), for sequencing within group, and also for the coordinates of the points (lat/long or east/north).  Export the table, open in excel, then sort so the grouping gets first priority (smallest to largest) and the sequencing gets second priority (smallest to largest). Reopen in Mapinfo and create points. Select (SQL) to capture the first grouping, then run Connect The Dots on that query table.  Since points are ordered in sequence of choice (from my Excel diversion), the scribed line follows the desired path.

On to the next grouping, ad nauseum.

This solution will give you lines, each line unique to a grouping (track), and the line traced according to the sequence you’ve established.  From there, line length can be calculated painlessly in GIS.

 

The potentially painful task is the need to group your points and then assign sequential values. Without that information, all programming tools will sputter. If you have 500-plus points and neither grouping nor sequential information for them, then you'll need to commit time to table management. Otherwise it's GIGO.


Dave Sherrod



--- On Sun, 5/26/13, Santhosh Gampa <metro.s...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages