Also i figured out that the ST_Distance function seems to use Pythagoras to calculate the distance which is more than just inaccurate.

Can some one help me or tell me what I did wrong or approve that there is something wrong in MySql?

Thanks in Advance.]]>Thomas SchlageGISThu, 19 Mar 2015 10:24:50 +0000http://forums.mysql.com/read.php?23,629216,629216#msg-629216Points within km range (2 replies)http://forums.mysql.com/read.php?23,629216,629216#msg-629216
I probably got an simple question but I didn't found a satisfying answer.
In my application the user insert a center point (lat, lon) and a range in kilometers. Now I want to get all entries which are in range of the lat,lon + km.
The way to calculate the distance in km inside the query seems to be the worst ever since the logic applies to every entry comparison.

I tried to convert the kilometers to a distance by calculating a bounding box and using Pythagoras to get the distance between center and max lat,long. It seems to work but it isn't accurate.

Can someone help me?]]>Thomas SchlageGISThu, 19 Mar 2015 10:26:59 +0000http://forums.mysql.com/read.php?23,628782,628782#msg-628782Coordinates of intersection (no replies)http://forums.mysql.com/read.php?23,628782,628782#msg-628782
This looks pretty easy. I created an intersection list with the following select:

But one more thin I want to include in the new table is the coordinates of the intersection. I can't figure out how to get that. I came accross the description of an Intersection(a,b) command that appears to do what I want, but evidently it doesn't exist in v5.5.]]>Glenn PuckettGISSun, 01 Mar 2015 17:45:27 +0000http://forums.mysql.com/read.php?23,622953,622953#msg-622953MySQL GIS: GeoHash (no replies)http://forums.mysql.com/read.php?23,622953,622953#msg-622953
http://mysqlserverteam.com/geohash-functions/]]>Edwin DesouzaGISThu, 30 Oct 2014 14:15:32 +0000http://forums.mysql.com/read.php?23,622952,622952#msg-622952MySQL GIS: GeoJSON (no replies)http://forums.mysql.com/read.php?23,622952,622952#msg-622952
http://mysqlserverteam.com/geojson-functions/]]>Edwin DesouzaGISThu, 30 Oct 2014 14:15:13 +0000http://forums.mysql.com/read.php?23,621282,621282#msg-621282datatype for astronomical RA and Declination (no replies)http://forums.mysql.com/read.php?23,621282,621282#msg-621282
Sarah TaylorGISMon, 29 Sep 2014 20:53:36 +0000http://forums.mysql.com/read.php?23,614048,614048#msg-614048GIS for Oracle (no replies)http://forums.mysql.com/read.php?23,614048,614048#msg-614048
Tableau: Clim data

this table shows the values of temperature for the two provinces(SUD sd, Beirut bi).

on the other side, these two provinces (SUD sd, Beirut bi) has a geographical reference defined in the spatial database that constitutes the
map of Lebanon at provinces level with the same identification (sd,bi) respectively.

the spatial database that constitutes the map of Lebanon at Province level which, by its turn, is digitalized through ArcGis software and saved as LebMap.shape.

my main objective is :

i need to know if there are PLSQL packages, procedures, functions or any Oracle tools through which i achieve two tasks:

1) link the two relational and spatial databases by the identification(sd, bi)

2) select available data in the CLIM table to diffuse or disseminate them on Lebanon map at provincial level (SUD , BEIRUT) represented by
LebMap.shape, and classify them by colors; for example:
20-30 blue color on the map
31-40 Red color on the map.

MySQL GIS: InnoDB R-Tree
http://mysqlserverteam.com/innodb-spatial-indexes-in-5-7-4-lab-release/]]>Edwin DesouzaGISTue, 01 Apr 2014 19:38:15 +0000http://forums.mysql.com/read.php?23,607290,607290#msg-607290overlay function (no replies)http://forums.mysql.com/read.php?23,607290,607290#msg-607290
Anvith ShivakumaraGISWed, 19 Feb 2014 17:39:54 +0000http://forums.mysql.com/read.php?23,597041,597041#msg-597041GIS development status (no replies)http://forums.mysql.com/read.php?23,597041,597041#msg-597041
In a closed 2012 thread below, Jonathon Coombes said that the functions were being actively worked on and we should look at the 5.6 documentation. That's fine but obviously it gives no visibility about what new functions and corrections to existing functions (eg Intersection()) are being worked on.

Is there a paid-for version of MySQL which has more GIS functions than the free Community version ?

I have used the same Intersection() test script on two servers with the different versions of MySQL so I'm fairly certain that is true.

