<commit_before>"""
The :mod:`process` module provides geoprocessing functions.
"""
from org.opengis.referencing.crs import CoordinateReferenceSystem
from org.geotools.process import Processors
from org.geotools.feature import NameImpl as Name
from geoscript import core
from geoscript.layer import Layer

class Process(object):
  """
  A runnable geospatial process.

  A process is typically obtained by name:

  >>> p = Process.lookup('gs:Snap')
  >>> p.description
  Snap to the nearest feature
  """

  @staticmethod
  def list():
    """
    Static method that returns a generator over the list of known process names.
    Each element is returned as a tuple of (prefix, localName).
    """
    for pf in Processors.getProcessFactories():
      for n in pf.getNames():      
        yield (n.namespaceURI, n.localPart)
 
  @staticmethod
  def lookup(name):
    """
    Static method that looks up a process by name. The *name* parameter is 
    specified as a tuple of (prefix, localName):

    >>> p = Process.lookup(('gs', 'Snap'))
    >>> p.description
    Snap to the nearest feature
    
    *name* may also be specified as a colon delimited string:

    >>> p = Process.lookup('gs:Snap')
    >>> p.description
    Snap to the nearest feature<commit_msg>updated some doctests to conform with process metadata changes<commit_after>"""
The :mod:`process` module provides geoprocessing functions.
"""
from org.opengis.referencing.crs import CoordinateReferenceSystem
from org.geotools.process import Processors
from org.geotools.feature import NameImpl as Name
from geoscript import core
from geoscript.layer import Layer

class Process(object):
  """
  A runnable geospatial process.

  A process is typically obtained by name:

  >>> p = Process.lookup('JTS:splitPolygon')
  >>> p.description
  Splits a polygon by a linestring
  """

  @staticmethod
  def list():
    """
    Static method that returns a generator over the list of known process names.
    Each element is returned as a tuple of (prefix, localName).
    """
    for pf in Processors.getProcessFactories():
      for n in pf.getNames():      
        yield (n.namespaceURI, n.localPart)
 
  @staticmethod
  def lookup(name):
    """
    Static method that looks up a process by name. The *name* parameter is 
    specified as a tuple of (prefix, localName):

    >>> p = Process.lookup(('JTS', 'splitPolygon'))
    >>> p.description
    Splits a polygon by a linestring
    
    *name* may also be specified as a colon delimited string:

    >>> p = Process.lookup('JTS:splitPolygon')
    >>> p.description
    Splits a polygon by a linestring
{'fraction_non_alphanumeric': 0.09469263077510501, 'fraction_numerical': 0.0, 'mean_word_length': 3.425675675675676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '877895', 'n_tokens_mistral': 776, 'n_tokens_neox': 740, 'n_words': 284}