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 Add Import to Uploadutil: Import: uploadutil 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
- Any
and add asset:
- Properties: location external_name: LOCATION import_transform: uploadutil.geo_converter
Comments
Post a Comment