MySQL Forums
Forum List  »  GIS

Re: Wrong data returned from MYSQL
Posted by: Lenz Grimmer
Date: February 19, 2008 06:35AM

Hi Eric,

eric chang Wrote:
-------------------------------------------------------
> Using the following sql on MySQL version 4.1:
> select astext(map_point) ... where
> contains(GeomFromText('Polygon((
> 39.09889382148975 -74.68677520751953,
> 39.0930319292927 -74.63802337646484,
> 39.029585766893106 -74.6685791015625,
> 39.0421195689398 -74.71389770507812,
> 39.09889382148975
> -74.68677520751953))'),map_point)
>
> query returns some data as below, which seem to be
> outside the polygon area specified (verified using
> google map api)
>
> "POINT(39.0984 -74.713491)","
> "POINT(39.098255 -74.713217)"
> "POINT(39.09849 -74.713663)",
> "POINT(39.098885 -74.712646)"
> "POINT(39.097613 -74.713776)"
> "POINT(39.098328 -74.713354)"
> "POINT(39.097665 -74.713885)"
> "POINT(39.098312 -74.713324)"
> "POINT(39.098423 -74.713534)"
> "POINT(39.098219 -74.713148)"
> "POINT(39.098238 -74.713184)"
>
> Anybody has idea what the problem might be?

I assume this is because the current GIS implementation in MySQL uses minimum bounding rectangles instead of the exact polygon boundaries.

However, work is in progress to improve these functions - it would be great if you could test this with our new GIS functions: http://forge.mysql.com/wiki/GIS_Functions

Lenz Grimmer - MySQL Community Relations Manager - http://de.sun.com/
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten, DE
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels
Vorsitz d. Aufsichtsrates: Martin Haering AG Muenchen: HRB161028

Options: ReplyQuote


Subject
Views
Written By
Posted
4654
February 14, 2008 11:53AM
Re: Wrong data returned from MYSQL
3261
February 19, 2008 06:35AM


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.