A technique for resampling raster data in which the value of each cell in an output raster is calculated using the value of the nearest cell in an input raster.

learn more… | top users | synonyms

1
vote
1answer
32 views

Get all streets within a certain radius with osm2po

I'm trying to get all street segments out of osm2po graph, given a geo point and a certain radius. Right now I just do a breadth first search out of the street that's closest to my point, but is there ...
0
votes
0answers
40 views

how to use spatial index in spatialite query

I posted this question originally nearest neighbor query in SpatiaLite. Thanks to the answer given I was able to get the query working on some test data. However I am having trouble applying a spatial ...
1
vote
1answer
62 views

nearest neighbor query in SpatiaLite

I am trying to find the nearest line to each point in a layer, and I have over 1 million points. I want to be able to associated the closest unique line ID with the point unique IDs. I have tried to ...
1
vote
1answer
90 views

How to create a line between a point and nearest neighbour using python (template included)

I have 2 shapefiles - one is a series of points, the other is a polyline. I want to draw a straight line between each point to the nearest point on the polyline. This question has already been asked ...
1
vote
1answer
78 views

Number of Neighbors Around a Point

I need to get a count of neighbors within 100m for each point in a set of 250 million points. The result would have the id of each point accompanied by the number of neighbors around them. Can this be ...
1
vote
0answers
42 views

Why would Nearest Neighbor Analysis give 0 observed mean distance?

I am working with small datasets (around 100 points or less) with Nearest Neighbor Analysis in QGIS 2.8 (although I also tested in 2.6 and the result is the same). I have the layers referenced with a ...
0
votes
2answers
100 views

Neighbors within distance from every row

I have a research project of 180,000 entries and I need to calculate the number of neighbors (points from the same table) that exist within a 300 meter radius for each point. My method is very slow, ...
0
votes
0answers
33 views

High-performance k-nearest neighbor MBRs from given point using spatialite?

I've built an 2-dimensional spatialite db with millions of polygons inside. What I want to do is to find the polygon which is the nearest from given (x,y) coordinate. This is what I want to do. ...
2
votes
1answer
67 views

Point to Raster vs Feature to Raster

I am converting point vector data to a raster dataset using nearest neighbor. I am using arcgis 10.2. The first step is to use the conversion toolbox, but there are two possible options: Point to ...
7
votes
2answers
1k views

PostGIS nearest point with ST_Distance

I need to obtain on each element on one table the closest point of another table. The first table contains traffic signs and the second one the Entrance Halls of the town. The thing is that I can't ...
0
votes
1answer
86 views

Saving samples in eCognition

In eCognition developer is it possible to save samples that I have selected for nearest neighbor classification with the workspace or project? Every time I close and reopen my project I have to re ...
1
vote
1answer
42 views

KeyError: u'M' in Average Nearest Neighbour test

When I try and run the Average Nearest Neighbour test on my Shapefile I get the error: KeyError: u'M' Failed to Execute (AverageNearestNeighbour) On a "normal" Shapefile this works fine. However ...
2
votes
1answer
211 views

Distance to nearest point for every point same SpatialPointsDataFrame in R

I have a SpatialPointsDataFrame that I'm working with in R. I want to add a new vector to the dataframe that contains, for every point, the distance to the nearest other point in the ...
3
votes
1answer
126 views

PostGIS Nearest Neighbour outside buffer

I am trying to find the 6 nearest neighbours to a point which are outside a defined buffer. Basically I am comparing points of the same table and working with Mike Gleason's examples. WITH subq AS ...
0
votes
0answers
102 views

QGIS nearest neighbor parameter description

Could anyone explain me the following parameters, which I get by doing a nearest neighbor statistic on a point shape? I suppose that Observed mean distance is the mean distance between two points ...
3
votes
1answer
250 views

QGIS - Calculate distance between a point layer to n nearest polylines

In QGIS I am trying to calculate the distance from a point layer to a polyline layer for the n nearest polylines. I have figured out how to calculate this distance to the centroid of the polylines ...
2
votes
0answers
220 views

N Nearest Neighbours efficiently PostGIS/Python

