Importing GeoPt data with the Google AppEngine BulkLoader YAML -


I am uploading data from a CSV file with a geographical column in it. I have GeoPt column data such as Quotation: SomeData, "54.321, -123.456", Moradata

My bulkloader.yaml file has an entry like this: - Properties: location external_name: LOCATION # Type: GeoPt Figures: 1 type of this type of property.

When I upload and go to the datastore viewer, I think the location has been uploaded as a string rather than GeoPt. I'm not sure what the right way to import will probably be an import_transform?

Create a uploadutil.py file and add this method to: < DR geo_converter (geo_str): if geo_str: lat, lng = geo_str.split (',') returns db.GeoPt (lat = float (lat), lon = float (lng)) back to bulkloader.yaml

Add Import to Uploadutil:

  - Any  

Import: uploadutil

and add asset:

  - Properties: location external_name: LOCATION import_transform: uploadutil.geo_converter  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -