MySQL Forums
Forum List  »  GIS

Is the function Contains correct?
Posted by: Zhang YuanLiang
Date: September 15, 2005 03:23AM

Hi all:
I installed MySQL 4.1.14 .
I used to use a Oracle Saptial to control my map system.
Now I want to use MySQL GIS to instead of Oracle.

I create a table :
CREATE TABLE tt_townpage (
tel_no VARCHAR(14) NOT NULL,
name VARCHAR(70) NOT NULL,
point GEOMETRY NOT NULL,
SPATIAL INDEX(point)
) DEFAULT CHARACTER SET cp932;

I use the Function Contains(g1,g2) to check how many point in
a Polygon ( a city's map or other ).

SELECT count(*) FROM tt_townpage a
WHERE Contains(GeomFromText('Polygon((161064354 41683970,
161488375 41556347,161572056 41452456,161678516 41088086,
161546282 40811977,160903712 40813675,160979999 40608232,
160890447 40512693,160847481 40469207,160848904 40467801,
160891888 40511306,160982304 40607767,160906591 40811668,
161547541 40809974,161680651 41087913,161573863 41453399,
161489544 41558084,161064930 41685885,161064354 41683970))'),a.point)=1;

But I can not get a same result with using Oracle.

I find the result is same whith using a Function MBRContains.

The Function Contains is really set in MySQL 4.1.14?

Who can help me?
Tell me When we can use All GIS function?
I really want use some function like Buffer(),Union().

Thanks
Zhang YuanLiang.

Options: ReplyQuote


Subject
Views
Written By
Posted
Is the function Contains correct?
6212
September 15, 2005 03:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.