Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [spatial-query]

A query for geometric features based on their spatial relationship.

Filter by
Sorted by
Tagged with
1
vote
1answer
208 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 ...
0
votes
1answer
52 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
28 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
30 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 ...
4
votes
1answer
167 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
2answers
40 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 ...
1
vote
1answer
55 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
1answer
43 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 ...
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
2answers
315 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
2answers
352 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
3answers
217 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
43 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
67 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
51 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
158 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
49 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
363 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
107 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
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
123 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
115 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
742 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
90 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
308 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
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 ...
0
votes
1answer
149 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
56 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
58 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
468 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
32 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
452 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
258 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-...
-1
votes
1answer
251 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 ...
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 = ...
4
votes
3answers
1k views

Selecting Counties within Region via Spatial Query using QGIS/PostGIS?

I'm using GQIS 2.2 and PostGIS on Postgresql 9.3. I have 5 regions in the contiguous United States. Each region has states, and each state has counties. I would like to think that the data I'm given ...
2
votes
1answer
149 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 ...
1
vote
1answer
102 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
177 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. ...
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 ...
2
votes
0answers
66 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
154 views

Selecting line between two polygons using MapInfo?

Just wondering if its possible to extract a line that between two polygons - hopefully the image illustrates this well - I want to extract Line A-B. I'm using MapInfo. Currently I've used the ...
6
votes
4answers
959 views

Is there a way to use a spatial query to invert X and Y coordinates in QGIS?

Original problem : I tend to often invert X & Y in WGS84 lat/long CSV import. I'm wondering now if there is a way not to reimport the original file (as this is the basic solution for points) and ...
0
votes
2answers
174 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
146 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
131 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? ...
0
votes
1answer
318 views

ArcGIS Python API FeatureLayer query by buffered point

I am really running into some problems with the Python API, I am trying to query a feature layer and return all results that fall within a certain distance of a supplied point. According to the docs ...
1
vote
1answer
434 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. ...