Questions tagged [mysql-spatial]
MySQL spatial refers to the Extensions for Spatial Data, that enable the generation, storage, and analysis of geographic features.
16
questions with no upvoted or accepted answers
4
votes
0answers
2k 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 ...
3
votes
0answers
190 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
537 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
477 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
29 views
HIFLD Railroads DB contains coordinates that don't make sense
I downloaded the HIFLD Railroads DB and imported it into MySQL with OSGeo4W. I then do this query and the coordinates I get just don't make sense:
SELECT ST_AsGeoJson(SHAPE)
FROM railroads
WHERE ...
1
vote
0answers
92 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
0answers
93 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
428 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
1answer
213 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
134 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
641 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
107 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
1answer
184 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(...