geopyspark.geotrellis.ProtoBufSerializer module¶
-
class
geopyspark.geotrellis.protobufserializer.
ProtoBufSerializer
(decoding_method, encoding_method)¶ The serializer used by a RDD to encode/decode values to/from Python.
Parameters: - decoding_method (func) – The decocding function for the values within the RDD.
- encoding_method (func) – The encocding function for the values within the RDD.
-
decoding_method
¶ func – The decocding function for the values within the RDD.
-
encoding_method
¶ func – The encocding function for the values within the RDD.
-
dumps
(obj)¶ Serialize an object into a byte array.
Note
When batching is used, this will be called with a list of objects.
Parameters: obj – The object to serialized into a byte array. Returns: The byte array representation of the obj
.
-
loads
(obj)¶ Deserializes a byte array into a collection of Python objects.
Parameters: obj – The byte array representation of an object to be deserialized into the object. Returns: A list of deserialized objects.