@param Point $point

@return string

@throws GeometryIOException
435437
private function packPoint(Point $point) : string
    {
        if ($point->isEmpty()) {
            throw new GeometryIOException('Empty points have no WKB representation.');
        }

        $binary = $this->packDouble($point->x()) . $this->packDouble($point->y());

        if (null !== $z = $point->z()) {
            $binary .= $this->packDouble($z);
        }
        if (null !== $m = $point->m()) {
            $binary .= $this->packDouble($m);
        }

        return $binary;
    }
819509
protected function point_search(TreeNode $node, $point)
    {
        $result = array();

        // check whether the node values overlap point.
        foreach ($node->s_center as $k) {
            if ($this->compare($k->getStart(), $point) <= 0 && $this->compare($k->getEnd(), $point) > 0) {
                $result[spl_object_hash($k)] = $k;
            }
        }

        // compare point against node center to determine which child
        // node we should recurse through.
        $comparedValue = $this->compare($point, $node->x_center);

        if ($node->left_node && $comparedValue < 0) {
            $result = array_merge(
                $result,
                $this->point_search($node->left_node, $point, $result)
            );
        }

        if ($node->right_node && $comparedValue > 0) {
            $result = array_merge(
                $result,
                $this->point_search($node->right_node, $point, $result)
            );
        }

        return $result;
    }
860751
public function render(Point $point)
    {
        $formatter = $this->getFormatter();

        return $formatter->renderObjectAssignment($point, $formatter->renderObject('Point', [
            $point->getX(),
            $point->getY(),
        ]));
    }
230215
function (point) {
        var rect = this.getRect();
        var axis = this.getAxis();
        var orient = axis.orient;
        if (orient === 'horizontal') {
            return axis.contain(axis.toLocalCoord(point[0]))
            && (point[1] >= rect.y && point[1] <= (rect.y + rect.height));
        }
        else {
            return axis.contain(axis.toLocalCoord(point[1]))
            && (point[0] >= rect.y && point[0] <= (rect.y + rect.height));
        }
    }
65099
public function compareXCoord(Point $point, $precision = 1000)
    {
        return $this->compare($this->x, $point->x, $precision);
    }
348460
public function getDistanceWith(self $point, $precise = true)
    {
        $distance = 0;
        for ($n = 0; $n < $this->dimension; ++$n) {
            $difference = $this->coordinates[$n] - $point->coordinates[$n];
            $distance += $difference * $difference;
        }

        return $precise ? sqrt((float) $distance) : $distance;
    }
988221
public function equals(self $point)
    {
        return $this->x === $point->getX() &&
        $this->y === $point->getY();
    }
247319
public function write(Geometry $geometry) : string
    {
        if ($geometry instanceof GeometryCollection
            // Filter out MultiPoint, MultiLineString and MultiPolygon
            && $geometry->geometryType() === 'GeometryCollection') {
            return $this->writeFeatureCollection($geometry);
        }

        return $this->genGeoJSONString($this->formatGeoJSONGeometry($geometry));
    }
1280718
public function jsonSerialize()
    {
        $points = [];
        foreach ($this->points as $point) {
            $points[] = $point->jsonSerialize();
        }

        return new \GeoJson\Geometry\LineString($points);
    }
