Reputation
1,143
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 17
Newest
 Yearling
Impact
~32k people reached

Jan
20
answered GeoDjango, distance filter based on database column
Jan
19
comment Create a GEOSGeometry from a FeatureCollection in GeoDango
Django does not currently support deserialization of geojson data, as stated here docs.djangoproject.com/en/dev/ref/contrib/gis/serializers . So you will have to come up with a custom solution along the lines of what alex proposed.
Jan
12
comment GeoDjango and PostGIS distance query efficiency concerns
If you set up Django with a PostGIS backend, then GeoDjango does essentially create PostGIS queries for you through distance lookups, it also automatically creates spatial indexes on your tables for models with geographic fields. The lookups are thus almost as fast as PostGIS queries. See docs.djangoproject.com/en/1.9/ref/contrib/gis/db-api/…
Jan
7
comment geojson data not getting displayed on map (Openlayers) in Geodjango
The serializer should find the geometry field and use it to serialize, I dont know why you are getting null values in the results.
Jan
7
comment geojson data not getting displayed on map (Openlayers) in Geodjango
The print is not very useful like this, the goal was to see the geometries. Could you try for dat in PFT.objects.all()[:10]: print dat.geom?
Jan
7
comment geojson data not getting displayed on map (Openlayers) in Geodjango
I updated the answer, try removing the geometry_field argument. If you dont have data, it could mean that you have rows that don't have a geometry. Try also PFT.objects.filter(geom__isnull=False)[:10]. What does print [dat.geom for dat in PFT.objects.all()[:10]] return?
Jan
7
revised geojson data not getting displayed on map (Openlayers) in Geodjango
removed unnecessary arg
Jan
7
answered geojson data not getting displayed on map (Openlayers) in Geodjango
Jan
5
accepted List of GDAL raster file extensions
Jan
5
revised List of GDAL raster file extensions
Added a suggestion of how to solve the problem differently.
Jan
5
suggested approved edit on List of GDAL raster file extensions
Jan
5
comment List of GDAL raster file extensions
I am not sure if I agree that file extensions are completely meaningless, but you are right that they are not a reliable way of determining file types.
Jan
5
revised List of GDAL raster file extensions
added reason for asking
Jan
5
asked List of GDAL raster file extensions
Nov
20
comment Using geomanager to query
That might be related to the table name. Make sure that if you have a table that is not managed by django, you set the table name on the model for it to find the data. But this is not really GIS related stuff, consider asking another question on stackoverflow if you have more specific questions around how to use django.
Nov
18
comment Using geomanager to query
btw, the error you got is specific to the get command, which expects your filter to return exactly one result (usually its done using some unique property like the pirmary key or in your case the osmid). If none or more than one result is returned, you will see an error.
Nov
18
comment Using geomanager to query
If your table already exists, you need to tell Django that it does not have to manage it, see docs.djangoproject.com/en/1.8/ref/models/options/#managed. Otherwise you would have to create a migration and migrate the database, see docs.djangoproject.com/en/1.8/topics/migrations. Its seems like you are new to Django, maybe try to follow the introduction tutorial for some of those details docs.djangoproject.com/en/1.8/intro/tutorial01
Nov
17
comment Using geomanager to query
I updated the answer with an example for the model, you can store the osmid as a normal integer field.
Nov
17
revised Using geomanager to query
added model example
Nov
16
answered Using geomanager to query