Hello,

I have a problem with MapBasic. I have 2 tables. I want to find the
distances from an object selected on a table1 (Buildings) to objects in
table2 (public services). My tables' coordinate systems are Non-earth(m).
So, I need Cartesian distances. When I try to find them in MI SQL, there is
not a problem. But when I try to use MapBasic for finding distances, the
results are wrong. How can I find correct distances? Thanks in advance for
your help.

Melih Basaraner
Yildiz Technical University
Department of Geodesy and Photogrammetry Engineering
Chair of Cartography
******************************************************
MB codes are as follows:

Set Map CoordSys NonEarth units "m" 
Distance type Cartesian

x = centroidx(selection.obj)
y = centroidy(selection.obj)


select
BUILDING_NAME,CartesianDistance(x,y,centroidx(obj),centroidy(obj),"m")
"Distance(m)" 
from public_services order by col2 into PS_Distance
browse * from PS_Distance
end sub

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to