Spatial

spatial filtering by proximity in R

丶灬走出姿态 提交于 2020-01-01 06:57:13
问题 I have occurrence points for a species, and I'd like to remove potential sampling bias (where some regions might have much greater density of points than others). One way to do this would be to maximize a subset of points that are no less than a certain distance X of each other. Essentially, I would prevent points from being too close to each other. Are there any existing R functions to do this? I've searched through various spatial packages, but haven't found anything, and can't figure out

Spatial index/query (finding k nearest points)

时光总嘲笑我的痴心妄想 提交于 2020-01-01 03:57:05
问题 I have +10k points (latitude, longitude) and I'm building an app that shows you the k nearest points to a user's location. I think this is a very common problem and I don't want to reinvent the wheel. I'm learning about Quadtrees. It seems to be a good approach to solve this spatial problem. I'm using these tools: Python 2.5 MySQL MongoDb Building the Quadtree is not that hard: http://donar.umiacs.umd.edu/quadtree/points/pointquad.html But once I've created the tree and saved it to a db

Create MySQL spatial column - Point Data type with lat long without using Alter table

冷暖自知 提交于 2019-12-30 14:38:58
问题 How can I create a MySQL spatial column with "Point" Data type using latitude & longitude using a CREATE statement. (Without using Alter) Do I need to store latitude and longitude as well or can I insert both values into the Point(x,y) field and get rid of the latitude/ longitude columns? The examples that I have read till now retain the lat long fields. Please share some examples. 回答1: The point field has both the latitude and longitude data stored inside it and they can be retrieved quite

Spatial vs. Temporal locality

纵饮孤独 提交于 2019-12-30 04:44:07
问题 I understand the definitions of the terms, but I am having trouble applying their concepts to code. For an exercise, we are asked to describe if the following code is spatial or temporal: for (int i=0; i<10; i++) { printf(some_array[i]); } I feel like this is spatial locality because when one index of the array is accessed, the next index memory location will be accessed as soon as the loop iterates. Is this the correct way to look at it? What determines if code is temporal versus spatial?

Output shapefile for the igraph network in R

别来无恙 提交于 2019-12-30 04:44:05
问题 Hello I have a network in R using the igraph library Vertices: 616 Edges: 6270 Directed: TRUE No graph attributes. Vertex attributes: name, Lat, Lon. Edge attributes: V3. How can I generate two shapefiles for the Vertices and the Edges using the Lat, Lon info in the vertex? 回答1: You can do this using the sp and maptools packages. There are handy functions writePointsShape() and writeLinesShape() in maptools that will write to the ESRI shapefile format. Before doing this, it is necessary to

JSON.Net JsonConverter for DbGeography

三世轮回 提交于 2019-12-30 00:38:25
问题 Long long struggles with this... Basically I have a model-first EF5 object with a DbGeography property. I would like to apply a JsonConverter that let's it roundtrip as simple latitude/longitude values. I'm using WebAPI. Looking for JSON output and input like so: { "location": { "geopoint": { "latitude":40.770712, "longitude":-73.962011 } } } Here is my class definition and JsonConverter: [MetadataType(typeof(QueryLocationMetadata))] partial class Location { } public class

19C impdp导入报ORA-39087,ORA-39070,ORA-39002错误

…衆ロ難τιáo~ 提交于 2019-12-27 17:41:30
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> [oracle @localhost ~]$ impdp system/oracle@wangjiapdb directory=dpdata1 dumpfile=wangjiapdb.dmp logfile=20190508.log full=y Import: Release 19.0.0.0.0 - Production on Wed May 8 16:30:15 2019 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-39087: directory name DPDATA1 is invalid 报错原因未切换到wangjiapdb创建DPDATA1目录 重新创建directory目录 SQL> show pdbs; CON_ID CON_NAME

What is better way represent a spatial data

痴心易碎 提交于 2019-12-26 16:32:06
问题 I have the following problem in my system : my system is client-server architectural . my application is about recognition building in a city .so i decide to separate the map of the city into grids each grid has an area equal 30 x 30 m . for each grid region i store the center point of the grid (lat,long) . so my question is if a user is located in a specific grid x it's location are send to the server how i can decide in which grid the user are located ? Here's a photo clarify the problem:

Is it possible to issue a spatial join with shapes from two tables?

不问归期 提交于 2019-12-25 08:16:53
问题 I want to be able to run a query like: select A.* from A join B on match(A.geom,B.wkt) using within; But i get: ERROR: UnhandledServerException: java.lang.IllegalArgumentException: queryTerm must be a literal Sample schema: create table if not exists A ( id integer, geom geo_shape ); create table if not exists B ( id integer, wkt string index off ); The reason for trying wkt string is due to the documentation's use of WKT literals. Additionally, since our actual implementation is a variable

SQL syntax error in creating spatial network

吃可爱长大的小学妹 提交于 2019-12-25 05:03:29
问题 I am trying to create a spatial network from a shapefile (representing street centrelines) imported into an Oracle DB with FME Desktop. The 'CENTRELINES' spatial object contains a GEOM column that I'd like to use as the basis for a network analysis to allocate ambulance facilities (points) among retirement homes (points) based on route distance as a cost attribute. Any advice on methodology for approaching this morbid problem in Oracle Spatial would be welcome, but the main issue is that I am