Questions tagged [spatial-query]

A query for geometric features based on their spatial relationship.

Filter by
Sorted by
Tagged with
2
votes
1answer
30 views

PostGIS: Creating Polygon from lots of other geometries and then returning list of ID's in the same query

I am fairly new to all of this but in simplistic terms I have the following problem: I need to create lines from points, and from said points group all of those within n distance of one another. From ...
0
votes
1answer
14 views

How to build a GET request from a CSW POST request

For accessing some data in a GeoNetwork metadata catalogue using CSW, I would need the URL for a GET request that would include also a geospatial filter (bounding box) and a time of interest (start ...
0
votes
1answer
22 views

How to “Select By Location” in ArcGIS Server JavaScript API

Is it possible to perform the equivalent of "select by location" in the ArcGIS Server JavaScript API v4.x? The use-case is "find features in Layer 1 which are within x kilometres of ...
0
votes
0answers
37 views

Spatial Index warning from Spatial Query

I'm trying a spatial query using QGIS version 3.10 using a buffer layer and a set of species records. I wish to know how many species records fall within the buffer. When I perform the spatial query ...
1
vote
1answer
22 views

Does ArcGIS Server support querying multiple layers of service in single request?

I am using ArcGIS REST services from a server-side app and parsing the JSON response. I need information from several different layers on the same service, and my queries are always for points. Is ...
3
votes
0answers
44 views

Symbolize thousands of polygons to identify similar geometries

I would like to categorize polygons with a similar enough geometry so such similarities can identified at a city-wide scale. I'm trying to identify if street layout is a useful spatial characteristic ...
2
votes
2answers
73 views

How do I precisely select lines within a polygon in QGIS?

I want to select lines (bahnstrecken) within a polygon (bundesland). My goal is a selection shown in the following screenshot, which I did manually. Before I used two tools: I converted the polygons ...
0
votes
0answers
10 views

Performing spatial queries with the SODA API in Python

I am trying to fetch data from data.cityofnewyork.us with the Python client sodapy. It generally works as it should, but I just can't figure out how to perform spatial queries. For example, I would ...
1
vote
2answers
60 views

Spatial query to return multiple values

I have a woodland scheme advice layer that has a polygon for each area of advice (brown layer in the picture). I also have a polygon layer of UK local authorities (red boundary layer in the picture). ...
1
vote
1answer
22 views

How to find features from edge_id in PostGIS topology?

I have created topology for a set of tables with PostGIS topology extension. Now, I want to get all linear features (which could be in different tables) connected to a particular line using a non-...
1
vote
1answer
44 views

Change GeoPandas column value from PostGIS query

I have some QGIS layers and I am performing some spatial queries with them using GeoPandas. I'm using psycopg2 to make a connection to a local PostgreSQL/PostGIS database. Then I use the read_postgis()...
0
votes
2answers
94 views

QGIS Modeler: Extract by location, multiple predicates

I'm creating a processing model and would like to use the 'extract by location' tool, The problem is that when I choose this tool from the 'Algorithms' in the model creator, I cant find the double ...
2
votes
0answers
61 views

How to do nearest neighbor search more quickly?

I am currently using geopandas and scipy.spatial to do a nearest neighbor query. I have a data set of close to a million points and I need to find all of the closest points from another data set that ...
0
votes
0answers
45 views

How to change projection when querying SQL Server

I am querying an SQL Server and would like to change the projection from 25832 (a commonly used European format) to EPSG = 4326, which is required by packages like Leaflet. I am aware that there are ...
1
vote
0answers
21 views

Populating linestring column based on other table values (OSM nodes/ways)

I'm trying to populate a linestring column using points from another table. After reading a lot in this site and many experiments I'm still stuck. This is the table which I want to fill the road ...
0
votes
0answers
55 views

WFS request using layer extent or spatial query QGIS3

I'm trying to request features from wfs-service by using a virtual layer. Is it possible to load features by using a layer extent from a virtual layer? I know how to add dimension for a request with ...
1
vote
1answer
75 views

How do I perform a spatial query on this area? [closed]

I am in the process of trying to perform spatial analysis bike on bicycle trip data publicly found on Citibike's website. I want to extract data for each square in the rectangle (the boundary-lines ...
2
votes
0answers
228 views

Is it possible to query a geopackage (.gpkg) for features within a given bounding box?

I have GIS data with a very large layer stored within a geopackage from where I want to select features that fall within a bounding box calculated in my R session. I begin by creating a query string: ...
1
vote
1answer
103 views

Count subset of points in polygons

Being an SQL-noob, I found a working solution to generate a virtual layer with counts of points in the polygons of another layer, inspired by this https://gis.stackexchange.com/a/54680 SELECT ...
0
votes
2answers
142 views

ArcGIS JavaScript 3.3 add ArcGIS REST API Queried Feature Layer URL as Layer

Using the Query Generator on an ArcGIS REST Feature Layer, I generated a URL that filters the data by a geometry extent ({xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}) This returns Current River ...
2
votes
1answer
56 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
298 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
52 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 ...
3
votes
2answers
175 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
105 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
278 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
788 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
86 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
304 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
96 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
190 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
568 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
110 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
74 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 ...
0
votes
1answer
63 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
66 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
60 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
46 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
935 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 ...
1
vote
1answer
1k 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
481 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
39 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
140 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
204 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
89 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
401 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
189 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
207 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
57 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 ...
2
votes
1answer
1k 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. ...