# Generated by detroit
# See https://github.com/bourbonut/detroit/tree/main/api_maker

from functools import partial
from operator import is_not

class geoStream:
    def __init__(self, content="geoStream"):
        self.content = content

    def __repr__(self):
        return self.content

    def __str__(self):
        return self.content

    def __call__(self, *args):
        arguments = ", ".join(map(repr, args))
        return f"{self}({arguments})"

    def point(self, x=None, y=None, z=None):
        """
        Indicates a point with the specified coordinates x and y (and optionally z). The
        coordinate system is unspecified and implementation-dependent; for example, projection
        streams require spherical coordinates in degrees as input. Outside the context of a
        polygon or line, a point indicates a point geometry object (Point or MultiPoint).
        Within a line or polygon ring, the point indicates a control point.

        See more informations `here <https://d3js.org/d3-geo/stream#stream_point>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (x, y, z))))
        return geoStream(content=f"{self.content}.point({arguments})")


    def lineStart(self):
        """
        Indicates the start of a line or ring. Within a polygon, indicates the start of a ring.
        The first ring of a polygon is the exterior ring, and is typically clockwise. Any
        subsequent rings indicate holes in the polygon, and are typically counterclockwise.

        See more informations `here <https://d3js.org/d3-geo/stream#stream_lineStart>`_.
        """
        return geoStream(content=f"{self.content}.lineStart()")


    def lineEnd(self):
        """
        Indicates the end of a line or ring. Within a polygon, indicates the end of a ring.
        Unlike GeoJSON, the redundant closing coordinate of a ring is not indicated via point,
        and instead is implied via lineEnd within a polygon. Thus, the given polygon input:
        .. code:: javascript

            {
              "type": "Polygon",
              "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]]
            }

        Will produce the following series of method calls on the stream:
        .. code:: javascript

            stream.polygonStart();
            stream.lineStart();
            stream.point(0, 0);
            stream.point(0, 1);
            stream.point(1, 1);
            stream.point(1, 0);
            stream.lineEnd();
            stream.polygonEnd();


        See more informations `here <https://d3js.org/d3-geo/stream#stream_lineEnd>`_.
        """
        return geoStream(content=f"{self.content}.lineEnd()")


    def polygonStart(self):
        """
        Indicates the start of a polygon. The first line of a polygon indicates the exterior
        ring, and any subsequent lines indicate interior holes.

        See more informations `here <https://d3js.org/d3-geo/stream#stream_polygonStart>`_.
        """
        return geoStream(content=f"{self.content}.polygonStart()")


    def polygonEnd(self):
        """
        Indicates the end of a polygon.

        See more informations `here <https://d3js.org/d3-geo/stream#stream_polygonEnd>`_.
        """
        return geoStream(content=f"{self.content}.polygonEnd()")


    def sphere(self):
        """
        Indicates the sphere (the globe; the unit sphere centered at ⟨0,0,0⟩).

        See more informations `here <https://d3js.org/d3-geo/stream#stream_sphere>`_.
        """
        return geoStream(content=f"{self.content}.sphere()")

