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
0answers
24 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
68 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
22 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
36 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 ...
5
votes
2answers
235 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
35 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
26 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
76 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
102 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 ...
1
vote
0answers
55 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
168 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
160 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
41 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
57 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
175 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
769 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
226 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
399 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
105 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
631 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
153 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
81 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
1k 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
96 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
108 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
195 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
0answers
343 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
325 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 ...
1
vote
1answer
278 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
427 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
129 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
505 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
632 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
349 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
546 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
313 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
514 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
303 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
375 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
186 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 ...
5
votes
1answer
457 views

Stats on individual grid points nearest neighbours

First, thank you for this extremely useful and easy-to-access forum! 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 ...
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
962 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, ...
8
votes
2answers
1k 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
260 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 ...
20
votes
1answer
1k views

Nearest Neighbor problem in Postgis 2.0 using GIST Index (<-> function)

I'm trying to use Postgis 2.0 new function <-> (Geometry Distance Centroid) in order to calculate, for each row of my table (cosn1), the distance to the nearest polygon of the same class. I was ...
1
vote
1answer
235 views

Generate Near Table and keep all attributes

I am trying to calculate the angle and distance of points to surrounding polygons. The table is good and what I need but it doesn't maintain all records; the unique point and polygon IDs are not ...
13
votes
3answers
2k views

How does Nearest Neighbor Image Resampling work in ArcGIS?

I am trying to understand how nearest neighbor for the resampling of Image datasets works in ArcGIS. The output raster cell value is the value of the closest cell value in the input raster: In this ...
10
votes
1answer
467 views

How to efficiently find the closest point over the dateline?

I have a PostgreSQL 9.1 table with hundreds of thousands of PostGIS POINTs. For each of these I'd like to find the closest point in another table of POINTs. The points in the second table represent a ...
7
votes
3answers
3k views

How to find nearest neighbors between two tables with point locations in SpatiaLite?

I have started playing with SpatiaLite today and already stumbled upon a problem. For each point location stored in tableOne I would like to select one, nearest (linear distance) point from tableTwo. ...