def __getstate__(self): from geo_pyspark.sql.geometry import GeometryFactory attributes = copy(self.__slots__) geom = getattr(self, attributes[0]) return dict( geom=bytearray([el if el >= 0 else el + 256 for el in GeometryFactory.to_bytes(geom)]), userData=getattr(self, attributes[1]) )
def serialize(self, obj): return GeometryFactory.to_bytes(obj)
def serialize(self, obj): from geo_pyspark.sql.geometry import GeometryFactory return GeometryFactory.to_bytes(obj)