Questions tagged [spatial]

Spatial data types store geometric data, that is data related to an object's position in space.

Spatial data types store an object's position in space, colloquially these types are "geometric" or "geographic", and operating on them will make use of geodesic or Cartesian calculations. The applied field devoted to spatial data is Geographic Information Systems (GIS); the GIS Stack Exchange should be considered for questions with this tag.

Many popular databases engines now include support of spatial data types, including:

3312 questions
24
votes
1 answer

How can I query the postgres Point type from clojureql?

How can I query the postgres Point type from clojureql? I wish to use the PostGIS functionality but clojureql does not seem to include this.
yazz.com
  • 57,320
  • 66
  • 234
  • 385
24
votes
3 answers

SQL Server spatial and linked servers

I have a SQL Server instance that I've added a linked server to another SQL instance. The table I'm accessing on the linked server contains spatial types. When I try to query the table I receive an error: Objects exposing columns with CLR types…
BryceH
  • 2,740
  • 2
  • 21
  • 24
24
votes
3 answers

How can I do a spatial join with the sf package using st_join()

Here's a toy example I've been wrestling with # Make points point1 <- c(.5, .5) point2 <- c(.6, .6) point3 <- c(3, 3) mpt <- st_multipoint(rbind(point1, point2, point3)) # create multipoint # Make polygons square1 <- rbind(c(0, 0), c(1, 0),…
Ben
  • 20,038
  • 30
  • 112
  • 189
21
votes
5 answers

Need a standalone Java library for performing spatial calculations on lat/lon data

I'm looking for a Java library that is capable of performing spatial calculations on sets of lat/lon data. Here are some of the functions that I'm looking for: Calculate the Great Circle distance between two points Determine if a point lies…
Jim Tough
  • 14,843
  • 23
  • 75
  • 96
21
votes
5 answers

Spatial Data Structures for moving objects?

I was wondering what is the best data structure to deal with a lot of moving objects(spheres, triangles, boxes, points, etc)? I'm trying to answer two questions, Nearest Neighbor and Collsion detection. I do realize that traditionally, data…
esiegel
  • 1,773
  • 2
  • 19
  • 31
21
votes
3 answers

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

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
  • 88,211
  • 155
  • 421
  • 625
20
votes
5 answers

Different legends and fill colours for facetted ggplot?

Sorry for not included any example data for my problem. I couldn’t find a way to easily produce an example shape file. Hopefully, experienced users of ggplot can see what I’d like to do from the description below. I’ve got: A data.frame X with…
donodarazao
  • 2,773
  • 4
  • 26
  • 26
20
votes
2 answers

Create SpatialPointsDataframe

I have a dataframe df1 with 10 columns. Two of these columns are lng and lat. I want to create a SpatialPointsDataframe from df1. When I read on how to create a SpatialPointsDataframe it feels like I have to create a matrix m1 from my two…
four-eyes
  • 10,740
  • 29
  • 111
  • 220
20
votes
2 answers

leaflet with R: add text labels

This code is taken from this page: library(leaflet) leaflet(data = quakes[1:20,]) %>% addTiles() %>% addMarkers(~long, ~lat, popup = ~as.character(mag)) Instead of markers, is there any way to plot mag as text labels?
luciano
  • 13,158
  • 36
  • 90
  • 130
20
votes
3 answers

Spatial data types support in Linq2Sql or EF4

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?
Colin Desmond
  • 4,824
  • 4
  • 46
  • 67
18
votes
3 answers

Intersecting Points and Polygons in R

I am working with shapefiles in R, one is point.shp the other is a polygon.shp. Now, I would like to intersect the points with the polygon, meaning that all the values from the polygon should be attached to the table of the point.shp. I tried…
Jens
  • 2,363
  • 3
  • 28
  • 44
18
votes
6 answers

Parallel distance Matrix in R

currently I'm using the build in function dist to calculate my distance matrix in R. dist(featureVector,method="manhattan") This is currently the bottlneck of the application and therefore the idea was to parallize this task(conceptually this…
Vespasian
  • 605
  • 1
  • 5
  • 14
18
votes
6 answers

sql geography to dbgeography?

Maybe I'm missing something. I have a sql server column of the "Geography" datatype. I want to use the DbGeography type in my c# code. Any way to cast or convert from sql's geography to dbgeography?
Eric
  • 2,273
  • 2
  • 29
  • 44
18
votes
2 answers

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

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,…
Jian Zhang
  • 1,173
  • 5
  • 15
  • 20
17
votes
1 answer

Microsoft.SqlServer.Types.dll in the Global Assembly Cache?

I am currently struggling with deployment problems caused by Microsoft.SqlServer.Types and its associated unmanaged library, SqlServerSpatial110.dll - both for Microsoft SQL Server 2012. The problems are trivially easy to solve, just typical missing…
Xharlie
  • 2,350
  • 3
  • 19
  • 39