djangosnippets.org: Latest snippets tagged with 'postgis'https://djangosnippets.org/tags/postgis/2010-09-15T20:29:54.568058-05:00create_template_postgis-ubuntu_lucid
2010-09-15T20:29:54.568058-05:00clawlorhttps://djangosnippets.org/snippets/2197/<p>The template creation script referenced <a href="http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#ubuntudebian">here</a> doesn't work on Ubuntu Lucid, where the default PostgreSQL version is now 8.4 and some things have been moved around. I've edited the script to work on Ubuntu Lucid.
</p>
Freely redistributablePostGIS "nearest" including range limiting
2008-07-24T06:38:56.449132-05:00lkclhttps://djangosnippets.org/snippets/908/<p>this is an enhancement to paulsmith's code snippet 190, to provide an extra "search by distance" parameter rather than "limit number of results returned".</p>
<p>i need this for a social networking site where users can search for people within a certain geographical area.</p>
Freely redistributableFind nearby objects
2007-04-18T19:21:58.620102-05:00paulsmithhttps://djangosnippets.org/snippets/190/<p>This code assumes a) that you are using PostgreSQL with PostGIS and b) that the geometry column in your model's table is populated with points, no other type of geometry.</p>
<p>It also returns a list instead of a QuerySet, because it was simpler to sort by distance from the given …</p>
Freely redistributable