Skip to content

function.rst standard

cvvergara edited this page Oct 18, 2013 · 31 revisions

<function>.rst for the pgRouting functions are located on

  • src/<section>/doc/<function>.rst
  • src/<section>/doc/<subdivision>/<function>.rst (when applicable)

The following is the standard of the structure for the <function>.rst files (including examples for the links and or code).

The general structure of the file is:

Licence

..
****************************************************************************
pgRouting Manual
Copyright(c) pgRouting Contributors

This documentation is licensed under a Creative Commons Attribution-Share
Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/
****************************************************************************

Title is the function name

Name

Synopsis

Description

Parameters

Input

Output

Prerequisites

Examples

See Also

History

Indexing data for sphinix

You can copy/paste an change things acordingly.

..
****************************************************************************
pgRouting Manual
Copyright(c) pgRouting Contributors

This documentation is licensed under a Creative Commons Attribution-Share
Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/
****************************************************************************

.. _pgr_function_name:

pgr_functionName
===============================================================================

.. index::
    single: pgr_functionName( list of [parameter type])
    module: <module name>

Name
------------------------------------------------------------------------------

``pgr_functionName`` - <Same One line description as in index.rst>

Synopsis
------------------------------------------------------------------------------

.. code-block:: sql

    type pgr_functionName( list of: [parameter type])

Description
-----------------------------------------------------------------------------

Description of the Function which may include:
how to setup data for the inputs
expected results

.. rubric:: Parameters

The function accepts the following parameters:

:parameter: ``type`` <One line description as in the example bellow>.
:tol: ``float8`` The maximum search distance for an edge.

Comments on the preparation of the input data may go here.

The function returns:

:parameterName: ``type`` <One/two line description as in the example above>.

 Comments on the interpretation of the results may go here.


Prerequisites
------------------------------------------------------------------------------

Preparation of the input data may go here and may include:
Other pgr functions that help prepare the data
Column naming of the input table

Examples
-----------------------------------------------------------------------------

.. code-block:: sql

    select pgr_pointtoedgenode('edge_table', 'POINT(2 0)'::geometry, 0.02);
    pgr_pointtoedgenode
    -------------------
                     1
    (1 row)

The example uses the :ref:`sampledata` network.

See Also
-----------------------------------------------------------------------------

* :ref:`pgr_name_of_other_function` - <same one line comment as in the index.rst of the other function>

.. rubric:: History

* New in version 2.1.0

.. index::
    single: pgr_functionName( list of [parameter type])
    module: <module name>

Links

Clone this wiki locally