Questions tagged [geodjango]

GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness the power of spatially enabled data.

GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness the power of spatially enabled data.

http://geodjango.org/

1020 questions
0
votes
1 answer

Either google map marker OR map will display, but not both?

I can't figure out what is going on here. The waypoints are data from my database and when I view the page source the correct data seems to be populating the javascript variables. The map is centering in the correct area where I want it to center,…
0
votes
2 answers

Distance Spatial Queries with Tastypie

Not sure how to use distance_lte spatial filters with tasty-pie. I can use the contains spatial filter i am unable to figure out the format for the distance_lte filter. Here is what I have…
orbital
  • 943
  • 3
  • 16
  • 28
0
votes
1 answer

(geo)django's dwithin-filter giving error whereas ST_DWithin from postgres works

I'm using geodjango and I want to filter rows from a table based on distance: geom = models.MultiLineStringField() When I use geodjango like so: geo_objects.objects.filter(geom__dwithin=(pnt, D(km=10))) where pnt is 'POINT (-73.5666999999996136…
Jenia Ivanov
  • 2,485
  • 3
  • 41
  • 69
0
votes
0 answers

Retrieving Django LineStringField causes DjangoUnicodeDecodeError

I have a GeoDjango model: class RouteLeg(models.Model): """Models one 'leg' of a route. A leg is one linestring and belongs to a route.""" # the route which owns it route = models.ForeignKey(Route) # A line which represents this leg of…
user707915
  • 16
  • 2
0
votes
1 answer

Getting distance in django with out a geoDjango backend (PostGIS, etc...)

I don't want to go through the pain of installing PostGIS so can I get places ordered by distance from an origin using django.contrib.gis? models.py from django.contrib.gis.geos import Point class Place(models.Model): name =…
Robert Johnstone
  • 5,431
  • 12
  • 58
  • 88
0
votes
1 answer

Django ModelForm - just want to modify save() to have commit=False

I am trying to use a ModelForm with only some of the model fields so that users can submit data, but I want the submissions to be emailed to me instead of saved in the database so I can check them over and add info for the rest of the fields before…
LVNGD
  • 169
  • 3
  • 12
0
votes
1 answer

GeoDjango query PointField by coords

Is it possible to query a django model by the lng, lat values of a PointField? <---example---> Foo.objects.filter(bar=(-73, 34)) ## bar == name of PointField in the django model. ## -73 == longitude ## 34 == latitude
Ryder Brooks
  • 2,049
  • 2
  • 21
  • 29
0
votes
1 answer

Calling transform() with no SRID set is not supported

On production server I receive the attached error, not emerging on the development server. Both environments are identical (same Django 1.6 and Python 2.7 versions, using virtualenvs same RDBMS version - a postgresql 9.1 server, running locally with…
furins
  • 4,979
  • 1
  • 39
  • 57
0
votes
2 answers

Add marker on a map and catch the point-value to a django form? Ajax / Geodjango

Im playing around with Django/GeoDjango (and leaflet maps) but my lack of experience in Javascript/AJAX makes me want to check with you guys on this. Say I want to add a marker with a position and some other information fields (and save it as a new…
user3199840
  • 525
  • 2
  • 13
  • 35
0
votes
1 answer

ERROR: function addgeometrycolumn(unknown..), when inserting sql file in to postgis database

I am trying to import the spatial file in to my database Firstly i have created a database using postgis template as below createdb -T template_postgis database_name; I have postgis installed already on my machine POSTGIS="2.1.1 r12113"…
Shiva Krishna Bavandla
  • 25,548
  • 75
  • 193
  • 313
0
votes
1 answer

Geodjango ... ImportError: No module named apps.AdminConfig

I have no idea why the app is crashing when I try to run: python manage.py sqlall world I am taking the django tutorial for geodjango, and my settings contain: INSTALLED_APPS = ( 'django.contrib.admin.apps.AdminConfig', …
0
votes
2 answers

geodjango - search by city, state or zip code

How can I use geodjango to search by city and state or zip code in my django application? I am very new to geodjango and just trying to wrap my head around what would be involved in this. Also, does anyone know of an app that already implements…
Joe
  • 4,553
  • 9
  • 51
  • 57
0
votes
1 answer

How to create django.contrib.gis.db.models.PointField from gdx track point?

I'm trying gpxpy lib and its probably working, but I can't create PointField... Can't find documentation on it. Also, how can I create a set of PointFields with GDAL from gpx track? Here is my code in case you need it. def upload(request): …
user1685095
  • 5,787
  • 9
  • 51
  • 100
0
votes
1 answer

Django: Filtering Queryset From Two Model Fields

My model has two fields (latitude and longitude) that I want to combine to form a point object. However, I cannot figure out how to filter based on a combination of those values: For example: >>> from django.contrib.gis.geos import Point >>> lat =…
Nick B
  • 9,267
  • 17
  • 64
  • 105
0
votes
1 answer

PostGIS and PostgreSQL search path

We recently added Geodjango and PostGIS to the system. I see that PostGIS installs itself in the public schema. Now, we are using PostgreSQL schemas for client tenancy, so for example client A will have a schema tenant_A, so we usually set the…
Goro
  • 9,919
  • 22
  • 74
  • 108