Lines Matching refs:options

106         $options = [];
111 $options['precision'] = BinaryReader::zigZagDecode($type >> 4);
112 $options['precisionFactor'] = pow(10, $options['precision']);
114 $options['hasBoundingBox'] = ($metadataHeader >> 0 & 1) == 1;
115 $options['hasSizeAttribute'] = ($metadataHeader >> 1 & 1) == 1;
116 $options['hasIdList'] = ($metadataHeader >> 2 & 1) == 1;
117 $options['hasExtendedPrecision'] = ($metadataHeader >> 3 & 1) == 1;
118 $options['isEmpty'] = ($metadataHeader >> 4 & 1) == 1;
119 $options['unused1'] = ($metadataHeader >> 5 & 1) == 1;
120 $options['unused2'] = ($metadataHeader >> 6 & 1) == 1;
121 $options['unused3'] = ($metadataHeader >> 7 & 1) == 1;
123 if ($options['hasExtendedPrecision']) {
126 $options['hasZ'] = ($extendedPrecision & 0x01) === 0x01;
127 $options['hasM'] = ($extendedPrecision & 0x02) === 0x02;
129 $options['zPrecision'] = ($extendedPrecision & 0x1C) >> 2;
130 $options['zPrecisionFactor'] = pow(10, $options['zPrecision']);
132 $options['mPrecision'] = ($extendedPrecision & 0xE0) >> 5;
133 $options['mPrecisionFactor'] = pow(10, $options['mPrecision']);
135 $options['hasZ'] = false;
136 $options['hasM'] = false;
138 if ($options['hasSizeAttribute']) {
139 $options['remainderSize'] = $this->reader->readUVarInt();
141 if ($options['hasBoundingBox']) {
142 $dimension = 2 + ($options['hasZ'] ? 1 : 0) + ($options['hasM'] ? 1 : 0);
144 $options['precisionFactor'],
145 $options['precisionFactor'],
146 $options['hasZ'] ? $options['zPrecisionFactor'] : 0,
147 $options['hasM'] ? $options['mPrecisionFactor'] : 0
155 $options['boundingBox'] = ['minXYZM' => $bBoxMin, 'maxXYZM' => $bBoxMax];
158 if ($options['unused1']) {
161 if ($options['unused2']) {
164 if ($options['unused3']) {
172 $geometry = $this->getPoint($options);
175 $geometry = $this->getLineString($options);
178 $geometry = $this->getPolygon($options);
181 $geometry = $this->getMulti('Point', $options);
184 $geometry = $this->getMulti('LineString', $options);
187 $geometry = $this->getMulti('Polygon', $options);
190 $geometry = $this->getMulti('Geometry', $options);
203 * @param array $options
208 protected function getPoint($options)
210 if ($options['isEmpty']) {
214 $this->lastPoint->x() + $this->reader->readSVarInt() / $options['precisionFactor'],
215 $options['precision']
218 $this->lastPoint->y() + $this->reader->readSVarInt() / $options['precisionFactor'],
219 $options['precision']
221 $z = $options['hasZ'] ? round(
222 $this->lastPoint->z() + $this->reader->readSVarInt() / $options['zPrecisionFactor'],
223 $options['zPrecision']
225 $m = $options['hasM'] ? round(
226 $this->lastPoint->m() + $this->reader->readSVarInt() / $options['mPrecisionFactor'],
227 $options['mPrecision']
235 * @param array $options
240 protected function getLineString($options)
242 if ($options['isEmpty']) {
250 $points[] = $this->getPoint($options);
257 * @param array $options
262 protected function getPolygon($options)
264 if ($options['isEmpty']) {
272 $rings[] = $this->getLineString($options);
280 * @param array $options
285 protected function getMulti($type, $options)
289 if ($options['hasIdList']) {
299 $components[] = $this->$func($options);