function WKB::writeMulti in geoPHP 7
Same name and namespace in other branches
- 8 geoPHP/lib/adapters/WKB.class.php \WKB::writeMulti()
2 calls to WKB::writeMulti()
- EWKB::write in geoPHP/
lib/ adapters/ EWKB.class.php - Serialize geometries into an EWKB binary string.
- WKB::write in geoPHP/
lib/ adapters/ WKB.class.php - Serialize geometries into WKB string.
File
- geoPHP/
lib/ adapters/ WKB.class.php, line 238
Class
- WKB
- PHP Geometry/WKB encoder/decoder
Code
function writeMulti($geometry) {
// Set the number of components
$wkb = pack('L', $geometry
->numGeometries());
// Write the components
foreach ($geometry
->getComponents() as $component) {
$wkb .= $this
->write($component);
}
return $wkb;
}