Questions tagged [spatial-query]

A query for geometric features based on their spatial relationship.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
162 views

PyQGIS spatial operators(contains,equals,etc.) w.r.t. layer geometries(polygon,point,line,etc.)

I am trying to implement QGIS spatial query functionality in my plugin. I want to eliminate spatial operators which are not suitable for certain geometries. For eg. when I select layer with point ...
3
votes
0answers
43 views

QGIS Spatial Query Providers Issue

During the tutorial : http://www.qgistutorials.com/en/docs/performing_spatial_queries.html I have a error message like below. [ What is the providers mean? I really try to figure it out but ...
2
votes
1answer
30 views

Table join or virtual layer to match multiple points to geometry

I have: a non-spatial table of multiple test results with reference to non-unique locations, and a spatial layer that has all the locations (multiple results per location) I can do table joins ...
2
votes
0answers
268 views

DBeaver spatial output window: Is it possible to sync/filter spatial query to map bounds?

While upgrading PostGRES/PostGIS from 9.x to 11.x, I have discovered DBeaver and so far I am pleased. Apparently it has some spatial integration, including the ability to visualize spatial data ...
2
votes
0answers
240 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
65 views

Attribute Values not showing when running a query

The attribute values are not displayed for the 'Model Number' field when running a query yet the attributes are stored in the attribute table(When I say all unique, nothing comes up)!!
1
vote
1answer
49 views

Error message when trying to create a new layer using the Spatial Query tool

Simply trying to create a new layer where points (which represent tick occurrence) are contained within a UK boundary shapefile as opposed to working with points for the whole of Europe. When I try ...
1
vote
0answers
39 views

ArcGIS JavaScript API find the polygon a point belongs

I have a shapefile containing polygons and whenever a user searches an address I store latitude and longitude of the location. I want to know which polygon this address belongs and I have id assigned ...
1
vote
0answers
60 views

Generate Panel of overlapping features and export them to csv with GIS and Python

Given is a dataset, split into 250 .gml files, containing multiple vector layers. The features of interest are: parcels as polygons (~250k total), buildings as polygons (~350k total), addresses as ...
1
vote
0answers
117 views

Quickest Way to Calculate Land Area by Grid Cell in PostGIS

I have a grid vector table that covers the entire world and want to calculate the land area within each grid cell using another table that contains a single polygon for all continents. I tried the ...
1
vote
0answers
267 views

Querying for All OSM Street Intersections in PostGIS

I created a GIS database using an OSM datafile for a single city (from Geofabrik) and imported it into PostGIS using osm2pgsql. I have around 180K rows in osm_planet_line database, a manageable sie. ...
1
vote
0answers
135 views

Finding points around closest point of linestring ordered by distance using PostGIS?

I am looking for a way to improve my solution of the following problem in PostgreSQL (using PostGIS). Given a point A, a Linestring B and a series of (yellow) points spread all over the area in which ...
1
vote
0answers
180 views

Combining attributes of point data within buffer using QGIS?

I have city data broken down into intersections and roads. Around each intersection, I have created a buffer. I also have parcel data, including the attribute "gross tax 2015" for each parcel. I ...
1
vote
0answers
74 views

Select a polygon which is just partly member of another polygon with its area of the other polygon

I need to generate random points within geometries, which works quite good, but there are some small errors. Take the picture below. There are some greenish and redish Polygons(?!) which do not have ...
1
vote
0answers
57 views

Count gaps between polygon in spatialite

I have a database (.db) with a table that contains thousands of polygons containing id and geometry. I like a query that can get me the 'number of errors where there are gaps between polygons". How ...
1
vote
0answers
140 views

PoI Range query

I have a dataset of 100,000 PoIs represented by (id, name, longitude, latitude).. I would like to perform a large number (around 10,000) search operations on this dataset. each search operation ...
1
vote
0answers
672 views

Find area with highest relative density of one type of object

I'm using PostgreSQL/PostGIS and I have an advanced type of query. My database contains two types of object - let's say pubs and churches :) Is there a way that I can find the area with the densest ...
1
vote
0answers
769 views

How to add a MSSQL spatial layer using Python?

I'm having difficulty adding a MSSQL spatial data layer using Python. The database is password protected, and I can add the layer without any problems using the built in feature, but I can't make it ...
1
vote
2answers
327 views

How to apply a layer definition with a spatial query to a Dynamic layer?

Using the ArcGIS Server JavaScript API, it's possible to specify an attribute query in the form of a layerDefinition against a Dynamic layer. For example, the following query will restrict the layer ...
0
votes
1answer
42 views

Querying coastal roads using overpass-turbo

Is it possible to query overpass-turbo using some kind spatial filter? I would like to download "coastal" roads data, coastal currently being defined as within 0.20 km from the coast. The end goal ...
0
votes
0answers
55 views

Using a spatial query to filter the atlas pages in QGIS

I would need to create an atlas of all the map sheets (red rectangles) that refer to a specific municipal territory (for example the selected yellow polygon) as in the image. The atlas coverage layer ...
0
votes
2answers
282 views

How to extract Z data from a shapefile from points on another separate layer QGIS

I have two layers; one with elevation data (m), and the other with roads (derived from points via points to polyines). I want to run a spatial query that basically extracts the elevation data from the ...
0
votes
1answer
51 views

Saving borough boundaries as MultiLineStrings or MultiPolygons?

I am creating a database in PostGIS and I have a column that will save the boundaries of boroughs. The app will later query the database, asking what points, lines or polygons are inside those ...
0
votes
0answers
46 views

Creating query for set of polygons which would select adjacent polygons for which combined area is greater than number?

I have a set of parcels, represented as polygons shapefiles and I need to build a query, to select all the polygons, which are adjacent, with the sum of the areas of 2 polygons,greater than 1000 acres....
0
votes
0answers
119 views

PostGIS query taking too long. >400ms

The query is: Select COUNT(*) from highway_ref where (ST_DWithin(ST_Transform(highway_ref.geom,2163),ST_Transform(ST_GeomFromText('POINT(73.919595 18.5622609)', 4326),2163),500)) I am trying to find ...
0
votes
1answer
50 views

Improve Performance of ST_DWithin - H2GIS

I have a table seg_point, that I create like this: CREATE TABLE seg_point (id INT AUTO_INCREMENT PRIMARY KEY, segmentid TEXT, geom GEOMETRY); And I'm trying to improve the performance of this query ...