Spatial

Calculate distance between neighbors efficiently

怎甘沉沦 提交于 2019-12-25 01:34:25
问题 I have data geographically scattered without any kind of pattern and I need to create an image where the value of each pixel is an average of the neighbors of that pixel that are less than X meters. For this I use the library scipy.spatial to generate a KDTree with the data ( cKDTree ). Once the data structure is generated, I locate the pixel geographically and locate the geographic points that are closest. # Generate scattered data points coord_cart= [ [ feat.geometry().GetY(), feat.geometry

Map visualisation on Pentaho CE

对着背影说爱祢 提交于 2019-12-24 14:40:37
问题 I am running Pentaho ce 5.3, I already tested it with a star schema cube and it works fine. Now I would like to visualize into maps mdx queries on dimensions (including spatial ones) stored in Postgis. I don't know if it is possible, or should I add any plugin for this matter? 回答1: You have more options depending on what do you want to visualize. If you want to show: Map with markers: I recommand to use NewMapComponent . Documentation and example can be found in Pentaho > Browse Files >

Plotting spatial data when two spatial objects have different CRS

别来无恙 提交于 2019-12-24 12:05:33
问题 I have a spatial polygon object and a spatial points object. The latter was created from xy latlong data vectors (called latitude and longitude, respectively) in a dataframe, while the former was simply read into R directly using rgdal. My code is as follows: boros <- readOGR(dsn = ".", "nybb") rats <- read.csv("nycrats_missing_latlong_removed_4.2.14.csv", header = TRUE) coordinates(rats) <- ~longitude + latitude At this point neither spatial object is projected. If I project these objects as

R: Calculating overlap polygon area

懵懂的女人 提交于 2019-12-24 11:26:40
问题 I am having some difficulties in R trying to calculate the area of overlap between polygons. As an example, for Switzerland I have data on the administrative boundaries of the cantons and the ethnic groups in the country. ## Libraries library(sp) library(spdep) library(maptools) library(rgeos) ## Data print(load(url("http://gadm.org/data/rda/CHE_adm1.RData"))) greg<-readShapeSpatial("raw_data/GREG.shp", proj4string=CRS(" +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")) switzerland<

Neo4j Spatial - How To Delete A Node

◇◆丶佛笑我妖孽 提交于 2019-12-24 08:55:16
问题 Having successfully created a spatial index, created a node and added it to my index, I'd now like to be able to delete the node (easy) and remove it from the spatial index (not so easy). At time of writing, the documentation does not cover this. Looking at the index i can see what to clear up, but on my simple DB i'm not confident if this is a protocol to follow or just a rule of thumb. My node (within the index) is two "rtree" relationships away from the root of the layer, which i can clean

Analyzing octopus catches with LinearK function in R [closed]

≡放荡痞女 提交于 2019-12-24 00:54:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 months ago . I hope you can help me with this problem i can't find how to overcome. Sorry if I made some mistakes while writing this post, my english is a bit rusty right now. Here is the question. I have .shp data that I want to analyze in R. The .shp can be either lines that represent lines of traps we set to catch

STintersects() to find the Intersection point

妖精的绣舞 提交于 2019-12-23 19:18:17
问题 I have two sql server geometry -ies which I am using to check if they intersect. If they do I need the intersection point. Currently I can get only Boolean output where if it intersects = 1 and if it does not intersect it will give =0 . Is there any way I can find the intersection of two shapes in geometry ? Update this question led to my next question concerning how can one check if a point (lat/long) exists in a region which has 4000 points (lat/long). Can one use stcontains or stintersects

How to combine multiple LineString rows into a single row collection

南笙酒味 提交于 2019-12-23 13:06:41
问题 I'm using SQL Server 2008 and the Geometry datatype to store a list of UK a roads, which I've imported from the Ordanance Survey STRATEGI data set. Each road is split into multiple rows, which each contain a single line (A Linestring made up of one segment) . For instance the A369 is made up of 18 seperate lines, as shown in the image below: What I'd like to do it collect all the seperate rows containing portions of a road and create a new row which holds all the combined individual lines as

DbGeography Alternative for C# POCO

我与影子孤独终老i 提交于 2019-12-23 12:38:53
问题 I'm writing an application where I need to query for a records within a radius of some position. I started out with just a lat / long pair of properties on my PCO but realised that spatial searches in SQL are done against a column type of geography which translates down to DbGeography in the POCO (referenced in another SO post and also using EF Powertools Reverse Engineer POCO). So, the problem I'm seeing is that I keep my POCOS as clean as possible leaving out all references / dependencies

Create geometry (f.e. LineString()) from stored points. MySQL spatial

故事扮演 提交于 2019-12-23 05:52:13
问题 Is there any way to create some Geometry (f.e. LineString(pt1,pt2,...) ) from MySQL query (where pt1,pt2,... is a result of another query, in other words pt1,pt2,... stored in MySQL table)? Example: SELECT LineString(SELECT point FROM points) AS line; Thanks! 回答1: I had a similar problem and solved it in this way: SELECT pt1, pt2, pt3, pt4, @Line_string := GEOMFROMTEXT(CONCAT('LINESTRING(',pt1,' ',pt2,', ',pt3,' ',pt4,')')) FROM table; 回答2: LineString(pt1,pt2) MySQL and MariaDB both support