MySQL Forums
Forum List  »  GIS

Re: Names of polygons
Posted by: Albert Rovira
Date: September 07, 2012 01:57PM

You can add a field "Name" on the table and do selects similar to:


select Name from mytable where Within(GeomFromText('POINT(8.5929098 50.0286713)'), geometry_field) = 1;

Note that with this approach you must ensure that don't group polygons with different name on the same geometryCollection. In general it's more useful maintain different rows for each polygon.

Also Note that Within is equivalent to MBRWithin so the select returns more rows that it must.



Edited 1 time(s). Last edit at 09/07/2012 02:05PM by Albert Rovira.

Options: ReplyQuote


Subject
Views
Written By
Posted
3673
August 09, 2012 01:57AM
Re: Names of polygons
2205
September 07, 2012 01:57PM
2087
September 09, 2012 06:05AM


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.