Spatial

Google maps spatial reference system

淺唱寂寞╮ 提交于 2019-11-30 14:11:42
What is Google map's spatial reference system using when you enter a lat, long into the maps search bar? I've found hints that it might be WGS84 but after converting to that coordinate system, nothing shows up when i paste the coordinates into the google maps search box. I am converting from GDA MGA 56. Sample: Input MGA56 coords: 336301, 6253363 Expected WGS86 coords: -33.8473340793201, 151.230631835944 I get: 16834916.928327594 -4008321.1020318186 Spatial coord systems: EPSG:28356 for MGA56 EPSG:900913 for WGS86 (google maps) I am using geotools to do the transform: CoordinateReferenceSystem

Output shapefile for the igraph network in R

送分小仙女□ 提交于 2019-11-30 13:58:06
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? 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 extract the lat/lon information from the graph vertices and put it into a SpatialPoints object for the

Best Performance-Critical Algorithm for Solving Nearest Neighbor

烂漫一生 提交于 2019-11-30 12:21:18
问题 We have a list of x,y pairs. Every pair represents a point on a 2D space. I want to find the closest point from this list, to a specific point xq,yq. What is the best performance-critical algorithm for this problem? Lisp of points is not going to change; which means I do not need to perform insertion and deletion. I want just to find the nearest neighbor of a target xq,yq point in this set. Edit 1: Thanks to all! As Stephan202 has guessed correctly, I want to do this repeatedly; like a

Is there any documented free R-Tree implementation for .NET?

拟墨画扇 提交于 2019-11-30 11:07:18
I found some open source R-Tree implementations in C#, but none with documentation nor signs of being used by someone else than the developer. Jader Dias The NetTopologySuite is a JTS port to C# and it contains a STRtree class which is a read-only R-Tree I know of none, but I would point out that libraries like this tend to: Get written (normally with some bugs). Bugs get ironed out though use. All active bugs are fixed Optional 'Latent' bugs which could never happen due to previous semantics of the platform on which the library operates crop up if the platform changes in some way. Thus lack

java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast

感情迁移 提交于 2019-11-30 10:04:55
Application Version: JBoss 7.0.0, Oracle 11g (ojdbc6.jar) and JDK 6 version I have a problem when I am trying to insert the value for CLOB Data type using CLOB.createTemporary function, getting the below exception. java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast to oracle.jdbc.OracleConnection After searching in multiple forums, did not find any solution. https://forums.oracle.com/forums/thread.jspa?threadID=279238 Basic steps required to deploy a WAR file and configuring the JBoss oracle driver pool configuration is done. But, still not able

Analyse code for spatial and temporal locality

て烟熏妆下的殇ゞ 提交于 2019-11-30 09:53:18
Hi have some question regarding spatial and temporal locality. I have read in the course theory that spatial locality If one item is referenced, the likelihood of other address close by will be referenced soon temporal locality One item that is referenced at one point in time it tend to be referenced soon again. Ok, but how do I see that in the code? I think I understood the concept for temporal locality but I don't understand spatial locality yet. For instance in this loop for(i = 0; i < 20; i++) for(j = 0; j < 10; j++) a[i] = a[i]*j; The inner loop will call same memory address when

convert matrix to raster in R

杀马特。学长 韩版系。学妹 提交于 2019-11-30 09:39:45
I have a matrix data with spatial coordinates and one variable. The spatial resolution is 1000 meters. > str(dat1) > List of 3 > $ x: num [1:710] 302340 303340 304340 305340 306340 ... > $ y: num [1:1241] 5431470 5432470 5433470 5434470 5435470 ... > $ z: num [1:710, 1:1241] 225 225 225 225 225 ... I want to convert it into raster format. > dat1$x[1:10] > [1] 302339.6 303339.6 304339.6 305339.6 306339.6 307339.6 308339.6 309339.6 310339.6 311339.6 > dat1$y[1:10] > [1] 5431470 5432470 5433470 5434470 5435470 5436470 5437470 5438470 5439470 5440470 I used the following code to do it. But the

Convert Begin and End Coordinates into Spatial Lines in R

南楼画角 提交于 2019-11-30 09:20:31
I have a set of begin and end coordinates that look like this: begin.coord <- data.frame(lon=c(-85.76,-85.46,-85.89), lat=c(38.34,38.76,38.31)) end.coord <- data.frame(lon=c(-85.72,-85.42,-85.85), lat=c(38.38,38.76,38.32)) I am trying to create a set of 3 line segments by connecting each begin point to its corresponding end point. I would like the end product to be a SpatialLines object so that I can use the it with over function in the sp package. Here's a way: ## raw list to store Lines objects l <- vector("list", nrow(begin.coord)) library(sp) for (i in seq_along(l)) { l[[i]] <- Lines(list

Spatial Data in PostgreSQL

痞子三分冷 提交于 2019-11-30 07:56:09
PostgreSQL supports a variety of geometric types out of the box, along with lots of geometric operators and GiST indexes which seem to offer spatial indexing of data. And then there's also PostGIS , which is an extension to PG. What is the difference between the built-in spatial support in PG and PostGIS? If my application needs to store geographical coordinates (points, areas, polygons) and then efficiently do queries (such as point-in-polygon, polygon intersection), do I need PostGIS or can I use the (arguably) more convenient and simpler built-in data types / syntax? First I'd like to

Mysql spatial distance using POINT - Not working

寵の児 提交于 2019-11-30 07:44:57
My goal is to use mysql POINT(lat,long) to find nearby entities in the database. I'm trying to do something like in the bottom of this tutorial http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL . Here is what I have got: Table: CREATE TABLE mark ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20) DEFAULT NULL, loc POINT NOT NULL, SPATIAL KEY loc (loc) ) ENGINE=MyISAM; Inserting some test-data: INSERT INTO mark (loc,name) VALUES (POINT(59.388433,10.415039), 'Somewhere 1'); INSERT INTO mark (loc,name) VALUES (POINT(63.41972,10.39856), 'Somewhere 2'); Declaring