Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A query for geometric features based on their spatial relationship.

1
vote
1answer
47 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
145 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. ...
0
votes
0answers
14 views

NetworkX - Indexed Spatial node queries?

I'm trying to extract a Road Network from a large set of GPS point data gathered from vehicles. I plan on representing the final network in terms of a NetworkX graph of G(V,E) I have implemented ...
2
votes
0answers
22 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
29 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
45 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
42 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
42 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 ...
0
votes
0answers
50 views

Spatial Filter/query a WFS (qgis)

I am currently trying to make a query on a WFS layer, as described in https://docs.qgis.org/testing/en/docs/training_manual/online_resources/wfs.html . However, i want to do a spatial query. This ...
1
vote
1answer
66 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
40 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
38 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
112 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
29 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
47 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?
5
votes
3answers
3k 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
30 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
162 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 ...
3
votes
1answer
75 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
87 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
40 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
34 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
128 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 ...
0
votes
0answers
45 views

When does nearest neighbor PostGIS query need to be measured in meters?

When you use geography type in postGIS, the default measurements are in degrees. There are numerous approaches and I cannot decide which one is the best. In "PostGIS in Action" book (ISBN: ...
-1
votes
1answer
100 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
50 views

How to count points out of the polygon

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
139 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
0answers
110 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
0answers
50 views

improving query efficiency in postgis

I have three tables: one with points, one with 10m resolution rasters, and one with 30m resolution rasters. I am doing a simple update to the points table based on pixel values in each of the raster ...
1
vote
2answers
52 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
32 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
556 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),...
0
votes
2answers
93 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 ...
1
vote
2answers
120 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
0answers
52 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 ...
0
votes
0answers
34 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....
2
votes
1answer
119 views

Count points not in polygon in QGIS (difference between points and layers give unexpected result)

I have a layer of 130 points and another layer of driving distances as 6 polygon features When I use the count points in polygons I get a running total of the number of points in each polygon feature (...
3
votes
1answer
95 views

Addresses within radius of vector layer in QGIS

I want a CSV file of all addresses that intersect with historical stream features. Currently, I have 3 datasets (see my blog) for this in QGIS 2.16.3 (MacOSX): a layer (.gdb) of historical stream ...
1
vote
1answer
121 views

QGIS Spatial query (joining two layers)

I have two shapefiles. One is a point layer of trees, the other is a polygon of cadastral boundaries. I want to spatially join these two layers so that I get the information, on which cadastral ...
0
votes
1answer
177 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 ...
0
votes
2answers
170 views

automated spatial Query QGIS

I'm using QGIS 2.18.3 (Las Palmas). In order to determine the number of buildings within a district I'm using spatial Query in QGIS. I filter out the specific district within my city-layer so I can ...
2
votes
1answer
483 views

Finding polygons inside polygons from a shapefile in QGIS

I have a parcels shapefile that contains polygons. Condos are also drawn, but inside the master lot. I want to be able to grab all the condos inside the master lot. I saw this question/answer: ...
1
vote
2answers
376 views

Get <canvas> features inside a rectangle after drawing it

Let's start with https://jsfiddle.net/ziyuang/dfekwzhd/ Say, now I want to allow users to specify areas by drawing rectangles. After the map having a rectangular area, I want to have the information, ...
0
votes
0answers
88 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 ...
1
vote
1answer
257 views

How to query “not contains” in ArcGIS Server REST API?

I want to query data that is not in a specified polygon in ArcGIS Server Rest API. How can I achieve this like below image?
5
votes
4answers
416 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
305 views

Performing spatial queries in Leaflet?

I have two Layers which I added to the map using WMS service. Is there a way to perform spatial queries using Lealflet, for example; Intersection, Distance...?
1
vote
0answers
95 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 ...
4
votes
1answer
171 views

Is it possible to have R write out .sbn and .sbx files?

I'm working on an situation where a client wants, in addition to the .shp & .prj files that I can produce with e.g. rgdal::writeOGR, the .sbn & .sbx files as well. My understanding is this is ...
3
votes
3answers
363 views

List IDs of polygons within another polygon in the attribute table

I have two polygon shapefiles in QGIS I would like to have the polygon IDs of B listed in the attribute table of A for the case that they overlap. As a demonstration: I tried combinations of ...