Mickey Shine
Mickey Shine

Reputation: 12549

How to implement geo-based data store and computation?

Well, let me explain this briefly:

1.I want to build a website that provides location based services, like http://fireeagle.yahoo.net/ .

2.I guess most of these services have something do with longitude and latitude.

3.Is there any particular database/datastore/data structures fit well for such apps? I mean easy to store longitude, latitude and easy to compute or easy to use.

I am new to this and any feedbacks are welcome

Upvotes: 4

Views: 2452

Answers (3)

David Xia
David Xia

Reputation: 5453

MySQL has a spatial extension with tutorials here. The basic idea of getting fast queries is to design the table with a column with a spatial index, an R-tree index that's fast for range queries such as "give me points near this point."

Of course, there's Postgres with PostGIS and you could pay for this service from companies like SimpleGeo.

Upvotes: 1

user237076
user237076

Reputation:

I would recommend you to consider GeoDjango
It is very nice, as it merges the simplicity of Python/Django and the power of PostGIS. But it can also be complex and provide too many features, therefore wasting your time.

If you don't have particular needs, there is another simpler solution to be used with Django or Python alone, that is Geopy. While not adding spatial extensions to a database, it allows you to perform Geospatial calculations using generic data structures (also any database). You can calculate distances, doing (reverse) Geocoding. Take a look at the Getting Started page, but also directly at the code, as it is well documented. I'm using it for a Dynamic Carpooling project and it works very well.

Both solutions fit well with the Django framework, so you coud easily develop a website around the services provided.

Upvotes: 0

fmark
fmark

Reputation: 58577

Spatial extensions to relational database systems provide storage and indexed access the geography/geometry datatypes. They allow you to perform spatial joins and all sorts of spatial queries. In short, they are exactly what you need.

If you are using the open source stack I would recommend PostGIS, the spatial extension to Postgresql. If you are using the MS stack, try the spatial extensions to SQL Server 2008.

Upvotes: 2

Related Questions