class_docstr: A Series object designed to store shapely geometry objects.
  
  Parameters
  ----------
  data : array-like, dict, scalar value
      The geometries to store in the GeoSeries.
  index : array-like or Index
      The index for the GeoSeries.
  crs : value (optional)
      Coordinate Reference System of the geometry objects. Can be anything accepted by
      :meth:`pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>`,
      such as an authority string (eg "EPSG:4326") or a WKT string.
  
  kwargs
      Additional arguments passed to the Series constructor,
       e.g. ``name``.
  
  Examples
  --------
  
  >>> from shapely.geometry import Point
  >>> s = geopandas.GeoSeries([Point(1, 1), Point(2, 2), Point(3, 3)])
  >>> s
  0    POINT (1 1)
  1    POINT (2 2)
  2    POINT (3 3)
  dtype: geometry
  
  >>> s = geopandas.GeoSeries(
  ...     [Point(1, 1), Point(2, 2), Point(3, 3)], crs="EPSG:3857"
  ... )
  >>> s.crs  # doctest: +SKIP
  <Projected CRS: EPSG:3857>
  Name: WGS 84 / Pseudo-Mercator
  Axis Info [cartesian]:
  - X[east]: Easting (metre)
  - Y[north]: Northing (metre)
  Area of Use:
  - name: World - 85°S to 85°N
  - bounds: (-180.0, -85.06, 180.0, 85.06)
  Coordinate Operation:
  - name: Popular Visualisation Pseudo-Mercator
  - method: Popular Visualisation Pseudo Mercator
  Datum: World Geodetic System 1984
  - Ellipsoid: WGS 84
  - Prime Meridian: Greenwich
  
  >>> s = geopandas.GeoSeries(
  ...    [Point(1, 1), Point(2, 2), Point(3, 3)], index=["a", "b", "c"], crs=4326
  ... )
  >>> s
  a    POINT (1 1)
  b    POINT (2 2)
  c    POINT (3 3)
  dtype: geometry
  
  >>> s.crs
  <Geographic 2D CRS: EPSG:4326>
  Name: WGS 84
  Axis Info [ellipsoidal]:
  - Lat[north]: Geodetic latitude (degree)
  - Lon[east]: Geodetic longitude (degree)
  Area of Use:
  - name: World.
  - bounds: (-180.0, -90.0, 180.0, 90.0)
  Datum: World Geodetic System 1984 ensemble
  - Ellipsoid: WGS 84
  - Prime Meridian: Greenwich
  
  See Also
  --------
  GeoDataFrame
  pandas.Series
