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
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
2 answers

Handling Mysql Spatial datatypes in Laravel Eloquent ORM

How to handle mysql spatial datatypes in eloquent ORM?, This include how to create migration, insert spatial data and performing spatial query's. If there is not actual solutions exists, is there any workarounds?
Jithin Jose
  • 1,761
  • 2
  • 19
  • 35
21
votes
3 answers

Why Use Redis instead of MongoDb for Caching?

I've seen many people using Redis as a cache lately, why not Mongo? As far as I could tell Redis can set an expire date on an index, like memcache but otherwise are there any reasons not to use Mongo for this? I ask as I'm doing a large join in…
jfountain
  • 3,715
  • 2
  • 24
  • 22
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

Using geometry with srid 4326, what unit of measure does STDistance return?

So here is my set up: I have a table such as: Id, Lat, Long, GeoPoint, GeomPoint both GeoPoint (geography) and GeomPoint (geometry) are set to SRID 4326 I have the following query: DECLARE @radiiCollection TABLE ( [ID] INT…
zach
  • 782
  • 2
  • 10
  • 22
20
votes
2 answers

What is SRID 0 for geometry columns?

So I added geometry columns to a spatial table and using some of the msdn references I ended up specifying the SRID as 0 like so: update dbo.[geopoint] set GeomPoint = geometry::Point([Longitude], [Latitude], 0) However, I believe this was a…
zach
  • 782
  • 2
  • 10
  • 22
20
votes
3 answers

Is it against license to publish Oracle and SQL Server performance test?

I would like to make a performance test on spatial index in Oracle and SQL Server. I would like to include it in my Master of Science work. Is it against dbms's license to publish that kind of results ? Maybe someone have already met that kind of…
mareks.poland
  • 233
  • 2
  • 6
19
votes
7 answers

Python module for storing and querying geographical coordinates

Is there a Python module where I can create objects with a geographical location coordinate (latitude and longitude), and query all the objects for ones which are within a 5km distance (i.e. radius) of a given coordinate? I've been trying to store…
Jon Cox
  • 10,622
  • 22
  • 78
  • 123
19
votes
4 answers

how to convert between degrees, minutes, seconds to Decimal coordinates

Looking for a java utility. It is even better if you can tell me how to do it using geotools library.
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
19
votes
4 answers

Snap a point to the closest point on a line segment using sf

I would like to snap a point to the closest point on a road segment using sf::st_snap. However, the function seems to return the wrong result, it's snapping my point to a point at the start of the road segment. Any ideas on how to fix this?…
rafa.pereira
  • 13,251
  • 6
  • 71
  • 109
19
votes
2 answers

Distance in meters between two Spacial Points in MySQL query

I am trying to query a MySQL database (version 5.7.15) to retrieve all locations that are within 300 meters from some coordinates (40.7542, -73.9961 in my case): SELECT * FROM location WHERE st_distance_sphere(latlng, POINT(40.7542, -73.9961)) <=…
grim
  • 6,669
  • 11
  • 38
  • 57
19
votes
8 answers

Use MySQL spatial extensions to select points inside circle

I have a table called flags that contains a column called coordinates that is full of MySQL 'points'. I need to perform a query where I get all the flags within a circle based on a latitude and longitude position with 100m radius. From a usage point…
jskidd3
  • 4,609
  • 15
  • 63
  • 127
19
votes
6 answers

How to get the bounding coordinates for a US postal(zip) code?

Is there a service/API that will take a postal/zip code and return the bounding(perimeter) coordinates so I can build a Geometry object in a MS SQL database? By bounding coordinates, I mean I would like to retrieve a list of GPS coordinates that…
ecco88
  • 606
  • 2
  • 7
  • 16
18
votes
2 answers

Find all coordinates within a circle in geographic data in python

I've got millions of geographic points. For each one of these, I want to find all "neighboring points," i.e., all other points within some radius, say a few hundred meters. There is a naive O(N^2) solution to this problem---simply calculate the…
conradlee
  • 12,985
  • 17
  • 57
  • 93