Questions tagged [point-in-polygon]

A common GIS operation. Used to determine whether a point lies within a polygon's bounds.

Filter by
Sorted by
Tagged with
1
vote
1answer
18k views

Python: Point in polygon, boundary and vertex check (ray casting)

So I have written some code to check whether a point [(x,y)] lies within a polygon [(x,y), (x,y), (x,y), (x,y)] but the code fails if the point lies on a boundary or a vertex, I need this to be ...
4
votes
4answers
22k views

Extract all the polygon coordinates from a SpatialPolygonsDataframe?

I want to do something relatively simply but it seems to be very difficult to do, though I am very new to using R for spatial data so apologies if I've missed something obvious. I have a list ...
8
votes
1answer
3k views

Using qgis:selectbylocation in PyQGIS

I am trying to use the processing toolbox to perform a spatial query (points in polygon). I am not sure how to use the tool and I keep getting this Error: Wrong number of parameters. Here is my ...
1
vote
1answer
282 views

How can I count points from several buffer distances in PostGIS updating the table?

I have a problem regarding a calulation on PostGIS. I have to calculate how many facilities fall within a given distance. This is not really a problem though, but updating my table is. I have this ...
3
votes
2answers
1k views

Deleting line vertices inside polygon using ArcPy?

Is there a way to automatically delete vertices in line features using a polygon file in ArcGIS so that it wouldn't cut up the line but just straightens the line inside the polygon? The lines are ...
4
votes
1answer
940 views

Can a CartoDB-Torque map be used for polygon instead of a point data?

Can you use Torque for country data - polygons instead of points? Make animated maps with polygon data instead of point data? I would like the color of countries to change over time as a particular ...
3
votes
2answers
142 views

How do I generate grid square polygons from a 5m DTM file?

For my dissertation I have collected point features as coordinates and want to relate their distribution around a lake to elevation to see if there is any pattern/relationship between them. I have ...
9
votes
3answers
1k views

Creating large amount of random points in binary raster?

I want to create a point vector dataset of 10000 points (or larger) within a binary raster, where the points should be constrained to areas where the raster value is 1. I tried the following steps. ...
1
vote
2answers
3k views

What algorithm allows me to calculate the set of all points inside a polygon?

Imagine I have a polygon, which represents the countours of a building on an integer 3D map (everything is a 1 meter by 1 meter block in that map). In the image below, you see several buildings ...
1
vote
1answer
743 views

Finding which points from dataset within specified boundary using CartoDB?

I'm a non-coder using Cartodb. I've uploaded a dataset that has longitudinal and latitudinal coordinates, and overlayed that with a map with neighborhood boundaries. Is there a way to easily compare ...
1
vote
2answers
177 views

Switch selection of specific polygon

I'm using ArcGIS 10 desktop version. I have a number of polygons, let's say 300, in a layer. Each polygon contains information of schools, ranging from 100 to 250 points, in a separate point layer. ...
4
votes
5answers
3k views

Counting points in polygon using PyQGIS

Is there any simple integration for calculating count of points in polygon using QGIS-Python integration? In other words, are there any pre-defined functions for points in polygon of QGIS using ...
1
vote
1answer
1k views

Can we count the points in polygon using pyqgis code? [duplicate]

Does anyone know how to calculate the point in polygon from the given points and the buffer output using python qgis. I have every thing loading the data and retrieving the output. But now I want to ...
0
votes
2answers
3k views

Help finding point in polygon via Spatialite with example karst zones data

I'm working on a school project involving Spatialite and point in polygon queries. I've successfully followed this example: http://blog.crazystyle.net/?p=255 I am now trying the same sequence of ...
2
votes
0answers
68 views

Split points evenly to neighboring polygons? [closed]

I have a crime location data set, containing geocoded crime location points that have been geocoded to streets and street interactions. I also have a census tract shapefile. What I would like to do is ...
3
votes
1answer
256 views

Identifying locations within polygon using PyQGIS

I have a series of locations stored within a Vector layer and want to write a query to understand which of these locations fall within the polygons from another layer using the QGIS Python console. So ...
1
vote
0answers
88 views

How to join points into overlapping polygons layer?

