views:

64

answers:

2

I am new to geodjango. I am using a geodjango model for my application. in one of my geodjango model class I am using a location field of type PointField() . I want to store the location for each entry into that model class Table. Could anyone please help me how to insert values into that field, Or could anyone please suggest a reference model for making an understanding of geodjango.

+1  A: 

The tutorial is a good starting point.

Hank Gay
A: 

You need to use WKT format. Some examples:

POINT(14 15)
POLYGON((1.0 1.0, 0.0 0.0, 1.0 0.5, 1.0 1.0))

You can also use OSMGeoAdmin or GeoModelAdmin as a replacement for ModelAdmin to get a map that you can draw your data on.

jcdyer
Thanks...for bit more clarification ...its basically an event site. I want the location to be captured and stored into the DB is there a possible way to achieve it. Please advice
Joseph
Both of the things I have mentioned will "capture the location and store it in the database." Do you want people to type in the address? identify the location on a map? The generic answer is that somehow, you have to translate their input into longitude and latitude, so you can enter it into the database as a point object or as WKT. Depending on how this is happening, there may or may not bee tools available to help you with the task. For anything more specific, you need to understand and explain your workflow in very concrete terms.
jcdyer