Questions tagged [spatial-query]

A query for geometric features based on their spatial relationship.

Filter by
Sorted by
Tagged with
1
vote
1answer
20 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 ...
0
votes
1answer
63 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
0answers
43 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
66 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
9 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
468 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 ...
1
vote
2answers
58 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
38 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
1answer
101 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 ...
4
votes
1answer
218 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 ...
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 ...
2
votes
2answers
114 views

Generate a list of intersected layers QGIS

Apologies, im very new to QGIS and there's a chance what I'm asking for isn't actually what I require. Let me explain. I'm working with a project with multiple layers. I have a layer (let's call it ...
0
votes
2answers
86 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
53 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
41 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
54 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
72 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 ...
0
votes
2answers
871 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 ...
6
votes
2answers
15k views

PostGIS ST within does not exist

I'm quite new to postgresql and postgis so this error will probably due to some rookie mistake. I want to run the spatial query ST_within. When I describe the query like this SELECT nw.entity_id AS ...
3
votes
2answers
1k views

Spatial Definition Queries?

Is it possible to spatially pre-clip layers (say with a IPolygon object) before they are loaded into ArcMap? This would be a bit like a query definition but spatial and for raster data.
1
vote
1answer
224 views

Running loop in query in PostGIS

I am new to PostGIS. I have a table of buildings each having a value for number of people living in it. I would like to calculate the total value (sum of number of people) in all buildings which ...
2
votes
0answers
208 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
98 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
135 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
55 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 ...
3
votes
1answer
4k views

Get the width and height of a rectangular polygon in PostGIS

I have a table with point features saved in the my PostgreSQL database, and I can run the following query to get the extent of the point features and I turned the extent back into a geometry: SELECT ...
1
vote
3answers
289 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
51 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
162 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
100 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
3answers
2k views

drawing concentric circles in arcmap 10.1

I am using ArcMap 10.1 and I would like to know if there is a way to draw circles at a specific distance from a georeferenced coordinate. I have a property and I would like to know how far you can ...
2
votes
2answers
274 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 ...
0
votes
1answer
91 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 ...
2
votes
0answers
762 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
2answers
147 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 ...
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
283 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 ...
2
votes
1answer
118 views

What is the correct (QGIS) syntax for a masked PostQIS spatial query?

What is the correct syntax if I want to query a masked region from PostGIS from inside QGIS ? The data is from "planet_osm_poly" (imported via osm2pgsql) and I'd like to use a polygon from a ...
0
votes
2answers
760 views

Counting number of points/lines/polygons contained within polygon when feature to count is from server?

I'm currently running a study where I need to query the number of points/lines/polygons that are contained within a project boundary - intersecting lines and polygons need to be counted as well. The ...
1
vote
2answers
182 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
546 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.
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
279 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.
0
votes
0answers
64 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
2answers
482 views

Extracting data from four intersecting polygon layers in PostGIS?

I've been using the following code in PostgreSQL/PostGIS for the last year, as needed, which is about once a quarter. It works OK, it's just that it takes days to run. With over 25,000 parcels making ...
0
votes
1answer
45 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
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 ...