265536
public function geocentric_to_wgs84(Point $p)
    {
        Proj4php::reportDebug(sprintf(
            "geocentric_to_wgs84(%s,%s)\n",
            $p->x,
            $p->y
        ));

        if ($this->datum_type == Common::PJD_3PARAM) {
            Proj4php::reportDebug("+x=".$this->datum_params[0]."\n");
            Proj4php::reportDebug("+y=".$this->datum_params[1]."\n");
            Proj4php::reportDebug("+z=".$this->datum_params[2]."\n");
            $p->x += $this->datum_params[0];
            $p->y += $this->datum_params[1];
            $p->z += $this->datum_params[2];
        } elseif ($this->datum_type == Common::PJD_7PARAM) {
            Proj4php::reportDebug("Dx=".$this->datum_params[0]."\n");
            Proj4php::reportDebug("Dy=".$this->datum_params[1]."\n");
            Proj4php::reportDebug("Dz=".$this->datum_params[2]."\n");
            Proj4php::reportDebug("Rx=".$this->datum_params[3]."\n");
            Proj4php::reportDebug("Ry=".$this->datum_params[4]."\n");
            Proj4php::reportDebug("Rz=".$this->datum_params[5]."\n");
            Proj4php::reportDebug("M=".$this->datum_params[6]."\n"); 
            $Dx_BF = $this->datum_params[0];
            $Dy_BF = $this->datum_params[1];
            $Dz_BF = $this->datum_params[2];
            $Rx_BF = $this->datum_params[3];
            $Ry_BF = $this->datum_params[4];
            $Rz_BF = $this->datum_params[5];
            $M_BF = $this->datum_params[6];

            $p->x = $M_BF * ($p->x - $Rz_BF * $p->y + $Ry_BF * $p->z) + $Dx_BF;
            $p->y = $M_BF * ($Rz_BF * $p->x + $p->y - $Rx_BF * $p->z) + $Dy_BF;
            $p->z = $M_BF * (-$Ry_BF * $p->x + $Rx_BF * $p->y + $p->z) + $Dz_BF;
        }
    }
556969
public LatLng toLatLng(Point point) {
        point = toWgs84(point);
        LatLng latLng = new LatLng(point.getY(), point.getX());
        return latLng;
    }
272728
public static function pointDMS(array $bounds = null)
    {
        list($lat, $lng) = static::point($bounds);

        return sprintf('%s %s', self::floatToDMS($lat), self::floatToDMS($lng));
    }
1243806
protected function stringXtoInteger($point, ImageInterface $pasteImage, ImageInterface $image)
    {
        switch ($point) {
            case 'right':
                return (integer) $image->getSize()->getWidth() - $pasteImage->getSize()->getWidth();
            case 'center':
                return (integer) round( ($image->getSize()->getWidth() / 2) - ($pasteImage->getSize()->getWidth() / 2) );
            case 'left':
            default:
                return 0;
        }
    }
906404
public function compareYCoord(Point $point, $precision = 1000)
    {
        return $this->compare($this->y, $point->y, $precision);
    }
171031
public Triangle findCellTriangleOf(Point3D point) {
        int x_index = (int) ((point.x - indexRegion.minX()) / x_size);
        int y_index = (int) ((point.y - indexRegion.minY()) / y_size);
        return grid[x_index][y_index];
    }
40472
public TriangulationPoint pointCW( TriangulationPoint point )
    {
        if( point == points[0] )
        {
            return points[2];
        }
        else if( point == points[1] )
        {
            return points[0];
        }
        else if( point == points[2] )
        {
            return points[1];
        }
        logger.error( "point location error" );
        throw new RuntimeException("[FIXME] point location error");
    }
1124962
public static void toGeojsonGeometry(Geometry geom, StringBuilder sb) {
        if (geom instanceof Point) {
            toGeojsonPoint((Point) geom, sb);
        } else if (geom instanceof LineString) {
            toGeojsonLineString((LineString) geom, sb);
        } else if (geom instanceof Polygon) {
            toGeojsonPolygon((Polygon) geom, sb);
        } else if (geom instanceof MultiPoint) {
            toGeojsonMultiPoint((MultiPoint) geom, sb);
        } else if (geom instanceof MultiLineString) {
            toGeojsonMultiLineString((MultiLineString) geom, sb);
        } else if (geom instanceof MultiPolygon) {
            toGeojsonMultiPolygon((MultiPolygon) geom, sb);
        } else {
            toGeojsonGeometryCollection((GeometryCollection) geom, sb);
        }
    }