def prepare_coordinates(self, data): if data.get('wkt'): self.coordinates = utils.verify_wkt(data['wkt']).__geo_interface__ else: self.coordinates = None del data['wkt']
def prepare_coordinates(self, data): """ The coordinates need to be verified and converted. First they are converted and kept out of the item creation process. Later they are added to the object once that exists. """ if data.get('wkt'): self.coordinates = utils.verify_wkt(data['wkt']).__geo_interface__ else: self.coordinates = None del data['wkt']