protected function writeSRID(Geometry $geometry) { $srid = $geometry->getSRID(); if ($srid) { return pack('V', $srid); } }