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
15
votes
1 answer

Hibernate Spatial - Query within an X kilometer radius?

I am new to Hibernate Spatial, and am trying to perform a simple query of objects within a given radius. I've created a number of entries in my database with properties corresponding to a latitude and longitude, using data from Google Maps and…
Shadowman
  • 11,150
  • 19
  • 100
  • 198
15
votes
3 answers

MongoDB 2dsphere index $geoWithin performance

I have a collection with coordinate data in GeoJSON Point form, from which I need to query for the 10 latest entries within an area. There are now 1.000.000 entries but there will be about 10 times more. My problem is that when there are lots of…
hleinone
  • 4,470
  • 4
  • 35
  • 49
15
votes
4 answers

Greatest distance between set of longitude/latitude points

I have a set of lng/lat coordinates. What would be an efficient method of calculating the greatest distance between any two points in the set (the "maximum diameter" if you will)? A naive way is to use Haversine formula to calculate the distance…
Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
15
votes
4 answers

mongodb geoNear vs near

It looks like mongodb offers two similar functions for geospatial queries - $near and $geoNear. According to the mongo docs The geoNear command provides an alternative to the $near operator. In addition to the functionality of $near, geoNear…
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
15
votes
8 answers

Algorithm for determining minimum bounding rectangle for collection of latitude/longitude coordinates

Is there an algorithm to determine the minimum bounding rectangle around a set of latitude/longitude coordinates? It is OK to assume a flat earth since the coordinates will not be too far apart. Pseudocode is OK, but if someone has done this in…
Matthew Belk
  • 1,904
  • 2
  • 20
  • 28
15
votes
5 answers

Taking altitude into account when calculating geodesic distance

i´m currently dealing with gps data combined with precise altitude measurement. I want to calculate the distance between two consecuting points. There is a lot of information out there about calculating distance between two points using the WGS84…
Joachim Kerschbaumer
  • 9,695
  • 7
  • 49
  • 84
14
votes
2 answers

Entity Framework Core 3.1 with NetTopologySuite.Geometries.Point: SqlException: The supplied value is not a valid instance of data type geography

I have a model that looks like this: public class Facility { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public NetTopologySuite.Geometries.Point Location { get; set; } } Test code for…
Ogglas
  • 62,132
  • 37
  • 328
  • 418
14
votes
12 answers

Which algorithm can efficiently find a set of points within a certain distance of a path?

Given a set of points s (a set of x,y coordinates) and a path that is made up of line segments joining a set of points l, describe an efficient algorithm that can be used to find a subset of points from s that are within the specified distance d of…
user57568
  • 149
  • 1
  • 6
14
votes
3 answers

Geographic obstructions in radius searches

I am new here and points poor so I can only offer 50 pt bounty. Suppose I have an application a search for all gas stations within 10 mile radius of a certain location. However one side of this location is surrounded by a mountain range that you…
Michael Papile
  • 6,836
  • 30
  • 30
14
votes
3 answers

Sequelize geospatial query: find "n" closest points to a location

Using Sequelize and geospatial queries, if I want to find the "n" closest points to a certain location, how should the Sequelize query be? Assume I have a model that looks something like this: sequelize.define('Point', {geo:…
Pensierinmusica
  • 6,404
  • 9
  • 40
  • 58
14
votes
1 answer

What is the difference between Microsoft.Spatial and System.Spatial libraries

I would like to know what is the difference between two spatial libraries - Microsoft.Spatial and System.Spatial? When I'm looking into the code of those two I see almost the same classes. Both has for example GeographyPoint or Geography abstract…
Dawid Rutkowski
  • 2,658
  • 1
  • 29
  • 36
14
votes
5 answers

Geospatial coordinates and distance in kilometers

This is a followup to this question. I seem to be stuck on this. Basically, I need to be able to convert back and forth to referring to coordinates either in the standard degree system OR by measuring a distance north from the south pole along the…
DanM
  • 7,037
  • 11
  • 51
  • 86
14
votes
3 answers

Geo program design suggestions using Redis

I am in the process of learning Redis and am building a geo program for learning purposes. I would like to only use Redis to store the data and am trying to avoid any relational databases. My question is how to best design the database for the…
user2924127
  • 6,034
  • 16
  • 78
  • 136
14
votes
4 answers

What is the unit in returned by MySQL GLength method?

I want to get the length in meters between 2 points in the surface of the Earth. But the GLength method returns an unexpected value http://dev.mysql.com/doc/refman/5.0/en/geometry-property-functions.html#function_glength SELECT…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
14
votes
2 answers

MongoDB - Geospatial intersection of two polygon

Is there any way we can query and get location data using mongodb geospatial query that matches the following criteria? Getting all locations that are part of intersection between two boxes or in general two polygons. For example below can we get…