spatial

MySQL query for geographic midpoint

I need a MySQL query (or function) to calculate the geographic midpoint of an arbitrary number of latitude/longitude coordinates. I want to use Method C (Average latitude/longitude) as described on this page http://www.geomidpoint.com/calculation.html but can't figure out how to convert this into a SQL query. I'm looking for something of...

Google maps spatial reference system

What is Google map's spatial reference system using when you enter a lat, long into the maps search bar? I've found hints that it might be WGS84 but after converting to that coordinate system, nothing shows up when i paste the coordinates into the google maps search box. I am converting from GDA MGA 56. Sample: Input MGA56 coords: ...

Coordinate transform

Do any open source or 'free' libraries exist for Java where i can perform coordinate transforms from one spatial system to another? I found Opengeo http://opengeo.org/ but it's a huge and comprehensive library for all sorts of spatial things. Does anything smaller exist? I need to convert from MGA56 to WGS84. ...

Given a latitude and longitude, find users interested in that position

Given a table, +-----+---------+---------+---------+---------+---------+ | user| min_lat | max_lat | min_lng | max_lng | +-----+---------+---------+---------+---------+---------+ | a | 46 | 407 | 6 | 367 | | b | 226 | 227 | 186 | 188 | And a Point(x, y) Find users where the point is within the m...

Calculating distance from latitude, longitude and height using a geocentric co-ordinate system

I've implemented this method in Javascript and I'm roughly 2.5% out and I'd like to understand why. My input data is an array of points represented as latitude, longitude and the height above the WGS84 ellipsoid. These points are taken from data collected from a wrist-mounted GPS device during a marathon race. My algorithm was to conve...

What spatial SRID is this? (trying to convert a .shp file to WSG84)

Hi folks, I'm trying to import some Shapefile mapping data into Sql2008. Before I do that, I need to convert it to WGS84 / SRID 4326, because all my existing data is in this format. This is the source file info: GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994", SPHEROID["GRS_1980",6378137,298.257222101]], PRIMEM["Greenwich",0],UNIT["D...

SQL Server Spatial Datatypes

I have exported an ESRI shapefile to SQL Server 2008 using Manifold, which gives me a column "Shape" of type Geometry. The Manifold .prj file looks like this GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] so I assume the SRID is 4326? How...

How can I divide the globe in to small grids such that it allows me to assign each lat/long location to a grid?

In order to calculate the nearest locations that are represented by latitude/longitude, I was considering dividing the map into small grids, approximately 100x100 meter grids. Essentially each point would be assigned to a grid. I understand that I could instead also use spatial indexes with MySQL etc, but am planning to use a non-relati...

Is there a free .NET library to convert OSGB36 to WGS84

I need a .NET tool, preferably a library, that I can use in SSIS to convert Northing/Easting information from Collins Bartholomew (bartholomewmaps.com) into WGS84 with a ssrid of 4326 - to be used in SQL Server (Geography). Edit: In response to an answer given, the script looks interesting; do you think it would be easy to create a c# c...

Tools/Techniques to use our ability to think spatially

What software/UI techniques can leverage our spatial memory? I think and remember in physical space, often the location of something is as important as it's content. For instance I keep an untidy desk, but I know where to find things, I use different parts of my (multiscreen) desktop for different windows/icons. I annotate books (with p...

Sample Spatial Data for Sql Server 2008

Hi, I'm looking for sample database including spatial data. That can be also oracle-equivalent,convertable to sql server 2008 Related : http://stackoverflow.com/questions/57068/good-databases-with-sample-data ...

Spatial data/Geography in SQL Server 2008, OR mappers and C#

I'm developing an application in C# that will use and store geographic locations using the data type "Geography" in SQL Server 2008. I was planning to use the Entity Framework but soon discovered it lacks support for spatial data. Does anyone have experience with or know of other OR mappers with spatial support? The system will have few...

NoSQL and spatial data

Has any of you had any experience with using NoSQL (non-relational) databases to store spatial data? Are there any potential benefits (speed, space, ...) of using such databases to hold data for, say, a desktop application (compared to using SpatiaLite or PostGIS)? I've seen posts about using MongoDB for spatial data, but I'm interested...

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. ...

In Oracle, why can´t I select rownum in a outer query, when my inner query contains SDO_ANYINTERACT?

I have written a query in Oracle that looks like this: select ID, NAME, GEOMETRY from ( select a.*, rownum as rnm from ( select ID, NAME, GEOMETRY from MY_TABLE where SDO_ANYINTERACT(GEOMETRY, SDO_UTIL.SDO_GEOMETRY('POLYGON ((670000 6268000, 670000 6269000, 700000 6269000, 700000 6268000, 670000 6268000))')) = '...

Determining if a spherical triangle is obtuse

Given two points, A and B, defined by longitude and latitude I want to determine if another point C is ~between~ A and B. ~between~ is hard for me to define. I don't mean on the line - it almost certainly won't be. In this diagram, point C is ~between~ A and B because it is between the normals of points A and B and the line between th...

MySQL Spatial search for HSV (color) values?

Is it possible to use MySQL's spacial search to find points inside of a 3D polygon? Or better still, is it possible to use MySQL to find the values on the surface of an HSV cylinder? ...

Know of any C# spatial data libraries?

I'm looking at implementing spatial queries in .NET without using SQL2008. The first requirement is to be able to create a (BTree styled) spatial index and be able to query it. Although SQL 2008 ships with .NET libraries for the types, you need to use SQL for the spatial indexes. HAs anybody used any .NET libraries for spatial data (O...

Generating density/heat maps like SpatialKey

SpatialKey generates some really nice looking heatmaps, and we're looking into what's involved in doing this for an internal project to visualize large amounts of points. I'm looking for feedback on some ideas on where to get started (and it's just a really interesting problem). We know that they're using Flash, and from what we can t...

SQL Server & Mappoint/Spatial Table/Long&Lat

Hi all I am trying to map some data out of MS SQL Server 2008 (express) and Mappoint with the Mappoint addin for Sql server. The only issue i have is this spatial table stuff. I think i understand what a spatial data is now but i just need an example of how to go about cross referencing my states table with its spatial data. so i have a...