Spatial

Changing CRS of a SF object

落花浮王杯 提交于 2019-12-14 01:50:23
问题 I have some 'roads' as a sp object: class : SpatialLinesDataFrame features : 17360 extent : 490176.4, 567680.9, 148639.1, 212821 (xmin, xmax, ymin, ymax) coord. ref. : +init=epsg:27700 +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs +ellps=airy +towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894 variables : 4 names : osm_id, lanes, type, width min values : 73, 2, motorway, 6.3 max values : 587969162, 6, trunk, 18.9 I convert

saving a polygon in oracle database

会有一股神秘感。 提交于 2019-12-14 00:25:01
问题 I have captured four points(coordinate) of a plot using a gps device. Point 1:- lat- 27.54798833 long- 80.16397166 Point 2:- lat 27.547766, long- 80.16450166 point 3:- lat 27.548131, long- 80.164701 point 4:- --- now I want to save these coordinate in oracle database which save it as an polygon. Thanks 回答1: If you're intending to use Oracle Spatial for storage or processing of polygons, then you'll need to store the data as an SDO_GEOMETRY object. Here's a quick example: CREATE TABLE my

How can I plot a georeferenced dataset in R?

不打扰是莪最后的温柔 提交于 2019-12-13 20:01:09
问题 I have this gridded data that I want to plot on a US map: https://www.dropbox.com/s/9khcjgtv8ipo2u5/windspeed.txt?dl=0 library(ggplot2) library(RColorBrewer) library(rgdal) library(sp) library(maps) options(max.print=5.5E5) all_data = read.table("windspeed.txt",header = TRUE) res=0.01 #spacing of row and col coords pre-specified origin_lat_lon=c(24.55, -130) all_data$row=(all_data$row)*res+origin_lat_lon[1] all_data$col=(all_data$col)*res+origin_lat_lon[2] coords = cbind(all_data$col, all

Compatibility neo4j-spatial with spring-data-neo4j-rest and neo4j CE 2.2.1 server mode?

Deadly 提交于 2019-12-13 19:20:20
问题 I'm trying to make neo4j-spatial version 0.14-neo4j-2.2.0, works with spring-data-neo4j-rest version 3.3.0.RELEASE with neo4j CE 2.2.1 in server mode. It looks like they are not compatible. Trying to create new instance of class EditableLayer throws NoSuchMethod exception. For instance: EditableLayer layer = (EditableLayer) spatialDb.getOrCreateLayer( "layer",SimplePointEncoder.class, EditableLayerImpl.class); I get the exception: SEVERE: Servlet.service() for servlet [com.stampy.foundation

Self-authored package: load plot method for spatialPolygonsDataFrame

别说谁变了你拦得住时间么 提交于 2019-12-13 18:09:38
问题 I'm writing my own R package and would like to plot a spatialPolygonsDataFrame object. If I were writing it as a script I would simply load the necessary packages ( maptools , rgdal , and rgeos ) with library() and plot with plot(x) . When writing a package to build using library() is not advised, instead it is usual to load the package by adding it to Imports: in the NAMESPACE . If I do this I receive the following error: Error in as.double(y) : cannot coerce type 'S4' to vector of type

Calculate variogram of raster data with NAs in R

别来无恙 提交于 2019-12-13 13:34:11
问题 Summary: I have a raster dataset which contains NA values, and want to calculate a variogram of it, ignoring the NAs. How can I do this? I have an image which I have loaded into R using the readGDAL function, stored as im . To make this reproducible, the result of dput on the image is available at https://gist.github.com/2780792. I am trying to display a variogram of this data and am struggling. I'll go through what I've tried so far: I tried the gstat package, but couldn't seem to get a

SQL-Server 2008 R2 geoSpatial query error for Circular String

徘徊边缘 提交于 2019-12-13 08:13:58
问题 SQL Spatial Features: SQL geometry Point, Linestring working well but the Circular string is not working. When i try to save the CircularString type data to my geometry datatype its throws the following error: My statement: DECLARE @g1 geometry = 'CIRCULARSTRING EMPTY'; "A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry": System.FormatException: 24114: The label CIRCULARSTRING EMPTY in the input well-known text (WKT) is not valid. Valid labels are

How to draw SQL Server “circularstring” in C# [closed]

删除回忆录丶 提交于 2019-12-13 08:04:29
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . SQL Server has a spatial type "circularstring" that is collection of odd points. How can I draw this type in c#. Drawarc works based on angles while in circularstring we have just points. Drawcurve works based on the points but the result is not the same as circularstring. With

R package spatstat: How to use point process model covariate as factor when pixel image values are numeric

删除回忆录丶 提交于 2019-12-13 06:57:17
问题 I am trying to model a point process with an image covariate using the ppm() function in the spatstat package in R. I convert my raster to an im object for use with spatstat, and I run into a problem using the im as a covariate in the model. The pixel values are numeric, but these are actually just codes for different landscape zones so the crux of the problem is getting the model to read the pixel values as factor rather than numeric. I have tried the following two approaches (R code and

No index provider 'spatial' found

落爺英雄遲暮 提交于 2019-12-13 05:15:57
问题 I tried to create a class called Neo4jPoint with an attribute @Indexed(indexType=IndexType.POINT, indexName="geolocation" String wkt; When I run my junit test case, it encountered the following: java.lang.IllegalArgumentException: No index provider 'spatial' found. Maybe the intended provider (or one more of its dependencies) aren't on the classpath or it failed to load. at org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:88) at org.neo4j.kernel.IndexManagerImpl