Questions tagged [within]

The tag has no usage guidance.

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

Spatial Query for centroid of one feature falls within another

I am looking at doing a spatial query where I can find when the center of one feature falls within another. Both geometries are on different layers. For example, when the center (centroid) of an area (...
3
votes
3answers
61 views

Calculating value of unique points in polygon in PostGIS

I'm working with a spatial PostgreSQL database that contains species records, there is a point layer 'spp_points', each point has a "spp_ID" and "spp_score" field. I also have a ...
2
votes
1answer
62 views

Expression to show specific attribute of feature within (aggregate?)

I simply want to get a specific attribute (f.e. as label or default value in form) of a feature within another feature. Aggregate could do the job but it don't. Hard for me to write it down, so let ...
1
vote
1answer
83 views

OGR/Python- Check whether or not points are in a polygon

I have two shapefiles, one points file and one polygon. They are in the same projection (Lat/Long). I would like to run a quick command-line command or a Python script with the OGR module that creates ...
2
votes
1answer
100 views

Points within Polygons given certain conditions

I am trying to locate all the points within a set of polygons given a certain condition on the polygon in MongoDB using Python 3x. This question differs from the other ones because i) it requires ...
2
votes
0answers
179 views

More stable spatial sort using Shapely's within?

I was trying to use a modified version of the spatial sorting method illustrated in shapely's documentation, using only polygons exteriors (so that I can detect if a polygon lies inside another ...
1
vote
2answers
401 views

Find points within polygon with PostGIS really slow

From some millions of points I am trying to select those points that are within a polygon and save them into a new table. Both datasets with spatial index and both on projected coordinates. The query ...
2
votes
1answer
52 views

Taking attribute from multiple points within fixed distance

I have a list of point features each with a unique "ID". I need to run a fixed distance buffer on all 70,000 points to establish which points are within a fixed distance of each other than return the ...
8
votes
4answers
730 views

Labeling lines that are not within polygons using field calculator [duplicate]

I have two features. One line feature and another polygon feature. I want the line feature label not to appear when it is within a polygon similar to the one in the figure. That is, I want the label ...
1
vote
1answer
107 views

ST_Within with wrong results [closed]

I have a set of points and a polygon and want to select the points that are within the area. Both layers are in the same projection (WGS84 - EPSG: 4326) and are valid. To determine which points are ...
1
vote
0answers
62 views

What could cause a Spatial Join (Completely Within) to return false positives?

Im using ArcMap 10.3 I have a large feature class of Archaeological surveys that I need to Spatial Join to a target feature class of buffered work locations to find locations that are Completely ...
0
votes
0answers
73 views

Locating observations that lies within a collection of Polygons (Python)

I'm trying to locate the observations that lie within a collection of Polygons but my current implementation takes forever, and I suspect that it is because the 'within' method needs to check all ...
1
vote
1answer
346 views

What algorithm is used by the $geowithin operator of Mongodb

