Files
2012-02-21 01:15:00 -05:00

1 line
3.9 KiB
JSON

[{"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1306982341.533632, "message": "So basically i have a locations model, and I want to add regions to it. In my mind i'd do this by adding a foreignkey to a regions models... however i've been recently playing around with all the other awesomeness django comes with, and i think this would be a perfect use case for GeoDjango?", "group_id": 81, "id": 1261797}, {"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1306982423.49386, "message": "I looked at the tutorial, but it did little to explain a basic use case, i got confused by world borders e.g being new to Geo and all.", "group_id": 81, "id": 1261802}, {"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1306982455.46596, "message": "does anyone know or have a link to a basic tutorial? i would like to query for a location and get the region it belongs to, as a short example", "group_id": 81, "id": 1261808}, {"user_id": 4581, "stars": [{"date_created": 1307001315.7580409, "user_id": 8}], "topic_id": 37758, "date_created": 1306986391.9554441, "message": " If your Region model contains some geometry (like a MultiPolygonField), you can find the Region that contains the point with something like: Region.objects.filter(geom__contains='POINT(%s %s)' % (long, lat))", "group_id": 81, "id": 1262641}, {"user_id": 4581, "stars": [], "topic_id": 37758, "date_created": 1306986280.45785, "message": "@rasiel What do you mean by \"location\"? Is that just a Point?", "group_id": 81, "id": 1262614}, {"user_id": 4581, "stars": [], "topic_id": 37758, "date_created": 1306986473.3855979, "message": "disclaimer: I'm a geo noob, and most of what I know I found by poking around in the contrib.gis code.", "group_id": 81, "id": 1262678}, {"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1307018801.829581, "message": "@bkmontgomery yes, this is probably what i mean, my location model is basically, address, city, state, zip, country ... I'm building it so that my country model will contain the geometry information", "group_id": 81, "id": 1266029}, {"user_id": 28384, "stars": [{"date_created": 1307028672.3165259, "user_id": 1081}, {"date_created": 1307208743.6436541, "user_id": 4581}], "topic_id": 37758, "date_created": 1307025721.986737, "message": "Have you had a chance to look at SimpleGeo's context API (as well as their other offerings). You can get a whole lot of information from a given address or lat/long via their context API. https://simplegeo.com/docs/api-endpoints/simplegeo-context and they have a python API wrapper https://simplegeo.com/docs/clients-code-libraries/python", "group_id": 81, "id": 1267581}, {"user_id": 26418, "stars": [], "topic_id": 37758, "date_created": 1307027980.125205, "message": "The contrib.gis tutorial in the django docs is a good place to start. One thing to keep in mind is that it's built on top of additional spatial functionality in the DB (eg, PostGIS), so it may also be useful to skim those docs to understand the basic concepts like LINESTRING/POLYGON/MULTIPOINT, Interior/Exterior/Boundary, etc.", "group_id": 81, "id": 1267928}, {"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1307028690.991396, "message": "@jemerick thanks a lot, will look at this", "group_id": 81, "id": 1268036}, {"user_id": 22713, "stars": [{"date_created": 1307028705.142781, "user_id": 1081}], "topic_id": 37758, "date_created": 1307028490.648504, "message": "@rasiel you read this https://docs.djangoproject.com/en/dev/ref/contrib/gis/", "group_id": 81, "id": 1267997}, {"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1307028742.1381249, "message": "I'm being shoved into GEO ... GIS without wanting, got a call this morning about another project involving GIS, thanks everyone for all the help", "group_id": 81, "id": 1268042}, {"user_id": 1081, "stars": [], "topic_id": 37758, "date_created": 1307028713.3124759, "message": "@sacrac1 Thanks for the link", "group_id": 81, "id": 1268040}]