Questions tagged [geospatial]

pertaining to the geographic location and characteristics of natural or constructed features and boundaries on, above, or below the earth's surface; esp. referring to data that is geographic and spatial in nature.

Geospatial (adj) Definition: pertaining to the geographic location and characteristics of natural or constructed features and boundaries on, above, or below the earth's surface; esp. referring to data that is geographic and spatial in nature.

[Source]

4809 questions
14
votes
5 answers

Determine if Lat/Lng in Bounds

I'm interested in determining if a lat/lng location is within the bounds and looking for recommendations on a algorithm. (javascript or php) Here is what I have so far: var lat = somelat; var lng = somelng; if (bounds.southWest.lat < lat && lat <…
Tegan Snyder
  • 741
  • 1
  • 9
  • 20
13
votes
2 answers

Best method of spatial interpolation for geographic heat/contour maps?

I'd like to use something like ggplot2 and ggmap to produce a heat map of arbitrary values such as property prices per metre squared over a geographic area at a street level (with a high resolution). Unfortunately, the task appears to be rather…
Harold Cavendish
  • 869
  • 10
  • 22
13
votes
2 answers

The featureCompatibilityVersion must be 3.4 to use collation

I need to integrate miles/distance search in my website and I am using MongoDB geospatial indexes, however, I am getting some and unable to resolve. below are my schema and command I am using... => db.properties.findOne({},{address:1}) { "_id"…
Flexsin Tech
  • 207
  • 3
  • 10
12
votes
5 answers

How to Calculate Centroid

I am working with geospatial shapes and looking at the centroid algorithm here, http://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon I have implemented the code in C# like this (which is just this adapted), Finding the centroid of a…
peter
  • 13,009
  • 22
  • 82
  • 142
12
votes
4 answers

Joins on spatial mysql indexes

I have two tables: one with points, the other with polys. CREATE TABLE `points` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `point` point NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM; CREATE TABLE `ranges` ( `id` int(10) unsigned NOT…
Oroboros102
  • 2,214
  • 1
  • 27
  • 41
12
votes
2 answers

How is $maxDistance measured in MongoDB?

I can't seem to find this information. But using a geo search you can specify $maxDistance but for the life of me, I can't find if that is miles, kilometers, etc. Here is a sample query I'm using: db.hotels.find( { location: { $near : [18.74255,…
cbmeeks
  • 11,248
  • 22
  • 85
  • 136
12
votes
3 answers

MySQL INSERT/UPDATE on POINT column

I'm trying to populate my DB with geographical places of my country. One of my tables have 4 fields: ID[PK], latitude. longitude ande geoPoint EDIT `SCDBs`.`Punto_Geografico`; SET @lat = 18.469692; SET @lon = -63.93212; SET @g = 'POINT(@lat…
Luis D Urraca
  • 2,024
  • 4
  • 24
  • 46
12
votes
4 answers

R measuring distance from a coastline

I have a set of coordinates: d1 <- data_frame( title = c("base1", "base2", "base3", "base4"), lat = c(57.3, 58.8, 47.2, 57.8, 65.4, 56.7, 53.3), long = c(0.4, 3.4, 3.5, 1.2, 1.5, 2.6, 2.7)) I would like to know whether the coordinates fall on land,…
Mrmoleje
  • 453
  • 1
  • 12
  • 35
12
votes
1 answer

Why does SQL Server GEOGRAPHY allow longitudes between -15069° and +15069°? Why ±15069°?

I am using the Microsoft.SqlServer.Types DLL in my projects for validating Latitudes and Longitudes. The Library validates longitude values between -15069 and 15069 degrees instead from -180 to 180. Can anybody explain what is the significance or…
12
votes
8 answers

Why are my spatial searches slower in SQL Server than PostGIS?

I'm working on moving some spatial searching capabilities from Postgres with PostGIS to SQL Server and I'm seeing some pretty terrible performance, even with indexes. My data is around a million points, and I want to find out which of those points…
Brendan Long
  • 53,280
  • 21
  • 146
  • 188
12
votes
4 answers

Calculate endpoint given distance, bearing, starting point

I am trying to find the destination point, given a starting point lat/long, bearing & distance. The calculator from this website below gives me the desired results. http://www.movable-type.co.uk/scripts/latlong.html When I try to implement the same…
Sri
  • 121
  • 1
  • 1
  • 5
12
votes
3 answers

SQL query to query nearby points of interest based on lat/long - SQLite

Given a database that contains three fields: Latitude Longitude Proximity Where Lat and Long are GPS coordinates, and Proximity is (some unit - feet? Seconds? Minutes?) And given the user's current GPS lat/long... I want to write a SQL query that…
Don Jones
  • 9,367
  • 8
  • 39
  • 49
12
votes
3 answers

Selecting a good SQL Server 2008 spatial index with large polygons

I'm having some fun trying to pick a decent SQL Server 2008 spatial index setup for a data set I am dealing with. The dataset is polygons, representing contours over the whole globe. There are 106,000 rows in the table, the polygons are stored in a…
12
votes
2 answers

Does Android platform support SpatiaLite?

Is it possible to use SpatiaLite database on Android platform (1.6)? I am trying to program a google buzz-like app which need to take advantage of SpatiaLite functions, like calculating distance between 2 points, etc. Any external library needed?…
Stan
  • 37,207
  • 50
  • 124
  • 185
12
votes
3 answers

SQL 2008 geography & geometry - which to use?

I'm creating a Google map mashup and am using SQL 2008. I will have a large number of points on the earth and will want to perform various calculations on them in SQL - such as selecting all points contained within a particular polygone, or select…
Mr. Flibble
  • 26,564
  • 23
  • 69
  • 100