I'm using QGIS and I am relatively new to it. I have a points layer. Each point is the location of a conflict event and the attributes are the type of conflict, year of the event, number of deaths etc....
7
votes
2answers
2k views

Boundary from Points

I have a point cloud and need to process a very detailed boundary around the outer points. Is there a tool in QGIS? Convex hull is not detailed enough.
12
votes
2answers
4k views

How does spatial polygon %over% polygon work to when aggregating values in r?

I'm working on an environmental epidemiology project where I have point exposures (~ 2,000 industrial hog operations - IHOs). These IHOs spray on nearby fields, but the feces water droplets and smell ...
3
votes
3answers
1k views

Counting points of specific type within polygon using ArcGIS ModelBuilder?

I'm analyzing wind farms and wind turbines within ArcGIS Desktop 10.2. My data consists of the locations of individual wind turbines that are associated with a wind farm (let's call it "Wind Farm A")...
0
votes
1answer
2k views

List all Points within Polygon using QGIS? [duplicate]

Complete newbie to QGIS and can't seem to find how to do this. I have created a map with 84 different polygons. Then I've imported approx. 8000 points. What I want to do is now query my map and get ...
1
vote
2answers
15k views

Points within polygon in QGIS [duplicate]

I have a shapefile with polygons. And I have a csv file with points. Now I want to know for each point in which polygon it is situated. Every polygon has a number, so I want to create a file where you ...
4
votes
1answer
561 views

QGIS's "Points in Polygon" counts zero in every census tract

I am mapping the location of incidents of asthma using QGIS. I would like to count how many points are in census tracts to better understand the areas where asthma occurs most frequently. My map ...
2
votes
0answers
2k views

Geofencing: Query if a POINT is within a POLYGON

I am trying to use the following query to search if a point is within a defined POLYGON (aka a geofence I want to define): https://spatial.virtualearth.net/REST/v1/data/[DataSourceID]/[...
2
votes
1answer
378 views

Points in Polygon results in PNTCNT=NULL

I am trying to use the QGIS (2.6.1) vector analysis tool "Points in Polygon". The points originally came from a KML file and the polygons I created new. I initially had a warning about different CRS ...
0
votes
1answer
205 views

cross referencing files question

This may be an easy question so please forgive me if it is (or if it makes no sense) as this is all very new to me. I have 3 files that I am trying to cross reference. One file has columns category, ...
5
votes
1answer
3k views

Speed up row-wise point in polygon with Geopandas

I have a geopandas GeoDataframe which contains some attributes and a geometry column which is filled with shapely Point(lon, lat) objects. Moreover, there is a GeoSeries which is equally indexed as ...
2
votes
2answers
4k views

Determine which points are contained inside a given polygon

