As long as you're only interested in *displaying* the city, and not querying
on it, one sneaky solution would be to do the lookup in Javascript, using
the clients processing power and not your App, using an API like SimpleGeo's
or Google's reverse geocoder:

https://simplegeo.com/docs/api-endpoints/simplegeo-places

Less sneaking, SimpleGeo has a python client (has anyone used it?):
https://simplegeo.com/docs/clients-code-libraries/python


On Thu, Apr 7, 2011 at 8:49 AM, Massimiliano <
massimiliano.pietr...@gmail.com> wrote:

> Thanks Ikai, but the problem is to obtain the city and the country from the
> coordinates.
>
> Max
>
> 2011/4/7 Ikai Lan (Google) <ika...@google.com>
>
> Python has a CSV reader that does things like escape characters:
>>
>> http://docs.python.org/library/csv.html
>>
>>
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> Blog: http://googleappengine.blogspot.com
>> Twitter: http://twitter.com/app_engine
>> Reddit: http://www.reddit.com/r/appengine
>>
>>
>>
>> On Thu, Apr 7, 2011 at 9:58 AM, Phil Young <p...@philyoung.org.uk> wrote:
>>
>>> I think he's already got the data he want, just needs to extract the
>>> individual fields from the CSV data.
>>>
>>> The split function will be a simple way to achieve this.
>>> e.g.
>>>
>>> strArray = strInputLine.split(',')
>>> strPlace = strArray[0]
>>> strXcoord = strArray[1]
>>>
>>> etc.
>>>
>>> HTH
>>>
>>> Phil
>>>
>>> On 6 April 2011 18:13, Barry Hunter <barrybhun...@gmail.com> wrote:
>>>
>>>> You need to use a geocoder (well technically a reverse geocoder). That
>>>> will most probably be connecting to an external webservice, such as
>>>> geonames, or the one in the Google Maps API.
>>>>
>>>> (note if you use the Google Maps API one, you must use teh data to shown
>>>> a Google Map on your site)
>>>>
>>>> It could be a geocoder you have locally in your application, I dont know
>>>> any coded in python off hand, but you would also need to source the data to
>>>> power it.
>>>>
>>>>
>>>>
>>>>
>>>> On 6 April 2011 15:51, Massimiliano <massimiliano.pietr...@gmail.com>wrote:
>>>>
>>>>> I'm not afraid how to import the CSV. I don't know how to manage the
>>>>> data to obtain the city and country with the coordinates!
>>>>>
>>>>>
>>>>> 2011/4/6 JH <jamesthop...@gmail.com>
>>>>>
>>>>>> Max,
>>>>>>
>>>>>> There is a nice python library called xlwt, I'm sure you can find it
>>>>>> via Google.  It lets you read and write Microsoft Excel files.
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> On Apr 6, 9:07 am, Massimiliano <massimiliano.pietr...@gmail.com>
>>>>>> wrote:
>>>>>> > Hi,
>>>>>> > can someone help me?  A big problem for me, I hope easy for you. I
>>>>>> have a
>>>>>> > file xls (I can convert it in CSV) like this:
>>>>>> >
>>>>>> > Place              Coordinates
>>>>>> > Place1             1,2
>>>>>> > Place2             3,4
>>>>>> > Place3             5,6
>>>>>> > Place4             7,8
>>>>>> > and so on...
>>>>>> >
>>>>>> > and I want to store it in appengine like this:
>>>>>> >
>>>>>> > Place Country City Coordinates
>>>>>> > .......
>>>>>> >
>>>>>> > How can I do it? Can someone share a python code to do this?
>>>>>> >
>>>>>> > Thanks
>>>>>> >
>>>>>> > Max
>>>>>> >
>>>>>> > --www.themaxbuddies.com
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Google App Engine" group.
>>>>>> To post to this group, send email to
>>>>>> google-appengine@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> google-appengine+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/google-appengine?hl=en.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> www.themaxbuddies.com
>>>>>
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Google App Engine" group.
>>>>> To post to this group, send email to google-appengine@googlegroups.com
>>>>> .
>>>>> To unsubscribe from this group, send email to
>>>>> google-appengine+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/google-appengine?hl=en.
>>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google App Engine" group.
>>>> To post to this group, send email to google-appengine@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-appengine+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-appengine?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine" group.
>>> To post to this group, send email to google-appengine@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>
>
>
> --
> www.themaxbuddies.com
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Ross M Karchner

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to