spatial

There are spatial data features for MS Sql Server 2005?

I wonder if there is any optimization I can do to achieve faster SELECTs for spatial data without moving to SQL SERVER 2008. There is for SQL Server 2005, natively or through plugins, any of the features below? Spatial field types Spatial indexes Arcsin math function for surface distance calculation on a sphere (Earth) ...

Any references on how to implement quadtrees with periodic limits?

Hi all, I have spatial data - (x, y) points on a plane - which I'm partitioning using quadtrees. The idea is to find which points are neighbors to a given (a, b) point. The points are neighbors if there some (say L) distance between the two. The problem is that the space is periodic, that is if a point is very close to the edge (< L) th...

Spatial Data in PostgreSQL

PostgreSQL supports a variety of geometric types out of the box, along with lots of geometric operators and GiST indexes which seem to offer spatial indexing of data. And then there's also PostGIS, which is an extension to PG. What is the difference between the built-in spatial support in PG and PostGIS? If my application needs to sto...

What are some recommended frameworks for manipulating spatial data in C++?

What are some recommended frameworks for manipulating spatial data in C++? I'm looking for a polygon object, point object, and some operations like union, intersection, distance, and area. I need to enter coordinates in WGS84 (lon,lat) and get area in square km. I would prefer a free/open source framework, but am open to suggestion...

Ranking using Geographic Location in Solr

What is the correct way to implement a custom ranking algorithm for Solr/Lucene? I read about Zvents implementing a Distance Weighting ranking system for documents which correspond to events in a specific geographic area (http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Zvents). I would like to do something simi...

Handling lat/long and mysql spatial points in rails

There have been a decent amount of questions about mysql spatial datatypes, however mine is more specific to how best to deal with them within a rails MVC architecture. I have an input form where an admin user can create a new point of interest, let's say, a restaurant and input some information. They can also input a human-readable ...

How to filter spatial data

I have a database of map points, and I want to limit the display to showing at most ~50 points at a time. When a user zooms in, more points may be displayed. Currently, I'm just taking a random sample of the result set. This isn't great, as there can be empty areas, that when zoomed in suddenly show a point. My next thought was I co...

Storing Large 2D Game Worlds

I've been experimenting with different ideas of how to store a 2D game world. I'm interested in hearing techniques of storing large quantities of objects while managing the set that's visible ( lets say 100,000 tiles square ). Obviously the techniques can vary based on how the game renders that space. Lets assume that we're describing ...

Losing decimals when using Oracle SDO_POINT in a view

We have a table containing coordinates, among other things. We used to store these in two number fields (x and y), but we've now replaced this with an SDO_GEOMETRY field. For backwards compatibility, we have created a view (with the same name as the table used to have), where we do: create or replace view meas_pnt as select ..., m.posit...

Custom Map With Directions

I want to make a map program that gives directions around a campus (residence halls, football field, etc), and within buildings (to offices, cafeteria, etc). Is there anything existing that would help facilitate that? The alternative seems to be that I would have to create my own map of points and paths around campus and do path-finding...

2D Game: Fast(est) way to find x closest entities for another entity - huge amount of entities, highly dynamic.

I'm working on a 2D game that has a huge amount of dynamic entities. For fun's sake, let's call them soldiers, and let's say there are 50000 of them (which I just randomly thought up, it might be much more or much less :)). All these soldiers are moving every frame according to rules - think boids / flocking / steering behaviour. For ea...

Spatial SQL: Most suitable datatype for a square?

I have a spatially enabled database (DB2, in this case). I need to store a large number of squares in a table. Which standard spatial SQL datatype is most suitable? I guess I could use an ST_polygon, but maybe there is a more specialized type which would give better performance better data guarantees (I want to catch it as an error if...

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

which data structure is appropriate to query "all points within distance d from point p"

hey there! i have a 3D pointcloud and i'd like to efficiently query all points within distance d from an arbitrary point p (which is not necessarily part of the stored pointcloud) the querry would look something like Pointcloud getAllPoints(Point p, float d); what accelerationstructure would be appropriate for this? A range-tree see...

Are SQL Server 2008 Spatial Data features useful for mapping queries?

I have an app where basically I have a huge table (100 million records) of information, with each row containing a lat/long value. I'm constantly querying this table to get all the records that fit within a radius around a certain point. For example, "all records within 5 miles of 39.89288,-104.919434" For this, I have an index over th...

Can I create a "Covering, Spatial" index in SQL Server 2008?

I currently have a site with a table that has Lat/Long float columns, and an index over those 2 columns plus another one I need to retrieve. I'm constantly querying this table to get the rows that fall within a radius from a certain point (I'm actually getting a square for speed), but I only need the fields that are already indexed, so ...

Speed up text comparisons (feature vectors) with spatial MySQL features

I have a function which takes two arrays containing the tokens/words of two texts and gives out the cosine similarity value which shows the relationship between both texts. The function takes an array $tokensA (0=>house, 1=>bike, 2=>man) and an array $tokensB (0=>bike, 1=>house, 2=>car) and calculates the similarity which is given back ...

Accessing PostGIS spatial data from Rails

I need to use an existing PostGIS database from my Rails application. So far I am able to access the DB just fine, GeoRuby nicely converts the 'geom' column into a Point object. What I am looking for is an easy way to execute ActiveRecord-like queries on those tables, e.g. Poi.find_within_radius(...) or similar spatial queries like d...

Mapping Calculated Fields in Hibernate

I'm not sure if this is possible in Hibernate but it would be really great if it was :) I've not actually got past the conceptual stage with this but I'll explain as best as I can. I want to make use of Oracle Spatial features to do proximity based searching. Imagine I've got a Location entity which stores a latitude/longitude value. Th...

Best Performance-Critical Algorithm for Solving Nearest Neighbor

We have a list of x,y pairs. Every pair represents a point on a 2D space. I want to find the closest point from this list, to a specific point xq,yq. What is the best performance-critical algorithm for this problem? Lisp of points is not going to change; which means I do not need to perform insertion and deletion. I want just to find the...