Spatial

Extract in R fails for small polygons and raster

浪子不回头ぞ 提交于 2020-01-05 04:41:07
问题 This example should be reproducible, the first part (with large polygons) works, the second fails: library(raster) USA.altitude <- getData('alt', country='USA') lower48 <- USA.alt[[1]] Srs1 = Polygons(list(Polygon(cbind(c(-96,-95,-95,-96),c(40,40,41,40)))), "s1") Srs2 = Polygons(list(Polygon(cbind(c(-97,-96,-96,-97),c(40,40,41,40)))), "s2") spdf.large <- SpatialPolygonsDataFrame( SpatialPolygons(list(Srs1,Srs2)), data.frame( z=1:2, row.names=c("s1","s2") ) ) plot(spdf.large) usa.average.elev<

Python KD Tree Nearest Neigbour where distance is greater than zero

寵の児 提交于 2020-01-04 14:06:09
问题 I am trying to implement a Nearest neighbour search for Lat and Lon data. Here is the Data.txt 61.3000183105 -21.2500038147 0 62.299987793 -23.750005722 1 66.3000488281 -28.7500038147 2 40.8000183105 -18.250005722 3 71.8000183105 -35.7500038147 3 39.3000183105 -19.7500019073 4 39.8000183105 -20.7500038147 5 41.3000183105 -20.7500038147 6 The problem is, when I want to do the nearest neighbour for each of the Lat and Lon on the data set, it is searching it self. e.g Nearest Neighbour of (-21

Spatial weights: asymmetric adjacency matrix?

情到浓时终转凉″ 提交于 2020-01-04 04:27:05
问题 I am creating an adjacency matrix to do spatial analysis in R. The data are all counties in the continental US. I've got the counties spatial polygons from US Census Tiger files. I am able to create the neighbors list, and it is symmetric. But when I convert that to an adjacency matrix it is not symmetric. This is a problem because my goal is to run a spatial autologistic model using ngspatial::autologistic , and I get an error that I must supply a symmetric binary adjacency matrix. Here is

plotting spatial points over a raster layer in r

前提是你 提交于 2020-01-04 02:39:08
问题 I wish to plot a matrix (temp_matrix) after converting it to a raster object (tempMap). Further, I wish to add few points whose latitude and longitude locations are available to me on the same plot window. I have tried few approaches but none seems to work since the points available are specific locations in lat/long while the raster object I am getting has a different extent. Please help me with this issue. Given below is the sample data for the problem. library(raster) temp_matrix<-array(NA

Making query to find nearest multiple(Lat,Long) from the single(Lat,Long)

一笑奈何 提交于 2020-01-03 01:41:27
问题 I am doing the nearest point query from a single point. Here is the sequence. I have multiple POI stored in the MSSQLServer and the table is dbo.Place . The second table is dbo.Position , which will stored the collected GPS point. I am using the Stored Procedure, and LatLong of Position is defined and available. How can I make query which is based from the examples below? dbo.Place Id | Name | Lat | Long 1 POI1 1.735 4.73225 2 POI2 1.5665 3.9983 3 Tim2 1.4344 3.1282 The Lat Long variable is

How to unlist spatial objects and plot altogether in R

佐手、 提交于 2020-01-02 16:19:28
问题 I have spatial lines as 'list': > SL1 [[1]] class : SpatialLines nfeatures : 1 extent : 253641, 268641, 2621722, 2621722 (xmin, xmax, ymin, ymax) coord. ref. : +proj=utm +zone=46 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 [[2]] class : SpatialLines nfeatures : 1 extent : 253641, 268641, 2622722, 2622722 (xmin, xmax, ymin, ymax) coord. ref. : +proj=utm +zone=46 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 [[3]] class : SpatialLines nfeatures : 1 extent : 253641,

is there something like dbgeometry makevalid in .net 4.5

点点圈 提交于 2020-01-02 08:24:42
问题 I'm trying to calculate area of polyline like that string poly = "POLYGON ((637604.918432772 2230520.64934531, 637622.257266129 2230419.44632915, 637279.107128549 2230192.04910755, 636765.470527745 2230179.6468564, 636778.005055813 2229861.77192838, 636529.81646905 2229464.29327025, 635813.486592791 2229523.30345774, 636017.385069448 2229974.32341381, 636267.323659164 2230070.32127916, 637035.026966561 2230404.70764784, 637275.265066307 2230401.13408429, 637604.918432772 2230520.64934531,

how to import a “.csv ” data-file into the Redis database

霸气de小男生 提交于 2020-01-02 07:08:53
问题 How do I import a .csv data-file into the Redis database? The .csv file has "id, time, latitude, longitude" columns in it. Can you suggest to me the best possible way to import the CSV file and be able to perform spatial queries? 回答1: This is a very broad question, because we don't know what data structure you want to have. What queries do you expect, etc. In order to solve your question you need: Write down expected queries. Write down expected partitions. Is this file your complete dataset?

what's the difference between spatial and temporal characterization in terms of image processing?

谁说我不能喝 提交于 2020-01-02 01:35:09
问题 I am a beginner in learning image processing and I am a bit confused with the concept of spatial and temporal characterization. So, for Spatial characterization, is it like a 2D map which contains some statistical information about the map? And in terms of the temporal characterization, is the value with respect to time? What does it mean and why do we care? Thanks! 回答1: Temporal characterization occurs when you have a series of images taken at different time. Correlations between the images

In R, how do I join and subset SpatialPolygonsDataFrame?

人盡茶涼 提交于 2020-01-01 12:29:11
问题 I'm trying to figure out my way on how to perform (so easy in GIS) operations in R. Let's take some example polygon data set from spdep package library("spdep") c <- readShapePoly(system.file("etc/shapes/columbus.shp", package="spdep")[1]) plot(c) I've managed to figure out that I can choose polygons with logical statements using subset . For instance: cc <- subset(c, c@data$POLYID<5) plot(cc) Now, let's suppose I have another data frame that I'd like to join to my spatial data: POLYID=1:9 TO