Spatial

MySQL VS Postgres/POSTGIS spatial database support [duplicate]

泪湿孤枕 提交于 2019-12-06 15:45:51
This question already has answers here : GIS: PostGIS/PostgreSQL vs. MySql vs. SQL Server? [closed] (5 answers) Closed 4 years ago . We're building a small-sized GIS Web application (as a school project) right now. In terms of spatial database support and capabilities, which is better? Check it out for yourself, you know what you're looking for in your GIS-application: http://www.bostongis.com/PrinterFriendly.aspx?content_name=sqlserver2008_postgis_mysql_compare In general PostGIS is much more mature and is very flexible. You can create any function, operator, index type or what so ever. It

get cell number within a distance of one point (raster)

旧街凉风 提交于 2019-12-06 13:38:29
I need to get the cell numbers within a distance (e.g., 10 km) of one point using R, but I didn't figure out how to handle it for the raster data. library(raster) r <- raster(ncols=10, nrows=10) cellFromXY(r, c(2,2)) # get the cell number of one point How to get the cell numbers within a distance of one point? Use extract with the buffer option and cellnumbers=TRUE r <- raster(ncols=100, nrows=100) r[]<-runif(ncell(r)) xy <- cbind(-50, seq(-80, 80, by=20)) extract(r, xy[1:3,], buffer=1000000,cellnumbers=TRUE) 来源: https://stackoverflow.com/questions/13996256/get-cell-number-within-a-distance-of

Geospatial Point Mapping in Fluent NHibernate

ぃ、小莉子 提交于 2019-12-06 13:36:08
问题 I'm struggling to get Fluent NHibernate to play nice with SQL Server's Geospatial types. I want to store a geographic point in my Place class, but I keep getting an NHibernate configuration error when I run my ASP.NET MVC app: Method 'SetParameterValues' in type 'NHibernate.Spatial.Type.GeometryType' from assembly 'NHibernate.Spatial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Update : This is caused by an out-dated NHibernate.Spatial DLL.

Assign rows to a group based on spatial neighborhood and temporal criteria in R

瘦欲@ 提交于 2019-12-06 12:38:34
I have an issue that I just cannot seem to sort out. I have a dataset that was derived from a raster in arcgis. The dataset represents every fire occurrence during a 10-year period. Some raster cells had multiple fires within that time period (and, thus, will have multiple rows in my dataset) and some raster cells will not have had any fire (and, thus, will not be represented in my dataset). So, each row in the dataset has a column number (sequential integer) and a row number assigned to it that corresponds with the row and column ID from the raster. It also has the date of the fire. I would

Coordinate transform

大兔子大兔子 提交于 2019-12-06 12:21:57
问题 Do any open source or 'free' libraries exist for Java where i can perform coordinate transforms from one spatial system to another? I found Opengeo http://opengeo.org/ but it's a huge and comprehensive library for all sorts of spatial things. Does anything smaller exist? I need to convert from MGA56 to WGS84. 回答1: A simple solution is PROJ.4, but it doesn't have Java bindings, so working with it might be a bit tricky. A more complete (but probably bigger than you want) solution would be

Interpolating Gridded 3D Data to a finer scale

断了今生、忘了曾经 提交于 2019-12-06 10:37:21
I have a NetCDF file of a probability surface. It's a 30x30 grid of 0.25 degree lat/lon intervals with a probability surface described in the z dimension. I can easily import this into Panoply, a NetCDF viewer: And it's then a breeze (checking one box) to interpolate/smooth the raw data to a finer grid size: However, I don't just want to visualize the data, I want to plot it in R along with bathymetry and point data. That all is no problem, but I have not found a straightforward way to interpolate the gridded data in R. Here's the code I use to import and plot the data: library(RNetCDF) nc <-

How to unlist spatial objects and plot altogether in R

梦想的初衷 提交于 2019-12-06 09:20:40
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, 268641, 2623722, 2623722 (xmin, xmax, ymin, ymax) coord. ref. : +proj=utm +zone=46 +datum=WGS84 +units=m

How to use DbGeography.Filter in Linq with Entity Framework 5?

徘徊边缘 提交于 2019-12-06 08:16:53
问题 With Entity Framework 5 it is possible to use the SQL Server Spatial procedures in Linq queries. For example, using a DbGeography object, you can use the "Buffer()" method which will translate to STBuffer in SQL Server. Same way, Intersects() will translate to STIntersects. This is an example query that works: var point = DbGeography.FromText(string.Format("POINT({1} {0})", latitude, longitude), 4326); var query = from person in persons let region = point.Buffer(radius) where person.Location

Spatial Hibernate 5 On Wildfly 10

大兔子大兔子 提交于 2019-12-06 07:59:32
问题 I am using Wildfly 10 and developing an application using Spatial Hibernate 5 with PostGIS database. I am getting the below error in runtime. java.lang.IllegalStateException: Received object of type org.postgresql.util.PGobject Can anyone suggest some good tutorials as on how to use Spatial Hibernate with Wildfly 10? 回答1: I had the same problem and I just fixed it. It is basically a dependency issue. The problem is that you are loading the postgresql and/or postgis jars on your wildfly

Error when re-projecting spatial points using spTransform in rgdal R

你。 提交于 2019-12-06 07:03:07
问题 G'day, I have a large number of lon/lat coordinates that are in the CRS Australian Geodetic Datum 66/84 (AGD66 for brevity). I want to change these coordinates from AGD66 to WGS84 because there is about a 200m difference between them and I have other coordinates and layers in WGS84. I have tried to do this by: lon lat 147.1428 -43.49083 library(rgdal) pts<-read.table(file.choose(),header=TRUE,sep=',') # I first project the pts in their original CRS pts66<-project(cbind(pts$lon,pts$lat), "