Encode/decode PGgeometry.