Questions tagged [mysql-spatial]

MySQL implements spatial extensions following the specification of the Open Geospatial Consortium (OGC).

52 questions
0
votes
1 answer

How To find the nearest distance along a polyline Mysql

I am building a ride sharing application. The application has a feature for searching drivers. The drivers (employees in a work hub) can choose a route to their destination from the app. The passengers, who also belong to the work hub, and are…
user4206843
0
votes
0 answers

What is the JSON format to pass POINT data type values?

I am using Java, Spring boot, MySQL and data JPA. Check my code here @Column(name = "point", columnDefinition = "POINT") private Point point; And in my application.properties file, I've Added spring.jpa.properties.hibernate.dialect =…
Lokesh Ch
  • 11
  • 6
0
votes
1 answer

How to translate a PostGIS query to MySQL spatial query

I need to translate this PostGIS query: SELECT boundary ST_Intersects(ST_SetSRID(ST_Buffer(ST_MakePoint(11.255492,43.779251),0.002), 4326), ST_GeomFromKML(boundary)) as intersect, FROM mytable WHERE …
DaFois
  • 2,197
  • 8
  • 26
  • 43
0
votes
0 answers

ogr2ogr error: "Unable to initialize connection to the server ...."

I am getting the error detailed in the screenshot below when running ogr2ogr. The command used worked on my other computer. I am wondering if this is an error that is triggering because I do not have proper permissions. One last detail: the…
DIDS_421
  • 35
  • 5
0
votes
1 answer

MySQL 8.0 ST_CONTAINS returns records outside polygon, and misses records within polygon

I'm facing discrepancies when using mysql's st_contains. I have a table of zones which has their latitude and longitude columns, I simply want to query all records that fall within the polygon. When I do this mysql returns records outside the…
Ron
  • 513
  • 1
  • 4
  • 22
0
votes
1 answer

mysql calculate distance for returnning location

This is not a duplicate of: Find distance between two points using latitude and longitude in mysql I tried the query and it's not working, I get empty data set and 0 as the answer. SEE answer, THAT is the solution, I don't know why this question…
yenk
  • 219
  • 2
  • 12
0
votes
1 answer

Overriding Laravel Model View

I'm attempting to handle map marker locations as natively as possible using MySQL spatial data types. I don't want to resort to additional columns for lat and lng, as eventually, I want to be able to encode lines and polygons (and other geometries)…
Erich
  • 2,408
  • 18
  • 40
0
votes
0 answers

MySql spatial: `ST_Contains(g1,g2) || ST_Touches(g1, g2)` vs `ST_distance(g1,g2)=0`

I use mysql spatial functions. I have to understand if points lies withing multipolygon.Birder must be included. My expriments showed that ST_Contains does not include border of Multipolygon So for now I have 2 solutions which looks like working: 1.…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
2 answers

Mysql: find polygon within certain radius

In my database I have polygons stored. Now I need to search all the polygons that are within a certain radius. Even if the polygon is only a small part inside the region, then it should be included inside the results (so once there is a minimal…
0
votes
0 answers

Routing Algorithm with Spatial SQL

currently, I search for a solution to speed up my code. I have a DB with different geometrical components (Points, Polygons). Each Structure is given by several properties called Con_Number (default: 0), LayerName, individual Index (ObjectIndex).…
Jacks
  • 67
  • 5
0
votes
1 answer

How can I correctly set the value of a field having type point in a MySql database?

I am not so into geospatial data and I have the following problem. I am using MySql and I am finding some difficulties trying to add the value of a field having point as type in this table rows. I have a table like this: CREATE TABLE MarketDetails…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
2 answers

Spatial Geomety SQL - two exact same queries one works the other doesn't

This is bizzarre I have a database that stores polygons and a query running that checks if a point exists within any polygon and retrieves them. However when the query is created as an sql string in my php code it returns nothing however if I type…
Ali
  • 7,353
  • 20
  • 103
  • 161
0
votes
1 answer

Why I obtain different values calculating distance between two point in the space using this "Great-circle distance" formula and Google Earth tool?

I am not so into database and GIS and I have the following doubt about this function used on a MySql database to calculate the distance between 2 points. I am started from this tutorial where there is this function used to calculate the distance…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
1 answer

Why I obtain this error when I try to create this funcion (that use point data type) on a MariaDB database?

I am not so into database and I have the following doubt implementing this tutorial: https://mariadb.org/jquery-and-gis-distance-in-mariadb/ So basically my doubt is relate to this SQL statment that create a function to calculate the distance…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
0 answers

How to convert in km the distance of this MySql geographical query that inds all the points of interest into a distance range from a center point?

I am not so into database and I am working on a MySql geographical query that have to find all the points of interest that are into a specified distance range from a center point. Following this tutorial:…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596