Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

We are creating a website that displays geographic data on map (currently using Google Maps js API). We are currently using postgres + postGIS + php. It has been recommended that I look into usage of GeoDjango. I'm having trouble determining what additional geographic functionality GeoDjango provides above what is available already in postGIS (ie points, linestrings, polygons, distance calculations, area calculations, "within" logic etc).

Does GeoDjango provide additional functionality or is its intent to simplify the usage of existing geographic functionality?

Thanks!

share|improve this question

2 Answers 2

GeoDjango also provides a lot of value-added, out-of-the-box features.

  • Geospatially enabled admin site: This is one of my favorite features of Django in general. Django automatically creates pretty nice looking admin pages. GeoDjango takes this a step further and provides you a way to easily view and edit geospatial data using an Openlayers map.
  • GeoRSS/GeoAtom feeds: Creating GeoRSS/GeoAtom feeds is relatively easy.
  • KML/GML/GeoJSON support: GeoDjango supports KML, GML, and GeoJSON serialization. Though as a disclaimer, I have done a few REST-APIs with Django and found that I do not use the built-in capabilities in GeoDjango for this.
  • Third-party libraries: OLWidgets is an example of a third-party library for GeoDjango that makes creating interactive maps easier. Also, you have access to a wide variety of Python libraries. As an example, there is a project called Haystack that provides full-text search capability. If you are using an external search index like Solr or Elasticsearch, you can use Django to do geospatially enabled full-text searches. Personally, Elasticsearch is a great replacement for PostGIS for spatial searches. It doesn't have all of the features of Postgis, but does a good job for most use cases.
  • It makes it really easy to move between different databases. I personally have used GeoDjango with Spatialite and Postgis.

My overall assessment is that Django and Python are much better for web development. We all have our personal bias, but Python has a large collection of geospatial and numerical libraries. This makes it a good choice if you need to implement complex geospatial algorithms.

share|improve this answer

yes. that is right. it is intent to simplify the usage of existing geographic functionality with basic functions. and it provides lots of geographic functions with some databases as shown at following image;

spatial

in addition to this, it is not hard to get more satisfying result with one paragraph function. this code gives you objects in 5 km radius.

qs = Events.objects.filter(point__distance_lte(pnt, D(km=5)))

if u want to get more information about geodjango, u can check out my answer here about same topic.

i hope it helps you...

share|improve this answer
    
I thing you need an = sign: qs = Events.objects.filter(point__distance_lte=(pnt, D(km=5))) –  Francis Yaconiello Sep 17 '12 at 19:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.