Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [spatial-query]

A query for geometric features based on their spatial relationship.

Filter by
Sorted by
Tagged with
2
votes
1answer
39 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 ...
1
vote
3answers
202 views

PostGIS : closest line from a point

I need to identify the closest line from a point. Elements are stored in a postgreSQL/postGIS database, in the same projection. From a point (geom multipoint to be specific), I need to identify the ...
1
vote
1answer
42 views

Optmizing PostGIS minimum distance query

I have the field_1 of my Table_1 that must have the minimum distance between the geometry of my Table_1 and any geometry of my Table_2. To do so, I used a CROSS JOIN (Full Cartesian Product) between ...
2
votes
2answers
60 views

Selecting lines where start and end points within polygon using Virtual Layer

In QGIS 2.18 project there are several layers, lines and polygons respectively My task is to select all lines when their start and end points are laying within polygons using Virtual Layer, see image ...
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 ...
2
votes
2answers
142 views

Comparing and find out which feature has highest shape area in QGIS?

I need to find out which polygon is having more area by filtering unique ID. the problem is I have 1000 of features which I need to find out highest occupied area for every unique value... since I ...
2
votes
0answers
281 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 ...
0
votes
1answer
80 views

Constructing query to return values from all polygons that line passes through using SpatiaLite? [closed]

I want an SQL query in Spatialite to return a list of values (Primary Key in this case, but could be any value) from all the polygons which are crossed by a line. Say, for example, a footpath passes ...
1
vote
2answers
116 views

Spatial query with clip (PostGIS)

I'm making the transition from GIS to PostGIS and am stuck on this spatial query. I have background geometry (purple, outlined red) which has an overlay of islands (blue, below); I need the area of ...
0
votes
1answer
45 views

How to perform Spatial Query to remove features that intersect/touch/overlap in QGIS?

I have two polygon layers and many of the features are identical (or should be identical). I want to isolate only the features that are in one layer but not the other. I'm using QGIS 3 and I tried ...
1
vote
2answers
77 views

MySQL, geoPHP, select sites near the current site

I'm working with archaeological sites, stored as polygons in a MariaDB 10.3 table, and I have PHP 7.2 with GEOS and geoPHP available. I'm creating a page that displays all the related information for ...
1
vote
1answer
259 views

Spatial Query Tool in QGIS 3.4

I'm relatively new to using QGIS and GIS platforms in general. I'm following a guided exercise in QGIS and need to use the 'Spatial Query Tool', however I can't seem to find it anywhere in QGIS 3.4.
0
votes
1answer
43 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 ...
3
votes
2answers
68 views

Locating where different polygons (buffer rings) from different layers are intersected based on same attribute value (QGIS)

I need to locate where different polygons (buffer rings) from different layers are intersected based on a same attribute value. As shown in the figure, there are different buffer rings from different ...
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 ...
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 ...
1
vote
2answers
57 views

How can I check if two attributes match between a point and the area within which the point is located? in QGIS

I would like to verify a geocoding process. I have used googles API and have geocoded about 35.000 adresses within Austria. By inspecting the locations it is obvious that a few lie outside of Austria (...
0
votes
1answer
31 views

Conditional join or query of two layers

I have two layers that I'm trying to conditionally join. One layer JUNCTIONS has junction IDs (NAME) and flooding volumes (Flood_cf) for each junction. I'm interested in identifying and symbolizing ...
0
votes
2answers
289 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
387 views

Spatial join attributes based on closest point in PostGIS

I have two point tables from which I want to extract a value from one table to the other, based on the nearest distance of those two points. t1 t2 id | value id 1 | 100 1 ...
2
votes
0answers
246 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-...
3
votes
1answer
38 views

Making UPDATE for coordinate does not return the same value

Being totally new with PostGIS, I am trying to UPDATE one of my column on my table. The column itself is called 'center_point' with type of GEOGRAPHY(Point,4326) UPDATE cities SET center_point = ...
1
vote
1answer
93 views

Using multiple St_Dwithin clause result in a huge performance loss

In PostgreSQL using PostGIS, I want to find every point which are close enough of some other points but which also are far enough from another points series. So here is my query : SELECT pod.id, ...
3
votes
2answers
173 views

Test if a spatial query contains another

I have two tables : country and regions. Country contains all the Europeans countries and regions contains some subdivisions of those countries. I created a small Union of some countries and regions. ...
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)!!
0
votes
2answers
150 views

Oracle - find N neighbors (points) of a point within a radio

I have this table, there it goes a sample output to show that it is a point select SDO_UTIL.TO_WKTGEOMETRY(geo) from places where id=1 _______________________________________________________ POINT ...
2
votes
1answer
140 views

Finding number of point features located within a polygon layer using L.esri.query

