[Q] geodetic spatial functions
Posted in 2003
Hi,
I'm using Informix 9.30 with geodetic datablade (3.00). It seems
that the geodetic spatial functions, e.g., distance, doesn't
take the 3rd element of a point into account. The following
is the script I tried with the result.
create table test (location GeoObject);
insert into test values ('GeoPoint((3,4,10),ANY,ANY)');
insert into test values ('GeoPoint((3,5,1),ANY,ANY)');
CREATE INDEX test_idx
ON test (location geospcalt_ops)
USING RTREE ;
select location, distance(location, '((3,4,0),ANY, ANY)'::GeoPoint) fromtest;
## RESULT
location GeoPoint((3,4,10),ANY,ANY)
(expression) 0.00
location GeoPoint((3,5,1),ANY,ANY)
(expression) 111167.9466418
If the 3rd element is considered, the distance between (3,4,0) and (3,5,1)
should be closer than that between (3,4,0) and (3,4,10), but it seems that
this is not the case for geodetic distance function. I'm wondering if this
is true that the geodetic spatial functions doesn't consider the 3rd
element in the point or if there is something that I'm missing here.
Any comments would be appreciated.
Thanks in advance,
Kiyoung..