The data is worldwide about a million points, lat/lons, with an id and an importance value (0.0 to 1.0), and it's limited to being on land. Ideally I need to cluster all 1 million points into 100,000 ...
2
votes
0answers
49 views

Weighting Point Data whilst performing a Near analysis

I am struggling to work out how I can assign weights to my points (airports), So far I have carried out a Near fuction so that all of my raster (output areas ) are assigned a point with its distance ...
1
vote
1answer
77 views

Remove points within x distance

I have these spatial points: long <- c(-1.769717, -1.767766, -1.769170, -1.768462, -1.768389) lat <- c(54.92214, 54.92207, 54.92113, 54.92167, 54.92165) points <- data.frame(long, lat) ...
1
vote
1answer
210 views

Finding closest Intersection between line strings (PostGIS)

I want to find the distance between one point (excavation sites) and a line (rivers) for the cardinal directions. What I thought would be the easiest way is to draw lines between the excavation site ...
3
votes
1answer
1k views

Improve speed of PostGIS “nearest neighbor” query?

One of the features of the Python/Django/PostgreSQL web application I'm building is that a user will be able to see the 100 other users who are nearest to them, sorted by distance. I'm using PostGIS ...
4
votes
2answers
290 views

How to speed up a query for nearest linestring to point data

I have processed a Strahler stream order layer with a lot of river linestrings (type: Multilinestring) and their corresponding strahler number (see information here). Besides I have a point layer. I ...
6
votes
2answers
472 views

Calculating spatial lags per year in R

At the moment I am having some difficulties with calculating a spatial lag in R. I know how to calculate the lag in space-wide format but am unable to do it in long form, i.e. have repeated ...
2
votes
1answer
121 views

Matching two point clouds without loss (nearest neighbor, but more complicated)

I have two point clouds, one with demographic and one with electoral data. Points in both clouds represent the same empirical entity (say, a village, or an urban neighbourhood), but are not in the ...
0
votes
1answer
791 views

How to find nearest city using Geonames features codes

I've got about 300,000 lat/lng coordinates of events that I'm combining into a large map. The coordinates come from all over the world. For each point, I want to find the nearest city of at least XYZ ...
2
votes
1answer
191 views

Spatial Join in CartoDB

I need to update a table of points with the FIP code of the nearest county polygon from a separate table. I've managed to update the column for those points that Intersect a county polygon with this: ...
3
votes
1answer
86 views

Use selected value in postgis function