I am new to JavaScript and Leaflet, so please bear with me. I am working on a Leaflet map in which I am calling in two separate REST layers, a point layer (heritage trees) and polygon layer (...
0
votes
1answer
126 views

How to select features that are outside the boundary of a polygon

I have a polygon that there are some partitions inside its boundary and some partitions outside its boundary. My question is how to select the partitions that are outside the boundary of the polygon? ...
1
vote
1answer
49 views

Can a spatial query be run within the GUPS software for Census LUCA review?

I am currently conducting a LUCA review on address points within our locality for the decennial census review. The software provided is called GUPS; however, it is QGIS based with custom plugins. I ...
1
vote
1answer
398 views

Improving the speed of a Postgis spatial query

I have a query that is slow on PostgreSQL 9 + PostGIS (running on a Linux computer), despite my efforts to improve its speed. I basically have a table that contains Polygons called polygones_zones. ...
2
votes
1answer
55 views

QGIS spatial query - points within certian elevation contour intervals

I'm struggling to find a way to identify all the points within certain contour intervals. I have a raster dataset that I generated a contour map from. Within the region of interest, I have a specific ...
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 ...
1
vote
1answer
506 views

ST_Contains for 3D geometry

I want to query which ward contains the most cycle stations (a cycle station is a 3D geometry i.e. polyhedral) - the wards are 2D polygons - below is what I have worked out so far - The error I get ...
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
1answer
463 views

How can we export selected features from multple shapefiles in a single step

I have made a spatial query in ArcGIS where i am selecting features from multiple layers from a single source. How can I export all the selected features from multiple layers at a single step?
10
votes
3answers
9k views

Where is Spatial query in QGIS3?

I just installed QGIS 3.0 EA. I wonder where the Spatial query is? There is a ”count points in polygon” in the toolbox but it can’t count point within a polygon.
1
vote
0answers
43 views

Spatial query and sending SMS - Which techno on mobile? [closed]

I would like to set up a mobile application to send SMS messages to nearby contacts. To make it simple, here are the steps in the process: The user opens the app and adds a point on the map. A script ...
1
vote
1answer
742 views

Spatial Query for a Virtual Layer

I would like to use SQL to create a virtual layer in QGIS by clipping information from a large data set using a bounding box around my study area. I have two questions. Is this an efficient way to ...
2
votes
1answer
144 views

ArcObjects spatial filter not working for File Geodatabase

I do not know why my tool no longer functions properly when working in a file geodatabase (FGDB), as opposed to the personal geodatabases (PGDB) used in the past. The tool is used to find feature in ...
0
votes
1answer
244 views

Finding POIs in Postgresql around point

I'm trying to select POIs from around given location within some distance. I tried so far two approaches I found online, but unfortunately none seems to be working - I'm getting no rows despite the ...
3
votes
1answer
51 views

One Record Two Point Geometries - Point-in-polygon

The trip data contains the origin-destination of each trip, and both origin and destination are stored as geometries. How could I retrieve the origin and destination polygons that the points are ...
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 ...
3
votes
2answers
273 views

QGIS Spatial query error

I have a layer of a csv file with around 700k rows and a polygon layer, both are in wgs84. I'm trying with the spatial query to calculate what point are in the polygons. The problem is that the ...
-1
votes
1answer
241 views

ST_Covers returning false with PostgreSQL/PostGIS

I have two lon/lats that I've turned into geometry. I've tried having the column type being both text and geometry. I have a fence_geom and a user_geom. I am looking to test to see if the user is ...
0
votes
1answer
145 views

Counting points out of polygon using QGIS?

I would like to count the amount of points that are out of the polygon because I need to sum them. I know how to count how many points are inside but in need to find how many there are outside.
1
vote
1answer
276 views

PyQGIS spatial query geometry function disjoint incorrect output

legend=iface.legendInterface() layers=legend.layers() layer1=layers[0] layer2=layers[2] pointCounter=0 for pointFeat in layer1.getFeatures(): pointGeom=pointFeat.geometry() for polyFeat in ...
4
votes
1answer
163 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 ...
2
votes
2answers
101 views

How do apps like zillow serve up data?

I'm a total newbie to GIS, but attempting to build an app similar to zillows that quickly serves up data based on user input. Currently, i'm collecting the data via shp files which are being store ...
1
vote
1answer
57 views

OGC Filter Specification in Xpath

I've got some XML documents which conform to a known schema which include geometries in GML format. I'm looking to perform validation on the XML using XSD and Schematron, but I'll need some way of ...
4
votes
1answer
2k views

Finding State, County, Place, and Census Block FIPS codes from a coordinate (latitude and longitude)

I am looking for a way to gather the political areas (ie FIPS codes) from a latitude and longitude coordinate. For example, if I were to input the coordinates: 47.66955, -122.31259 (Downtown Seattle),...