class_docstr_tok: ["A","Series","object","designed","to","store","shapely","geometry","objects",".","Parameters","--","--","--","--","--","data",":","array-like",",","dict",",","scalar","value","The","geometries","to","store","in","the","GeoSeries",".","index",":","array-like","or","Index","The","index","for","the","GeoSeries",".","crs",":","value","(","optional",")","Coordinate","Reference","System","of","the","geometry","objects",".","Can","be","anything","accepted","by",":","meth",":","`","pyproj.CRS.from_user_input","(",")","<","pyproj.crs.CRS.from_user_input",">","`",",","such","as","an","authority","string","(","eg","``","EPSG:4326","''",")","or","a","WKT","string",".","kwargs","Additional","arguments","passed","to","the","Series","constructor",",","e.g",".","``","name","``",".","Examples","--","--","--","--",">",">",">","from","shapely.geometry","import","Point",">",">",">","s","=","geopandas.GeoSeries","(","[","Point","(","1",",","1",")",",","Point","(","2",",","2",")",",","Point","(","3",",","3",")","]",")",">",">",">","s","0","POINT","(","1","1",")","1","POINT","(","2","2",")","2","POINT","(","3","3",")","dtype",":","geometry",">",">",">","s","=","geopandas.GeoSeries","(","...","[","Point","(","1",",","1",")",",","Point","(","2",",","2",")",",","Point","(","3",",","3",")","]",",","crs=","''","EPSG:3857","''","...",")",">",">",">","s.crs","#","doctest",":","+SKIP","<","Projected","CRS",":","EPSG:3857",">","Name",":","WGS","84","\/","Pseudo-Mercator","Axis","Info","[","cartesian","]",":","-","X","[","east","]",":","Easting","(","metre",")","-","Y","[","north","]",":","Northing","(","metre",")","Area","of","Use",":","-","name",":","World","-","85\u00b0S","to","85\u00b0N","-","bounds",":","(","-180.0",",","-85.06",",","180.0",",","85.06",")","Coordinate","Operation",":","-","name",":","Popular","Visualisation","Pseudo-Mercator","-","method",":","Popular","Visualisation","Pseudo","Mercator","Datum",":","World","Geodetic","System","1984","-","Ellipsoid",":","WGS","84","-","Prime","Meridian",":","Greenwich",">",">",">","s","=","geopandas.GeoSeries","(","...","[","Point","(","1",",","1",")",",","Point","(","2",",","2",")",",","Point","(","3",",","3",")","]",",","index=","[","``","a","''",",","``","b","''",",","``","c","''","]",",","crs=4326","...",")",">",">",">","s","a","POINT","(","1","1",")","b","POINT","(","2","2",")","c","POINT","(","3","3",")","dtype",":","geometry",">",">",">","s.crs","<","Geographic","2D","CRS",":","EPSG:4326",">","Name",":","WGS","84","Axis","Info","[","ellipsoidal","]",":","-","Lat","[","north","]",":","Geodetic","latitude","(","degree",")","-","Lon","[","east","]",":","Geodetic","longitude","(","degree",")","Area","of","Use",":","-","name",":","World",".","-","bounds",":","(","-180.0",",","-90.0",",","180.0",",","90.0",")","Datum",":","World","Geodetic","System","1984","ensemble","-","Ellipsoid",":","WGS","84","-","Prime","Meridian",":","Greenwich","See","Also","--","--","--","--","GeoDataFrame","pandas.Series"]
docstr: Write the ``GeoSeries`` to a file.
  
  By default, an ESRI shapefile is written, but any OGR data source
  supported by Fiona can be written.
  
  Parameters
  ----------
  filename : string
      File path or file handle to write to. The path may specify a
      GDAL VSI scheme.
  driver : string, default None
      The OGR format driver used to write the vector file.
      If not specified, it attempts to infer it from the file extension.
      If no extension is specified, it saves ESRI Shapefile to a folder.
  index : bool, default None
      If True, write index into one or more columns (for MultiIndex).
      Default None writes the index into one or more columns only if
      the index is named, is a MultiIndex, or has a non-integer data
      type. If False, no index is written.
  
      .. versionadded:: 0.7
          Previously the index was not written.
  mode : string, default 'w'
      The write mode, 'w' to overwrite the existing file and 'a' to append.
      Not all drivers support appending. The drivers that support appending
      are listed in fiona.supported_drivers or
      https://github.com/Toblerity/Fiona/blob/master/fiona/drvsupport.py
  crs : pyproj.CRS, default None
      If specified, the CRS is passed to Fiona to
      better control how the file is written. If None, GeoPandas
      will determine the crs based on crs df attribute.
      The value can be anything accepted
      by :meth:`pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>`,
      such as an authority string (eg "EPSG:4326") or a WKT string.
  engine : str, "fiona" or "pyogrio"
      The underlying library that is used to write the file. Currently, the
      supported options are "fiona" and "pyogrio". Defaults to "fiona" if
      installed, otherwise tries "pyogrio".
  **kwargs :
      Keyword args to be passed to the engine, and can be used to write
      to multi-layer data, store data within archives (zip files), etc.
      In case of the "fiona" engine, the keyword arguments are passed to
      fiona.open`. For more information on possible keywords, type:
      ``import fiona; help(fiona.open)``. In case of the "pyogrio" engine,
      the keyword arguments are passed to `pyogrio.write_dataframe`.
  
  See Also
  --------
  GeoDataFrame.to_file : write GeoDataFrame to file
  read_file : read file to GeoDataFrame
  
  Examples
  --------
  
  >>> s.to_file('series.shp')  # doctest: +SKIP
  
  >>> s.to_file('series.gpkg', driver='GPKG', layer='name1')  # doctest: +SKIP
  
  >>> s.to_file('series.geojson', driver='GeoJSON')  # doctest: +SKIP
docstr_tok: ["Write","the","``","GeoSeries","``","to","a","file",".","By","default",",","an","ESRI","shapefile","is","written",",","but","any","OGR","data","source","supported","by","Fiona","can","be","written",".","Parameters","--","--","--","--","--","filename",":","string","File","path","or","file","handle","to","write","to",".","The","path","may","specify","a","GDAL","VSI","scheme",".","driver",":","string",",","default","None","The","OGR","format","driver","used","to","write","the","vector","file",".","If","not","specified",",","it","attempts","to","infer","it","from","the","file","extension",".","If","no","extension","is","specified",",","it","saves","ESRI","Shapefile","to","a","folder",".","index",":","bool",",","default","None","If","True",",","write","index","into","one","or","more","columns","(","for","MultiIndex",")",".","Default","None","writes","the","index","into","one","or","more","columns","only","if","the","index","is","named",",","is","a","MultiIndex",",","or","has","a","non-integer","data","type",".","If","False",",","no","index","is","written",".","..","versionadded",":",":","0.7","Previously","the","index","was","not","written",".","mode",":","string",",","default","'","w'","The","write","mode",",","'","w","'","to","overwrite","the","existing","file","and","'","a","'","to","append",".","Not","all","drivers","support","appending",".","The","drivers","that","support","appending","are","listed","in","fiona.supported_drivers","or","https",":","\/\/github.com\/Toblerity\/Fiona\/blob\/master\/fiona\/drvsupport.py","crs",":","pyproj.CRS",",","default","None","If","specified",",","the","CRS","is","passed","to","Fiona","to","better","control","how","the","file","is","written",".","If","None",",","GeoPandas","will","determine","the","crs","based","on","crs","df","attribute",".","The","value","can","be","anything","accepted","by",":","meth",":","`","pyproj.CRS.from_user_input","(",")","<","pyproj.crs.CRS.from_user_input",">","`",",","such","as","an","authority","string","(","eg","``","EPSG:4326","''",")","or","a","WKT","string",".","engine",":","str",",","``","fiona","''","or","``","pyogrio","''","The","underlying","library","that","is","used","to","write","the","file",".","Currently",",","the","supported","options","are","``","fiona","''","and","``","pyogrio","''",".","Defaults","to","``","fiona","''","if","installed",",","otherwise","tries","``","pyogrio","''",".","*","*","kwargs",":","Keyword","args","to","be","passed","to","the","engine",",","and","can","be","used","to","write","to","multi-layer","data",",","store","data","within","archives","(","zip","files",")",",","etc",".","In","case","of","the","``","fiona","''","engine",",","the","keyword","arguments","are","passed","to","fiona.open","`",".","For","more","information","on","possible","keywords",",","type",":","``","import","fiona",";","help","(","fiona.open",")","``",".","In","case","of","the","``","pyogrio","''","engine",",","the","keyword","arguments","are","passed","to","`","pyogrio.write_dataframe","`",".","See","Also","--","--","--","--","GeoDataFrame.to_file",":","write","GeoDataFrame","to","file","read_file",":","read","file","to","GeoDataFrame","Examples","--","--","--","--",">",">",">","s.to_file","(","'series.shp","'",")","#","doctest",":","+SKIP",">",">",">","s.to_file","(","'series.gpkg","'",",","driver='GPKG","'",",","layer='name1","'",")","#","doctest",":","+SKIP",">",">",">","s.to_file","(","'series.geojson","'",",","driver='GeoJSON","'",")","#","doctest",":","+SKIP"]
code: def to_file(
      self,
      filename: os.PathLike | typing.IO,
      driver: Optional[str] = None,
      index: Optional[bool] = None,
      **kwargs,
  ):
      """Write the ``GeoSeries`` to a file.
  
      By default, an ESRI shapefile is written, but any OGR data source
      supported by Fiona can be written.
  
      Parameters
      ----------
      filename : string
          File path or file handle to write to. The path may specify a
          GDAL VSI scheme.
      driver : string, default None
          The OGR format driver used to write the vector file.
          If not specified, it attempts to infer it from the file extension.
          If no extension is specified, it saves ESRI Shapefile to a folder.
      index : bool, default None
          If True, write index into one or more columns (for MultiIndex).
          Default None writes the index into one or more columns only if
          the index is named, is a MultiIndex, or has a non-integer data
          type. If False, no index is written.
  
          .. versionadded:: 0.7
              Previously the index was not written.
      mode : string, default 'w'
          The write mode, 'w' to overwrite the existing file and 'a' to append.
          Not all drivers support appending. The drivers that support appending
          are listed in fiona.supported_drivers or
          https://github.com/Toblerity/Fiona/blob/master/fiona/drvsupport.py
      crs : pyproj.CRS, default None
          If specified, the CRS is passed to Fiona to
          better control how the file is written. If None, GeoPandas
          will determine the crs based on crs df attribute.
          The value can be anything accepted
          by :meth:`pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>`,
          such as an authority string (eg "EPSG:4326") or a WKT string.
      engine : str, "fiona" or "pyogrio"
          The underlying library that is used to write the file. Currently, the
          supported options are "fiona" and "pyogrio". Defaults to "fiona" if
          installed, otherwise tries "pyogrio".
      **kwargs :
          Keyword args to be passed to the engine, and can be used to write
          to multi-layer data, store data within archives (zip files), etc.
          In case of the "fiona" engine, the keyword arguments are passed to
          fiona.open`. For more information on possible keywords, type:
          ``import fiona; help(fiona.open)``. In case of the "pyogrio" engine,
          the keyword arguments are passed to `pyogrio.write_dataframe`.
  
      See Also
      --------
      GeoDataFrame.to_file : write GeoDataFrame to file
      read_file : read file to GeoDataFrame
  
      Examples
      --------
  
      >>> s.to_file('series.shp')  # doctest: +SKIP
  
      >>> s.to_file('series.gpkg', driver='GPKG', layer='name1')  # doctest: +SKIP
  
      >>> s.to_file('series.geojson', driver='GeoJSON')  # doctest: +SKIP
      """
      from geopandas import GeoDataFrame
  
      data = GeoDataFrame({"geometry": self}, index=self.index)
      data.crs = self.crs
      data.to_file(filename, driver, index=index, **kwargs)
  
imports: from __future__ import annotations
  import json
  import typing
  from typing import Optional, Any, Callable, Dict
  import warnings
  import numpy
  import pandas
  from pandas import Series
  from pandas.core.internals import SingleBlockManager
  from pyproj import CRS
  import shapely
  from shapely.geometry.base import BaseGeometry
  from shapely.geometry import GeometryCollection
  from geopandas.base import GeoPandasBase, _delegate_property
  from geopandas.plotting import plot_series
  from geopandas.explore import _explore_geoseries
  import geopandas
  from .None import _compat
  from ._decorator import doc
  from .array import GeometryDtype, from_shapely, from_wkb, from_wkt, points_from_xy, to_wkb, to_wkt
  from .base import is_geometry_type
label_desc: Use image node_id 13 for calling the GeoSeries obj's underlying member method code with example usage: obj.to_file(filename, driver, index) without return types