Questions tagged [mysql-spatial]

MySQL spatial refers to the Extensions for Spatial Data, that enable the generation, storage, and analysis of geographic features.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
1k views

Find all points near a point within a radius MySql 8.0 (SRID 4326)

This question is targeted to MySQL 8.0 with its new spatial features. Given the following table: CREATE TABLE `places` ( `id` INT(11) UNSIGNED NOT NULL, `location` POINT NOT NULL SRID 4326, ...
3
votes
0answers
82 views

In MySQL are there unidirectional and directional graphs?

I'm new to MySQL and studying about geospatial data. I have read the documentation of MySQL and learned about the ST_Geometry type, its subtypes and its functions; but I didn't find anything about ...
2
votes
0answers
453 views

Optimizing MySQL query to select all points with in a large polygon using spatial indexes

Re-posting it from stackoverflow as per their suggestion. Link to the thread in stackoverflow https://stackoverflow.com/questions/53182385/optimizing-mysql-query-to-select-all-points-with-in-polygon-...
2
votes
0answers
179 views

Query WKT from BLOB in mysql

I am trying to query a table in MySQL which contains spatial data. Out of all the columns, I have one column called "pt". Each entry in this field is specified as 'BLOB'. In my MySQL workbench 6.3,...
2
votes
0answers
459 views

Find closest points between two tables in MySQL with Spatial extensions

I have a two tables: one with trackings points and one with shops. I want the trackings points that have 1 or more shops within a certain distance from that point. What I have now: SELECT a.*, b....
2
votes
1answer
1k views

Store .shp to MySQL database with QGIS

I'm using QGIS 2.10 (Pisa) and I can´t store spatial information on my MySQL database (.shp or geojson). In previous versions that was allowed. It's not supported anymore or there are any plugins or ...
1
vote
0answers
30 views

MySQL performance issue with ST_Contains not using spatial index

We are having what seems to be a fairly large mysql performance issue on trying to run a fairly simple update statement. We have a table(1.8mil) with houses that contains a Lat+Long geometry point ...
1
vote
1answer
303 views

MySQL 5.7 and how to store WGS 84 Coordinates

I want to store WGS84 coordinates in a MySQL 5.7 database. After much reading, I think I should use the POINT datatype with a SPATIAL INDEX. But I am very confused about SRSs, SRIDs, lat/long vs long/...
1
vote
0answers
84 views

Show MySQL vector data on QGIS canvas

I am a novice to Python and QGIS coding. I am facing an issue while showing the MySQL spatial data on QGIS canvas. Database connection details are below: database name:- mysql host :- localhost port :...
1
vote
0answers
305 views

What is geometry(4326), and can you do Cartesian calculations with unprojected ellipsoidal coordinates?

I know Geography(4326) is an unbounded, and unprojected, and covers the entire world with ellipsoidal coordinates. I get that the math on this system is done on a spheroid. I also get that with a ...
1
vote
0answers
178 views

Result of ST_Contains gives false positive

I am trying to figure out the state that Berlin is in. So now my query SELECT * FROM states WHERE ST_Contains(Geo, Point(13.383068, 52.530644)); return two results. One for Berlin which is correct, ...
1
vote
0answers
129 views

Build a tile server using MySQL as backend

I need to set up a tile server using MySQL but cannot find any documentation for it. I have done it with Postgres by following this link and it works fine. I understand that after downloading the ...
1
vote
0answers
540 views

Find single nearest point of point in mysql

I have an app that formerly used PostgreSQL with PostGIS but now the environment changes and I have to use MySql. In my app i had a database query that searches the nearest point to a point. Note ...
1
vote
0answers
104 views

MySQL ST_Contains returning empty recordset?

Using MySQL 5.6, I have converted lat and lng fields into Points - using AsText, I can see this is OK. I have another table to hold the polygon data, and again using AsText, I can see the correct ...
1
vote
0answers
72 views

Are GIS tools suitable for physical capacity and placement management?

I'm a complete newbie to GIS systems, I've been watching some introductory videos about GIS but I'm not yet sure if GIS tools are the right tool for solving my problem. I have a database with ...
0
votes
0answers
38 views

Selecting routes in MySQL table that intersect with a given bounding box?

I have a MySQL table, that stores routes. The table stores the NorthEast and SouthWest coordinates of the route bounding box as POINT type. Also it stores 10 key coordinates along the route as a ...
0
votes
1answer
155 views

MySQL spatial slowed after upgrade to 8

After I updated MySQL from 5.7 to 8, spatial functions have become very slow. Specifically, this query: SELECT points3_.track_id AS track_id FROM waypoint points3_ WHERE ST_CONTAINS(ST_POLYFROMTEXT(...