code: def from_ragged_array(geometry_type, coords, offsets=None):
      """
      Creates geometries from a contiguous array of coordinates
      and offset arrays.
  
      This function creates geometries from the ragged array representation
      as returned by ``to_ragged_array``.
  
      This follows the in-memory layout of the variable size list arrays defined
      by Apache Arrow, as specified for geometries by the GeoArrow project:
      https://github.com/geoarrow/geoarrow.
  
      See :func:`to_ragged_array` for more details.
  
      Parameters
      ----------
      geometry_type : GeometryType
          The type of geometry to create.
      coords : np.ndarray
          Contiguous array of shape (n, 2) or (n, 3) of all coordinates
          for the geometries.
      offsets: tuple of np.ndarray
          Offset arrays that allow to reconstruct the geometries based on the
          flat coordinates array. The number of offset arrays depends on the
          geometry type. See
          https://github.com/geoarrow/geoarrow/blob/main/format.md for details.
  
      Returns
      -------
      np.ndarray
          Array of geometries (1-dimensional).
  
      See Also
      --------
      to_ragged_array
  
      """
      if geometry_type == GeometryType.POINT:
          assert offsets is None or len(offsets) == 0
          return _point_from_flatcoords(coords)
      if geometry_type == GeometryType.LINESTRING:
          return _linestring_from_flatcoords(coords, *offsets)
      if geometry_type == GeometryType.POLYGON:
          return _polygon_from_flatcoords(coords, *offsets)
      elif geometry_type == GeometryType.MULTIPOINT:
          return _multipoint_from_flatcoords(coords, *offsets)
      elif geometry_type == GeometryType.MULTILINESTRING:
          return _multilinestrings_from_flatcoords(coords, *offsets)
      elif geometry_type == GeometryType.MULTIPOLYGON:
          return _multipolygons_from_flatcoords(coords, *offsets)
      else:
          raise ValueError(
              f"Geometry type {geometry_type.name} is not supported"
          )
  
file_path: shapely/shapely/_ragged_array.py
imports: import numpy
  from shapely import creation
  from shapely._geometry import GeometryType, get_coordinate_dimension, get_parts, get_rings, get_type_id
  from shapely.coordinates import get_coordinates
  from shapely.predicates import is_empty
label_desc: Use image node_id 15 for calling a global function with example usage: from_ragged_array(geometry_type, coords, offsets) and returns: _point_from_flatcoords, _linestring_from_flatcoords, _polygon_from_flatcoords, _multipoint_from_flatcoords, _multilinestrings_from_flatcoords, _multipolygons_from_flatcoords