Lines Matching refs:writeOptions

47     protected $writeOptions = [
338 $this->writeOptions = [
339 'decimalDigitsXY' => $decimalDigitsXY !== null ? $decimalDigitsXY : $this->writeOptions['decimalDigitsXY'],
340 'decimalDigitsZ' => $decimalDigitsZ !== null ? $decimalDigitsZ : $this->writeOptions['decimalDigitsZ'],
341 'decimalDigitsM' => $decimalDigitsM !== null ? $decimalDigitsM : $this->writeOptions['decimalDigitsM'],
342 'includeSize' => $includeSizes ? true : $this->writeOptions['includeSize'],
343 'includeBoundingBoxes' => $includeBoundingBoxes ? true : $this->writeOptions['includeBoundingBoxes']
345 $this->writeOptions = array_merge(
346 $this->writeOptions,
348 'xyFactor' => pow(10, $this->writeOptions['decimalDigitsXY']),
349 'zFactor' => pow(10, $this->writeOptions['decimalDigitsZ']),
350 'mFactor' => pow(10, $this->writeOptions['decimalDigitsM'])
365 $this->writeOptions['hasZ'] = $geometry->hasZ();
366 $this->writeOptions['hasM'] = $geometry->isMeasured();
370 (BinaryWriter::zigZagEncode($this->writeOptions['decimalDigitsXY']) << 4);
374 $metadataHeader = $this->writeOptions['includeBoundingBoxes'] << 0;
376 $metadataHeader += $this->writeOptions['includeSize'] << 1;
379 //$metadataHeader += $this->writeOptions['hasIdList'] << 2;
414 if ($this->writeOptions['includeBoundingBoxes']) {
417 $twkbBox = $this->writer->writeSVarInt($bBox['minx'] * $this->writeOptions['xyFactor']);
418 $twkbBox .= $this->writer->writeSVarInt(($bBox['maxx'] - $bBox['minx']) * $this->writeOptions['xyFactor']);
420 $twkbBox .= $this->writer->writeSVarInt($bBox['miny'] * $this->writeOptions['xyFactor']);
421 $twkbBox .= $this->writer->writeSVarInt(($bBox['maxy'] - $bBox['miny']) * $this->writeOptions['xyFactor']);
425 $twkbBox .= $this->writer->writeSVarInt(round($bBox['minz'] * $this->writeOptions['zFactor']));
426 $twkbBox .= $this->writer->writeSVarInt(round(($bBox['maxz'] - $bBox['minz']) * $this->writeOptions['zFactor']));
431 $twkbBox .= $this->writer->writeSVarInt($bBox['minm'] * $this->writeOptions['mFactor']);
432 $twkbBox .= $this->writer->writeSVarInt(($bBox['maxm'] - $bBox['minm']) * $this->writeOptions['mFactor']);
440 $extendedPrecision |= ($geometry->hasZ() ? 0x1 : 0) | ($this->writeOptions['decimalDigitsZ'] << 2);
443 $extendedPrecision |= ($geometry->isMeasured() ? 0x2 : 0) | ($this->writeOptions['decimalDigitsM'] << 5);
447 if ($this->writeOptions['includeSize']) {
460 $x = round($geometry->x() * $this->writeOptions['xyFactor']);
461 $y = round($geometry->y() * $this->writeOptions['xyFactor']);
462 $z = round($geometry->z() * $this->writeOptions['zFactor']);
463 $m = round($geometry->m() * $this->writeOptions['mFactor']);
467 if ($this->writeOptions['hasZ']) {
470 if ($this->writeOptions['hasM']) {
474 $this->lastPoint = new Point($x, $y, $this->writeOptions['hasZ'] ? $z : null, $this->writeOptions['hasM'] ? $m : null);