MongoDB can perform geospatial query such as finding restaurants inside region with the operator $geowithin. For example: db.places.find( { loc: { $geoWithin: { $geometry: { ...
0
votes
1answer
783 views

MSSQL performance with Geography (point within polygon)

I have a query, below, that works - however its very slow, looping through roughly 24,000 points per second. This is a rather high end production DB server with MSSQL and SDE, and in other instances a ...
0
votes
1answer
162 views

Polyline length within corresponding polygon

ArcGIS Pro 2.3: I have a feature class of polylines and for each polyline I want to analyze against its corresponding polygon. The link is the FLIGHTID field and it is a 1-to-1 relationship. I am ...
0
votes
1answer
314 views

With Spatialite, how do I run PtDistWithin with meters?

So the problem is that I have a set of multipolygons and points and I need to be able to query the data with a given point to check which ones are within 'x' km. Initially my SRID was 4283 but I ...
2
votes
1answer
452 views

How to select features which overlap one geometry but are disjoint from another?

Given a point layer and a polygon layer (P1) in GeoServer, the following CQL Filter selects points which intersect the polygon P1: CQL_FILTER = "Within(geom,POLYGON((P1_coordinates)))"; The ...
0
votes
0answers
283 views

geopandas geometry.within problem ValueError: Geometry column cannot contain mutiple geometry types

I'm trying to do an overlap of some lines with polygons with geopandas. For a reason I don't understand, gpd.overlay(grid, hel, how='intersection') is not made for lines and polygons, so I'm trying ...
5
votes
1answer
1k views

r - sf::st_within output is sparse geometry binary predicament format. How to convert to character or logical vector

The same question is asked here: https://stackoverflow.com/questions/49294933/r-convert-output-from-sfst-within-to-vector but I thought this might be a more suitable place for GIS related questions. ...
0
votes
1answer
2k views

geopandas + shapely. Point within a shape

I am using geopandas to import a shapefile and then check if a point is within that shape. I am using the shapefile found in http://opendata.atlantaregional.com/datasets/cities-georgia?geometry=-87....
1
vote
2answers
456 views

Counting number of points differing in specific attribute within polygon in ArcGIS Desktop?

I have a grid of polygons and a shapefile with several types of points (POIs). Now I would like to count the number of POI classes lying within each polygon? With spatial join I only managed to get ...
0
votes
1answer
107 views

Identifying multiple polygon features that contain point features and adding attributes to table in ArcGIS Desktop?

I have a point layer and a polygon layer, both containing hundreds of records. Each point feature can be within multiple polygon features (max. 4), and each polygon feature can contain multiple point ...
-1
votes
2answers
1k views

Determining if polygon falls within another polygon using QGIS?

How can I determine if a certain polygon falls within another separate polygon using QGIS?
1
vote
1answer
857 views

Count the length of all polylines from one shapefile within the segments of polygon of another shapefile

I have polylines with counted lengths. And i have the polygon shapefile (fishnet). I want to calculate the sum af lengh of polylines and amount of lines that are within the border of each segment of ...
2
votes
1answer
2k views

Searching for a point within a multipolygon

I'm performing a mySQL query to check if a point is within a multipolygon field. I've got a database field storing a multipolygon and I want to check if a point is within any of those polygons. ...
2
votes
0answers
196 views

How to find shortest line from a point on a polygon boundary to a multilinestring, but the line is inside polygon (PostGIS)

I have 3 geometries 1 polygon 1 point on boundary 1 multilinestring In this image you can see the problem. I need to find shortest line from point (green square) to line (red), but the line must be ...
1
vote
1answer
955 views

Select all points that fall within any polygon from multiple layers

I'm using MapInfo and would like to achieve the following: Find out all the points that fall within any of the polygons on screen, and which polygons they are contained within. The data I am working ...
2
votes
1answer
5k views

Getting intersection of circles using shapely?

I have a List of Points which I transform to circles. Code from here circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)] I want to know which circles ...
0
votes
1answer
33 views

Documentation on spatial queries [duplicate]

Is there any documentation / definition of the operations within, crosses, intersects etc that can be found on the spatial query just like ArcGIS provide?
3
votes
2answers
963 views

Optimisation of MySQL JOIN based on a Within match

I have a table of points and boundaries, and am trying to add the boundary ID which a point is within. However, using a LEFT JOIN ON Within(location, boundary) it is taking about 3.5 hours match 450,...
31
votes
3answers
16k views

How to refer to another layer in the field calculator?

Is there a way to select an attribute from a polygon layer and insert the value into a virtual field of a point layer using "within" in the field calculator? CASE WHEN within($geometry, ...
3
votes
1answer
406 views

Using arcpy to find geometry within another feature

In Arcpy, I would like to start with a point and then using its geometry method to find out if it is inside my polygon feature (Urban Areas) deeper than the buffer distance. This is a follow up to ...
2
votes
1answer
1k views

Invalid join selectivity error in postgis 2.1.3

I have 2 tables, one for points and one for polygons. I want to find points falling within theese polygons, so I quered: select p.id, l.id from points p inner join polys l on st_contains(l.geom, p....
2
votes
1answer
296 views

Finding point within box using MongoDB?

Suppose the point has coordinates for a search within the box: (long:-155, lat:19) If we have the box: SW - (-170, 10), NE (29,69) that everything is fine and we can find this point because it's ...
4
votes
1answer
5k views

WFS filter for point in polygon (PIP) query

I am trying to construct a WFS request. I want to determine if a certain point is within a polygon. The point coordinates I want to send via the WFS request. The polygon is saved as a layer on my ...
4
votes
2answers
500 views

Alternative to Spatial Query on large data

I have around 110000 points data spread around the world. the shapefile size is 116 Mb. I want to select points which are inside asia. I have been using qgis but this time qgis is not being able to ...