How can I use the selected value from a SELECT statement in a PostGIS function. e.g. using the geom_way from SELECT geom_way FROM osm_2po_4pgr ORDER BY ST_Distance(ST_GeomFromText('POINT(21.323329 ...
7
votes
1answer
2k views

Find Nearest Line Segments to Point

Background From a known Point, I require to establish the nearest surrounding "visible perimeter" against a table of MultiLineStrings, as shown on the diagram. I've searched this site with a number ...
4
votes
1answer
105 views

How to find closest point without crossing obstacles?

I have a set of points and I'd like to be able to find the nearest point from another layer. The problem is that I need to find the closest point without crossing an obstacle (such as a river, ...
4
votes
1answer
119 views

Spatial Analysis - Identifying Regions with Common Boundaries

I have the shape file for DC PSA's as defined in 2012 (see below). I would like to be able to identify in semi-automatic fashion which PSA's are neighbors - that is, which PSA's are nearest neighbors ...
2
votes
1answer
218 views

Efficiently check for equal adjacent values in raster calculator

I have a raster consisting of integer values in each cell. I want to check every adjacent cell in a 3x3 grid to see if any one of the adjacent cells has a value EQUAL to the center cell, and if so, ...
3
votes
1answer
419 views

How to calculate the distance to multiple locations from each cell of my raster?

I'm working with Arcgis 10.1 and Python 2.7.2 How can I calculate the distance to multiple locations from each cell of my raster? I tried euclidean distance but it only provides the distance to ...
1
vote
0answers
368 views

Loop though records in PostGIS (using PL/PYTHON or PGSQL)

I've seen many example of loops, but I can't get that one to work. I work for a regional transit agency and each year, we conduct several surveys. I geocode everything to the house level for internal ...
2
votes
2answers
343 views

nearest neighbor with postGIS and nodejs

I'm using postgreSQL 9.1 , postGIS 2.0, nodejs 0.10.12 and the latest version of node's pg module. I use websockets on the server side. I implemented a function that tries to find the 5 nearest ...
2
votes
1answer
498 views

Find nearest neighbours faster in PostGIS

I currently have a query that calculates the number of useful amenities within a certain radius of each town, using OSM data: create table places as select town.name, place, town.way, ( select ...
2
votes
1answer
142 views

Near analysis by matching attribute in two different layers

I need to perform a near analysis to assign cases in one feature class to their nearest match on an attribute in a different feature class (ex: Tutors and Tutees need to be paired by same language ...
0
votes
1answer
580 views

Nearest neighbor analysis not showing results

I'm trying to do a nearest neighbour analysis on fish shoals distribution. I go to Vector > Analysis Tools > Nearest neighbour analysis. I choose the appropriate layer and when I hit ok the black ...
0
votes
2answers
770 views

How to determine average distance from points to line?

I have a polyline road dataset and a study area (polygon) covering the the road dataset. I want to determine the average distance for every given point within the study area to the nearest road. i ...
3
votes
1answer
399 views

Nearest Neighbor Focal Statistics and Map Algebra

I would like to use a nearest-neighbor type analysis to iterate over a raster. The nearest neighbor analysis will give a cell value of 1 IF AND ONLY IF the cell being analyzed has a cell value larger ...
1
vote
1answer
625 views

Accurate and fast nearest neighbour, which distance function should I use and how to it speed up? [duplicate]

I am solving the following problem: I have a map with many points in it and I need to find the nearest point to given location. Each point carries information about it's latitude and longitude. This ...
2
votes
0answers
346 views

Can Nearest Neighbor Analysis help determine values for a Heat Map?

Given the below parameters (from Nearest Neighbor Analysis): A) Is there a definite range my Radius value should be within? B) Are there definite values my cell size should be near? C) Is there a ...
2
votes
1answer
567 views

Openstreetmap - retrieve nearby big cities for a given location

I was wondering how I can retrieve places near a given location? For example, if I pass the osm API the location "Paris" is it possible to retrieve all the main biggest cities around Paris within a ...
2
votes
1answer
332 views

How to return nearest point to input lat/long with distance?

I am trying to write a query with PostGIS that returns one row where the geometry of that row is the closest to an input point. I would also like to include the distance between these points in the ...
1
vote
1answer
415 views

Function that applies another function to nearest neighbors of a specified location?

I'm sure this is quite basic, but I just couldn't find anything appropriate: I am looking for a function that applies another function to variables of a SpatialPointsDataFrame, but only for locations ...
7
votes
2answers
218 views

Which SRS to use for global distance queries?

I have a database with a lot of points in WGS84. Now I am building an cache that performs NN and points in range queries using a KDtree. The point [sic] is that the search radius will be provided in ...
6
votes
1answer
508 views

Stats on individual grid points nearest neighbours

I have shp of points where each point is the centroid of the individual cells of a 1*1km grid (~ 500 000 points). For each of these points, I have their coordinates and elevation. What I want: for ...
7
votes
4answers
2k views

Calculate polygon field based on neigboring polygon attribute

I have a vector shape with many different sized polygons each possessing an own class name (for instance "houses", "houses with offices", etc ...) I want to assign a new field to each polygon ...
0
votes
1answer
1k views

Finding nearest point in SpatiaLite without GEOS

I want to find the nearest point having latitude and longitude stored as Point in SpatiaLite. I read this and it has this example: SELECT feature_name, feature_class, ST_Distance(Geometry, ...
9
votes
2answers
2k views

Calculate Distance between a Polygon and a Point Along a Path

I am very new to ArcGis and am trying to figure out how to do this. Basically, this is what I am trying to do: I have a map of Canada and in it I have polygons representing areas (each about the ...
3
votes
1answer
269 views

Estimating cline width at multiple points along a trait gradient

In the map below I have 66 (green) points along the midpoint (0.5) for an allele frequency cline across the region (see map). I created the points by placing a point every 25 km along the 0.5 allele ...