Example #1
0
 /**
  * @param WKBBuffer        $buffer
  * @param CoordinateSystem $cs
  *
  * @return TIN
  */
 private function readTIN(WKBBuffer $buffer, CoordinateSystem $cs)
 {
     $numPatches = $buffer->readUnsignedLong();
     $patches = [];
     for ($i = 0; $i < $numPatches; $i++) {
         $patches[] = $this->readGeometry($buffer, $cs->SRID());
     }
     return new TIN($cs, ...$patches);
 }
Example #2
0
 /**
  * Returns the Spatial Reference System ID for this geometry.
  *
  * @noproxy
  *
  * @return integer The SRID, zero if not set.
  */
 public function SRID()
 {
     return $this->coordinateSystem->SRID();
 }
Example #3
0
 /**
  * @param WKTParser        $parser
  * @param CoordinateSystem $cs
  *
  * @return GeometryCollection
  */
 private function readGeometryCollectionText(WKTParser $parser, CoordinateSystem $cs)
 {
     $parser->matchOpener();
     $geometries = [];
     do {
         $geometries[] = $this->readGeometry($parser, $cs->SRID());
         $nextToken = $parser->getNextCloserOrComma();
     } while ($nextToken === ',');
     return new GeometryCollection($cs, ...$geometries);
 }