I have these database tables defined: CREATE TABLE regions ( id SERIAL PRIMARY KEY, name VARCHAR(150) NOT NULL ) CREATE TABLE region_points ( id SERIAL PRIMARY KEY, region_id SERIAL ...
3
votes
1answer
1k views

constrain random points with a polygon in R using sp library

I have a map of London's waterways, which I've grided into a raster dataset to enable me to measure proximity to water from randomly generated points. What I'd like to do please is to constrain the ...
28
votes
3answers
45k views

Join spatial point data to polygons in R

I am trying to perform a spatial join between point data and polygon data. I have data that indicate the spatial coordinates of an event in my csv file A and have another file, shapefile B, that ...
1
vote
1answer
2k views

Checking if point is inside area using OpenLayers?

I have a map and one point. I want create an area and check if a point is inside the area. map = new OpenLayers.Map("map"); map.addLayer(new OpenLayers.Layer.OSM()); var lonLat = new OpenLayers....
3
votes
2answers
2k views

Mean values of points within a polygon layer

I have 2 shape files (1x points and 1x polygons). The points have different values (soil sampling results). What I want to do is to calculate the mean values of the points inside the different ...
2
votes
2answers
225 views

Why do I get green crossed circles instead when I try to move a point?

It's really horrible I must say. I sometimes have geometry issues and then try to go one by one through them and fix these cases. Therefore I mark the area points and delete them for instance. After ...
3
votes
1answer
419 views

Why is Shapely and contains_point not detecting point being on land?

I'm using the world shapefile that can be found at https://trac.openstreetmap.org/browser/applications/editors/merkaartor-branches/merkaartor-0.14-fixes/share/world_shp/world_adm0.shp?rev=17052. I've ...
2
votes
0answers
71 views

Aggregate nearby points to develop equally sized regions in QGIS

I have a list of 4,500 points (lat, long, unique id, attribute). I also have a service territory which all of the points fall into. I would like to break the service territory (polygon) into 6 ...
2
votes
0answers
72 views

How to find out to which polygon each points belongs to in ArcMap [duplicate]

I have got a shapefile consisting of a number of polygons, and another shapefile with a number of points. I want to add a column in the points shapefile. For each point, I want the column to contain ...
1
vote
0answers
401 views

Generate random points in geometry near heatspots

I have an algorithm, that generates random points with in a given polygon (Generate random points in polygon. Algorithm question). The Polygons the points are generated in are communities or districts ...
2
votes
1answer
212 views

Gdal+Geos point in polygon test fails under MinGW64

I have to build a grid of points and remove the points that falls inside a polygon. Polygons are defined in a ESRI shapefile, points are in a list. This is how I make the test: OGRLayer *layer = ...
1
vote
0answers
3k views

How to generally determine if a Point is inside a Polygon/Region?

I have a region (i.e. closed polygon) like this given in cartesian coordiantes: 1: 628497 / 239586 2: 642383 / 249881 3: 657705 / 241262 4: 652677 / 230489 5: 631370 / 231446 6: 628497 / 239586 I ...
2
votes
1answer
1k views

Point-in-polygon using WGS84 geographic coordinate system

When running a point-in-polygon operation, is it valid to run that with polygon features in straight up WGS84 and a point in lat/lng, or should both be projected into a non degree based coordinate ...
1
vote
3answers
2k views

How to Count point in polygon + on boundary?

So I'm looking for suggestions in both ArcGIS 10.2 and QGIS on methods on how to count points within a polygon and points that fall on a polygon boundary without adjusting the data/points. The ...
1
vote
1answer
75 views

Point in zone problem in calculation

I have a strange problem that i believe its because the zone pass through international date line. My goal is to find if a point is within a zone and I use the geoPHP library, everything seems to be ...
4
votes
1answer
156 views

Match housenumbers on buildings (special case of point-in-polygon-test)

Task with example I'm working with geodata (country-size) from openstreetmap. Buildings are often polygons without housenumbers and a single point with the housenumber is placed within the polygon of ...
3
votes
2answers
1k views

Finding a point inside a polygon based on maximum value of a specific field

I have a Polygon Shapefile that represents US counties and a Point Shapefile that represents hospitals. The hospital attributes table includes fields like "Number of Beds", "Number of Patients" and "...
2
votes
0answers
415 views

QGIS assign multiple points data to closest polygon

I've got two layers: point layer polygon layer I need to add the points attributes to the polygon by location (if the point is on top of polygon add the atribute as a new field. I thought of using "...
0
votes
2answers
743 views

Postgis: Point-in-polygon check + feature attributes inheritance

I have two tables in Postgis 2.1 database: Polygon features with a reach attributive information; Regular point grid; I would like to get a SQL query returning the regular point grid with assigned ...
4
votes
2answers
3k views

Finding all street names or addresses within polygon?

I have a geojson list of lat/long coordinates that make up a custom polygon of a section of my county. Ideally I would like to be able to find all the addresses that are within the polygon boundaries. ...
3
votes
1answer
279 views

Positions from GPS lanes inside polygon using PostGIS?

I have a lot of lanes like the orange lanes in the below picture (latitude and longitude values). Now I need all values from each lane inside the red polygon. What is the easiest way to realize this ...
3
votes
2answers
7k views

Selecting points within polygon and updating attributes using ArcPy?

I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales area they are in and update their attribute table to ...
1
vote
0answers
507 views

node.js GeoLib fails on polygon that straddles the anti-meridian

geolib.isPointInside does not appear to work correctly when the polygon longitudes straddle the anti-meridian. I maintain a system with lots of polygons that do straddle the antimeridian (I'm in ...

1
4 5
6
7 8