NB ST_Intersects() might be OK in 5.6 but that merely identifies whether there is an intersection or not, whereas Intersection() defines the geometry of the intersection ie the location of the intersecting point, line or polygon.

Any thoughts ?
Is anyone working on these GIS functions ?
Can someone please look at the Intersection() function in 5.6 and debug it ?
What timescale (if any) ?

I need to know the situation ASAP - even if it's bad news - so I can decide what migration direction to take. Thanks]]>Mike McCutcheonGISTue, 08 Oct 2013 12:11:05 +0000http://forums.mysql.com/read.php?23,595170,595170#msg-595170Distance in meters between two points (1 reply)http://forums.mysql.com/read.php?23,595170,595170#msg-595170
I tried the most basic GIS function, the distance between two points. Looking at the documentation I found the glength, however this function returns the distance in degree. Looking further I found the udf functions distance_sphere() and distance_spheroid(), however I tried to compile to MySql 5.6 and I got a lot of errors.
So my question is, how can I calculate the distance in meter between two points on MySql 5.6?

Many thanks
Flavio]]>Flavio TobiasGISTue, 08 Oct 2013 11:52:43 +0000http://forums.mysql.com/read.php?23,590713,590713#msg-590713Metric used in MYSQL Spatial (1 reply)http://forums.mysql.com/read.php?23,590713,590713#msg-590713
For example, I have the following table that created to store point geometry for multiple records.

After running this query, I do get some records, but the distance does not seem to be in Miles or meters. ..its some fractional value like 0.0123, 0.0145...etc

I could not find any documentation on this anywhere in MySQL?. Does anyone know what metric system is in use in MySQL?..and if there is , how can I convert it into miles?

That means, if I need to run the query above to fetch all records within one mile, how do I reconstruct it?. Thanks in advance.]]>AJAY WARRIERGISSun, 21 Jul 2013 12:05:37 +0000http://forums.mysql.com/read.php?23,588363,588363#msg-588363How to create a Circle in MySQL spatial (1 reply)http://forums.mysql.com/read.php?23,588363,588363#msg-588363
Basically what i want to do is create a Circular geo fence with co-ordinates of the center and a fixed radius. is that even possible with mySQL Spatial

This works great until I try to do a large search - itinerary spanning all of France.
I send a polygon containing 2384 points.
The stored procedure takes 197 seconds (3 minutes and 17 seconds) = far too long.

Can anyone advise me as to how to optimise this / speed it up ?
At this time, my php script is being timed out by the apache server and I do not have any control over the apache installation.

I hope someone will be able to help here.]]>Simon GiddingsGISTue, 28 May 2013 15:01:44 +0000http://forums.mysql.com/read.php?23,584197,584197#msg-584197How To: Storing and retrieving spatial data on MySQL server with Connector/Net (no replies)http://forums.mysql.com/read.php?23,584197,584197#msg-584197
https://blogs.oracle.com/MySqlOnWindows/entry/howto_storing_and_retrieving_spatial]]>Edwin DesouzaGISWed, 17 Apr 2013 16:40:16 +0000http://forums.mysql.com/read.php?23,583685,583685#msg-583685How to add a point to existing linestrings in mysql? (no replies)http://forums.mysql.com/read.php?23,583685,583685#msg-583685
For example I have a Linestring as

I have a database containing a multipolygon and i want to query if selected coordinates are within this multypoligon in a specific range of dates.
I have found the GISWithin function (http://forums.mysql.com/read.php?23,286574,286574#msg-286574) which works correctly, but it is working a lot slower than the build in Within function, since i guess it does not use the spatial index on my GIS field. Below is the explain result for my query. Im missing a possible_key field which is a spatial index for the multipolygon field.

The build in WITHIN function seems to give false results, it looks like it uses MBR calculations.

Is there a way to test if the GIS functions in this distribution work in a correct way and not with MBR calculations.
If my mysql does not have the corrected within function is there any way to implement it into my distribution? Im very limited on building it from source.

Thank you for any help
Best regards
Jure]]>Jure ZakrajsekGISThu, 21 Mar 2013 15:03:44 +0000http://forums.mysql.com/read.php?23,574643,574643#msg-574643ST_Intersect (no replies)http://forums.mysql.com/read.php?23,574643,574643#msg-574643
I am having some troubles with the ST_Intersects on MySQL 5.6.7

I have two geometries: a polygon and a line with three points, two of them lie inside the polygon and the third is outside.

To my understanding, ST_Intersects should return 1 but it doesn't...
Here is an example query:

