Questions tagged [spatial-query]

a special type of database query on geodata

A spatial query is a special type of database query supported by geodatabases and spatial databases.

Unlike non-spatial SQL queries, these queries use geometry data types such as points, lines and polygons and they consider the spatial relationship between these geometries.

Implementations vary between databases, for instance by adding an extension like for PostgreSQL or using a planar spatial data type like geometry in Microsoft SQL Server.

416 questions
-1
votes
1 answer

How can I use group functions on a spatial JOIN to update a table in MySQL?

I'm trying to update the total revenue for offices located in different geographies. The geographies are defined by circles and polygons which are both in the shapes.shape column. When I run the query below, MySQL throws "R_INVALID_GROUP_FUNC_USE:…
AndrewG
  • 1
  • 3
-1
votes
1 answer

Why is MySQL 8.0 over 1000 times slower than 5.7 to execute this SELECT query

I'm able to have both versions 5.7 and 8.0 of MySQL running on the same hardware (Windows 10 with NVMe SSD). The following query is over 1000 times faster to execute under MySQL 5.7 than MySQL 8.0: SELECT `oacode`,ST_asWKB(`shape`) as `shape` FROM …
-1
votes
2 answers

Trying to create a heatmap in SQL but there is something off about my Spatial data

I am trying to create a heatmap of customer orders across states. I am following this tutorial: https://www.mssqltips.com/sqlservertip/3550/sql-server-reporting-services-analytical-marker-maps-including-bing-maps/ However, for some reason, the…
Natan
  • 139
  • 2
  • 13
-1
votes
3 answers

Point within polygon using pointfromtext and geometry o multipolygon

I want to identify given point is in which polygon. i am using mysql database. Point is from text and multipolygon is in Shape column as geometry.i am using following query. SELECT ap.ac_name FROM andrapradesh ap WHERE…
-1
votes
1 answer

ORACLE SPATIAL ERROR

I created all_incidents_uni view, columns id, and ora_geometry I created index for view in user_sdo_geom_metadata When I create a layer in geoserver and open it layer clic to return this error Rendering process failed…
TIKO
  • 11
  • 1
  • 4
-1
votes
1 answer

Which data structure should I use to store large 10,000 data set and do fastest search ,and take least memory?

*Suppose I have 10,000 circle(x,y,r) values , and i want to find a point (p1,p2) lies in which circle , to get fastest response for this query what data structure should i use to store those 10,000 circle data. It is a static data ,means one time…
SK17
  • 182
  • 4
  • 15
-1
votes
1 answer

2D data point range query

I am working with a huge 2d dataset and need a range query for every point, returning the neighbours within a range as a set I already have tested using an index with KD Tree form sk learn, but the problem is, it returns the index as a list and the…
Felix Ha
  • 401
  • 5
  • 11
-1
votes
1 answer

whether or not to use sqlite/spatialite on Android with only 29k rows

I'm trying to figure out whether or not to use sqlite/spatialite on Android with only 29k rows. I just need to find the nearest locations from the user everytime they move outside 100 meters which could be about every 10 minutes. I feel like running…
Jisike
  • 383
  • 1
  • 3
  • 11
-1
votes
1 answer

SQL-Server 2008 R2 geoSpatial query error for Circular String

SQL Spatial Features: SQL geometry Point, Linestring working well but the Circular string is not working. When i try to save the CircularString type data to my geometry datatype its throws the following error: My statement: DECLARE @g1 geometry =…
-3
votes
1 answer

Is there an Aggregate function that functions similarly to STUnion()?

I see that there is something called STUnion() which will union the result of one geography type with another. But is is possible to do that over an entire data set like an aggregate function? Or if not, is there a performant equivalent?
Alexander Ryan Baggett
  • 2,347
  • 4
  • 34
  • 61
-3
votes
1 answer

Spatial query in sql database

hi I am currently developing a geo location based app which updates the user's location and displays the shops around him, I am using ordinary sql queries in sql database .My php code to select the shops around the user is : /* *…
user3781907
  • 109
  • 1
  • 4
  • 13
1 2 3
27
28