CartesianObjLength vs ObjectLength Functions?

526 views
Skip to first unread message

map1

unread,
Nov 7, 2011, 7:30:19 AM11/7/11
to MapInfo-L
Hello,

Can someone explain the difference between these two functions?

I was also wondering if someone could point me in the right direction
for descriptions of what each function type does?

Thanks for any help!

Driver, Greg 9434

unread,
Nov 7, 2011, 8:11:40 AM11/7/11
to mapi...@googlegroups.com
ObjectLen( ):
The ObjectLen( ) function returns the length of an object expression. Note that only line and polyline objects have length values greater than zero; to measure the circumference of a rectangle, ellipse, or region, use the Perimeter( ) function.

The ObjectLen( ) function returns a length measurement in the units specified by the unit_name parameter; for example, to obtain a length in miles, specify "mi" as the unit_name parameter. See Set Distance Units statement for the list of valid unit names.

For the most part, MapInfo Professional performs a Cartesian or Spherical operation. Generally, a Spherical operation is performed unless the coordinate system is nonEarth, in which case, a Cartesian operation is performed.


CartesianObjectLen( ):
The CartesianObjectLen( ) function returns the length of an object expression. Note that only line and polyline objects have length values greater than zero; to measure the circumference of a rectangle, ellipse, or region, use the Perimeter( ) function.

The CartesianObjectLen( ) function will always return a value using a cartesian algorithm. A value of -1 will be returned for data that is in a Latitude/Longitude coordinate system, since Latitude/Longitude data is not projected and not cartesian.

The CartesianObjectLen( ) function returns a length measurement in the units specified by the unit_name parameter; for example, to obtain a length in miles, specify "mi" as the unit_name parameter. See the Set Distance Units statement for the list of valid unit names.

HTH

Greg Driver

NOT PROTECTIVELY MARKED


Hello,

Thanks for any help!

--
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
Information about this E-mail
This email and any files or attachments with it are intended solely for the use of the individual(s) or organisation(s) to whom it is addressed.
It may contain information that is confidential or subject to legal and/or professional privilege.
If you have received this email in error please notify the sender and delete it including any files or attachments from your e-mail account or computer.
Any opinions expressed in this email are those of the individual and not necessarily those of Surrey Police.
Surrey Police monitor incoming and outgoing e-mail.

map1

unread,
Nov 7, 2011, 8:39:33 AM11/7/11
to MapInfo-L
Thanks Greg. Both explanations appear the same to me.

However the reason I ask is that I've done a test with three different
polylines and updated attribute fields with both ObjectLen and
CartesianObjLength for each polyline.

I get the following results

Polyline 1

ObjLength (m): 5,712.87
CartesianObjLenght(m): 5,729.17

Polyline 2

ObjLength (m): 3,045.30
CartesianObjLenght(m): 3,053.98

Polyline 3

ObjLength (m): 1,664.29
CartesianObjLenght(m): 1,669.03

Can someone explain why I'm getting the different lengths? Obviously
this has an impact on tenders, works, etc so i need to know which is
the most accurate measurement to use.

Tony Pilkington

unread,
Nov 7, 2011, 9:20:13 AM11/7/11
to mapi...@googlegroups.com
All non cartesian distance calculations in MI are based a sphere (Spheroid
12 radius 6370997.0m e= 0.0); the clue is in the name. You will find that
sphericaldistance() between two points is the same no matter what ellipsoid
you are using. This means that all distances below 48 degrees are short and
above that long. If you try to use the wrong distance function you get a
distance of -1, indicating an error.

This spheroid is worth remembering as many organisations publish rectified
imagery or radar data etc based on this sphere; 10,999,12,0,0,0 is Mercator
on this Sphere.

The error in the distance calculation is sometimes deemed to be acceptable
as it is about 1km in 500km; would you use a distance measuring device which
gave you an error or 1m in 500m?

Polyline 1

Polyline 2

Polyline 3

--

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


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1869 / Virus Database: 2092/4601 - Release Date: 11/06/11


map1

unread,
Nov 7, 2011, 9:26:00 AM11/7/11
to MapInfo-L
Interesting. Do you know which object length function would be best to
use when using British National Grid?

CDR Group

unread,
Nov 7, 2011, 10:10:00 AM11/7/11
to mapi...@googlegroups.com
The British National Grid is a Cartesian Grid.
And you could also set your defaults to Cartesian if you are always using BNG.
 
Regards
 
John Ievers
CDR Group
www.cdrgroup.co.uk
www.browse-a-map.co.uk
Tel: 01433 621282
Fax: 01433 621292
Specialists in Geographic Information Systems

CDR Group is the trading name of Contract Data Research Ltd.
Registered address Eccles House, Eccles Lane, Hope, Hope Valley, S33 6RW.
Registration No. 1972326
VAT No. GB373 3117 67
----- Original Message -----
From: map1
Sent: Monday, November 07, 2011 2:26 PM
Subject: [MI-L] Re: CartesianObjLength vs ObjectLength Functions?

Interesting. Do you know which object length function would be best to
use when using British National Grid?

map1

unread,
Nov 8, 2011, 10:41:24 AM11/8/11
to MapInfo-L
Thankyou all for your help it makes alot more sense now.

I was wondering if anyone could point me in the right direction for
definitions of all the function in mapinfo?

Peter Horsbøll Møller

unread,
Nov 8, 2011, 1:36:40 PM11/8/11
to mapi...@googlegroups.com
Have a look at the MapBasic Reference Guide - that should give you a good overview of the functions in MapInfo/MapBasic

You Can find it at pbinsight.com: http://www.pbinsight.com/support/product-documentation/details/mapinfo-mapbasic

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

--
Peter Horsbøll Møller
Pitney Bowes Business Insight - MapInfo

Bill Thoen

unread,
Nov 8, 2011, 8:22:51 PM11/8/11
to mapi...@googlegroups.com
Check out PBBI MapInfo's support site:
http://www.pbinsight.com/support/product-documentation/details/mapinfo-professional

and download the manual(s).


Happy RTFM'ing!

- Bill Thoen
Reply all
Reply to author
Forward
0 new messages