Any ideas?]]>N MGISMon, 26 Nov 2012 11:51:53 +0000http://forums.mysql.com/read.php?23,568508,568508#msg-568508join on (1 reply)http://forums.mysql.com/read.php?23,568508,568508#msg-568508
I have to select the posts from the table `Dammreg` under condition that the string in the DNAM field includes the string from the field Damm_vk.NAMN
I have used the following sentence:

Erlier I read the thread about error:#1066 and some other threads but still can not find what is wrong.

Server version: 5.1.63-0+squeeze1
Many thanks in advance]]>Jacek GancarsonGISTue, 16 Oct 2012 23:34:39 +0000http://forums.mysql.com/read.php?23,564483,564483#msg-564483Names of polygons (2 replies)http://forums.mysql.com/read.php?23,564483,564483#msg-564483
How do I add a name to each polygon and then get the name back when I have a "Within" result

Many thanks
Martin]]>Martin JonesGISSun, 09 Sep 2012 12:05:58 +0000http://forums.mysql.com/read.php?23,564353,564353#msg-564353Cannot get geometry object from data you send to the GEOMETRY field (1 reply)http://forums.mysql.com/read.php?23,564353,564353#msg-564353
I kept getting error:Cannot get geometry object from data you send to the GEOMETRY field

We have a POLYGON table TBL_BDY which has two columns :CODE, BDY .BDY is meant to be like a geometry column except the data type is text.

In the BDY column : the format of the latitude longitude is arranged as : 10 -10|1 -1|10 -10|.....and so on...it is seperated by a pipeline.

Can anyone please provide info on which branches I should be looking at for GIS?]]>P RGISTue, 12 Jun 2012 02:14:52 +0000http://forums.mysql.com/read.php?23,546357,546357#msg-546357Implementing efficient Geo IP location system in MySQL (no replies)http://forums.mysql.com/read.php?23,546357,546357#msg-546357
http://www.dbasquare.com/2012/06/01/implementing-efficient-geo-ip-location-system-in-mysql/]]>Edwin DesouzaGISFri, 01 Jun 2012 19:01:14 +0000http://forums.mysql.com/read.php?23,532466,532466#msg-532466Multi-dimensional data in SPACIAL types (1 reply)http://forums.mysql.com/read.php?23,532466,532466#msg-532466
I am wanting to create a schema that stores a chessboard. Seeing how a chessboard is somewhat like a grid or table (a two-dimensional object), I thought that we could use each point on the grid to store the piece value, and then index the values at each specific point in the 8x8 grid.

Basically the X-axis would represent ranks 1-8 in chess and the Y-axis would represent files A-H in chess.

This is not a valid query, but I thought maybe something like this might be what I wanted:

So I was wondering if anyone had any ideas they could share. From what I can see, the GEOMETRY type might be my best bet, but I spent a bit of time on Google and found no examples of its use.

Thanks,

- John]]>John NahlenGISTue, 12 Jun 2012 02:28:43 +0000http://forums.mysql.com/read.php?23,504489,504489#msg-504489Strange behavior with contains function and bounding rectangle (1 reply)http://forums.mysql.com/read.php?23,504489,504489#msg-504489
I imported a ESRI shapefile into mysql using two methods. GDAL (ogr2ogr) and Barend Kobben's shp2mysql. The shape files contains three countries (Kenya, Uganda and Tanzania). The insert of the geometry for each shape went without warnings or errors (see script link below).

Now, when I try to find out if a point is contained by a geometry using the function 'contains' in some cases returns two records when It should be just one and seems to happen because the bound rectangle. See this example image:

If I choose points that are contained within two bound rectangles (red dot in example image), the sql returns two records, if I use a point that is just contained by one bound rectangle (blue dot in example image) the sql returns positively just one . As far as I know the original shape file does not have bound rectangles as part of the shapes.

How can I ignore the bounding rectangle so I can select a point that is just inside the geometry of a shape? I thought that was the difference between 'contains' and 'MBRcontains'.

Running this query through phpMyAdmin I get the following message for both SQL statements:
# MySQL returned an empty result set (i.e. zero rows).

The data points shown in the above SET @bbox are from 4 corners of the US (entered clockwise) and should return 99% of all points but returns nothing. Here are the coordinates:
San Diego, CA: +32.70 -117.16
Seatle, WA: 47.97 -122.19
Bangor, Maine: 44.80 -68.77
Miami, FL: 25.77 -80.19

I have also tried this against over 3500 polygons from the NWS CAP 1.1 feed and I get nothing! I figure I must be doing something wrong but, for the life of me, I can't figure out what it is!