Spatial

Determining the distance between two ZIP codes (alternatives to mapdist)

白昼怎懂夜的黑 提交于 2019-11-29 22:35:28
I want to calculate the distance between approx. 100,000 different ZIP codes. I know about the mapdist function in the ggmap package mapdist works perfectly: library(ggmap) mapdist('Washington', 'New York', mode = 'driving') # from to m km miles seconds minutes hours # 1 Washington New York 366284 366.284 227.6089 13997 233.2833 3.888056 mapdist('20001', '10001', mode = 'driving') # from to m km miles seconds minutes hours # 1 20001 10001 363119 363.119 225.6421 13713 228.55 3.809167 However, mapdist relies on the Google Geocoding API which is subject to a query limit of 2,500 geolocation

Spatial data types support in Linq2Sql or EF4

烂漫一生 提交于 2019-11-29 21:02:00
Does anyone know (ideally, with a reference), whether the VS2010 release of LinqToSQL or EntityFramework v4 will support queries over the SQL 2008 spatial data types? In EF 4.0 you might be able to hack something together using a combination of custom functions and pretending the spatial types are really Binary types. This is something that I am thinking of mucking around with and trying out and adding to my tips series . But as yet even the hack is unproven. :( And as for direct support, unfortunately neither L2S or EF v4 will support spatial types in the VS2010 timeframe. Alex James Entity

NoSQL and spatial data

心已入冬 提交于 2019-11-29 20:36:17
Has any of you had any experience with using NoSQL (non-relational) databases to store spatial data? Are there any potential benefits (speed, space, ...) of using such databases to hold data for, say, a desktop application (compared to using SpatiaLite or PostGIS)? I've seen posts about using MongoDB for spatial data , but I'm interested in some performance comparison. Peter Neubauer graphs databases like Neo4j are a very good fit, especially as you can add different indexing schemes dynamically as you go. Typical stuff you can do on your base data is of course 1D indexing (e.g. Timline or B

Hibernate 5 的模块/包(modules/artifacts)

落爺英雄遲暮 提交于 2019-11-29 18:03:41
Hibernate 的功能被拆分成一系列的模块/包(modules/artifacts),其目的是为了对依赖进行独立(模块化)。 模块名称 说明 hibernate-core 这个是 Hibernate 的主要(main (core))模块。定义了 ORM 的特性和 API 以及一系列整合的 SPIs。 hibernate-envers Hibernate 历史的实体版本特性 hibernate-spatial Hibernate 的 Spatial/GIS 数据类型支持 hibernate-osgi Hibernate 支持运行 OSGi 容器 hibernate-agroal 整合 Agroal 连接池库到 Hibernate hibernate-c3p0 整合 C3P0 连接池库到 Hibernate hibernate-hikaricp 整合 HikariCP 连接池库到 Hibernate hibernate-vibur 整合 Vibur DBCP 连接池库到 Hibernate hibernate-proxool 整合 Proxool 连接池库到 Hibernate hibernate-jcache 整合 JCache 缓存特性到 Hibernate,使任何与其兼容的缓存实现能够成为 Hibernate 二级缓存的提供者 hibernate-ehcache 整合

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

最后都变了- 提交于 2019-11-29 16:38:54
问题 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. 回答1: The NetTopologySuite is a JTS port to C# and it contains a STRtree class which is a read-only R-Tree 回答2: 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

Convert Begin and End Coordinates into Spatial Lines in R

爱⌒轻易说出口 提交于 2019-11-29 14:42:04
问题 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. 回答1: Here's a way: ## raw list to store

“Non Finite Transformation Detected” in spTransform in rgdal R Package

我只是一个虾纸丫 提交于 2019-11-29 12:40:50
I am trying to convert geographic coordinates (degrees) into UTM coordinates (meters) and keep getting an error message that a "Non finite transformation detected." Do you know how I can fix this? Here is the code I used: > GPS.Points <- Gomer.Data[, c('Longitude', 'Latitude')] > head(GPS.Points) Longitude Latitude 1 23.85474 -19.52211 2 23.85531 -19.52243 3 23.85534 -19.52257 4 23.85580 -19.52346 5 23.85551 -19.52380 6 23.85513 -19.52360 > GPS.Points.Spatial.Data <- SpatialPoints(GPS.Points, proj4string=CRS("+proj=longlat +ellps=WGS84")) > GPS.Points.Spatial.Data[1] SpatialPoints: Longitude

Is the SQL Server 2012 version of Microsoft.SqlServer.Types' geometry UDT backward compatible with SQL Server 2008?

回眸只為那壹抹淺笑 提交于 2019-11-29 12:36:36
问题 If I had both SQL Server 2008 and SQL Server 2012 installed locally, I would simply try this for myself; however I only have the newer version installed and would like to keep it that way. SQL Server 2008 comes with an assembly Microsoft.SqlServer.Types.dll , major version 10. SQL Server 2012 comes with an assembly Microsoft.SqlServer.Types.dll , major version 11. Among other things, both assemblies expose a SqlGeometryBuilder type. The one notable difference between the two assembly versions

How to remove the box frame in “plot.raster” in R package “raster”

≯℡__Kan透↙ 提交于 2019-11-29 11:45:25
问题 I need to remove the box frame around the figure in R package "raster", but I cannot figure out which argument I should change. The example is as follows: library(raster) r <- raster(nrows=10, ncols=10) r <- setValues(r, 1:ncell(r)) plot(r) plot(r,axes=F) 回答1: This works: plot(r, axes=FALSE, box=FALSE) To learn how you could have found that out for yourself, have a look at the underlying functions by trying the following. (The calls to showMethods() and getMethod() are needed because the

R: How can I count how many points are in each cell of my grid?

穿精又带淫゛_ 提交于 2019-11-29 11:19:30
I have made a reference grid, cells 50x50m, based on GPS locations of a collared animal. I want to do the equivalent to a spatial join in ArcGIS, and count the number of points in each cell. I have made a reference grid, using a SpatialPointsDataFrame object (the data frame is already projected, using UTM coordinate system) RESO <- 50 # grid resolution (m) BUFF <- 500 # grid extent (m) (buffer around location extremes) XMIN <- RESO*(round(((min(dat.spdf$Longitude)-BUFF)/RESO),0)) YMIN <- RESO*(round(((min(dat.spdf$Latitude)-BUFF)/RESO),0)) XMAX <- XMIN+RESO*(round(((max(dat.spdf$Longitude)