Changeset 2637


Ignore:
Timestamp:
Mar 30, 2006, 8:20:39 PM (18 years ago)
Author:
steve
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r2631 r2637  
    171171The present example represents a simple scenario and does not
    172172include any forcing terms, nor is the data taken from a file as it
    173 would be in many typical cases. 
     173would be in many typical cases.
    174174
    175175The conserved quantities involved in the
    176176problem are water depth, $x$-momentum and $y$-momentum. Other quantities
    177 involved in the computation are the friction, stage (absolute height of water surface) 
     177involved in the computation are the friction, stage (absolute height of water surface)
    178178and elevation, the last two being related to
    179179the depth through the equation
    180180
    181 \begin{tabular}{rcrcl} 
     181\begin{tabular}{rcrcl}
    182182  \code{stage} &=& \code{elevation} &+& \code{depth}
    183 \end{tabular} 
     183\end{tabular}
    184184
    185185
     
    337337
    338338The stage (the height of the water surface) is related to the
    339 elevation and the depth at any time by the equation 
     339elevation and the depth at any time by the equation
    340340
    341341
    342342{\small \begin{verbatim}
    343343    stage = elevation + depth
    344 \end{verbatim}} 
    345  
     344\end{verbatim}}
     345
    346346
    347347For this example, we simply assign a constant value to \code{stage},
     
    352352\end{verbatim}}
    353353
    354 which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units 
     354which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units
    355355below the zero level.
    356356
     
    360360involving other quantities. Suppose, instead of setting a constant value
    361361for the stage, we wished
    362 to specify a constant value for the \emph{depth}. For such a case we 
     362to specify a constant value for the \emph{depth}. For such a case we
    363363need to specify that \code{stage} is
    364364everywhere obtained by adding that value to the value already
     
    370370\end{verbatim}}
    371371
    372 That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus the 
     372That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus the
    373373value of \code{elevation} already defined.
    374374
    375 The reader will probably appreciate that this capability to incorporate 
     375The reader will probably appreciate that this capability to incorporate
    376376expressions into statements using \code{set\_quantity} greatly expands
    377377its power.)
     
    410410
    411411    \item[Dirichlet boundary]Specifies a fixed value at the
    412 boundary and assigns initial values to the $x$-momentum and $y$-momentum. 
     412boundary and assigns initial values to the $x$-momentum and $y$-momentum.
    413413
    414414    \item[Time boundary.]A Dirichlet boundary whose behaviour varies with time.
     
    428428
    429429The reader may wish to experiment by varying the choice of boundary types
    430 for one or more of the boundaries. In the case of \code{Bd} and \code{Bw}, 
    431 the three arguments in each case represent the 
     430for one or more of the boundaries. In the case of \code{Bd} and \code{Bw},
     431the three arguments in each case represent the
    432432
    433433{\small \begin{verbatim}
     
    483483
    484484
    485 \begin{figure}[hbt] 
     485\begin{figure}[hbt]
    486486
    487487%  \centerline{ \includegraphics[width=75mm, height=75mm]{examples/bedslopestart.eps}}
    488  
     488
    489489  \caption{Bedslope example viewed with Swollen}
    490490  \label{fig:bedslopestart}
    491 \end{figure} 
    492 
    493 
    494 \begin{figure}[hbt] 
    495 
    496   \centerline{ 
     491\end{figure}
     492
     493
     494\begin{figure}[hbt]
     495
     496  \centerline{
    497497%    \includegraphics[width=75mm, height=75mm]{examples/bedslopeduring.eps}
    498498%    \includegraphics[width=75mm, height=75mm]{examples/bedslopeend.eps}
    499    }   
    500  
     499   }
     500
    501501  \caption{Bedslope example viewed with Swollen}
    502502  \label{fig:bedslope2}
    503 \end{figure} 
     503\end{figure}
    504504
    505505
     
    518518scenario, rather than the artificial illustrative one used in
    519519\code{bedslopephysical.py}. The domain of interest surrounds the Sydney region,
    520 and predominantly covers Sydney Harbour. A hypothetical tsunami wave is 
     520and predominantly covers Sydney Harbour. A hypothetical tsunami wave is
    521521generated by a submarine mass failure situated on the edge of the
    522522continental shelf.
     
    574574area of a triangle used for triangulation---and mesh points are
    575575created inside the polygon through a random process. Figure
    576 \ref{fig:pentagon} shows a simple example of this, in which 
     576\ref{fig:pentagon} shows a simple example of this, in which
    577577the triangulation is carried out within a pentagon.
    578578
    579579
    580 \begin{figure}[hbt] 
    581 
    582 
    583  
     580\begin{figure}[hbt]
     581
     582
     583
    584584  \caption{Mesh points are created inside the polygon}
    585   \label{fig:pentagon} 
    586 \end{figure} 
     585  \label{fig:pentagon}
     586\end{figure}
    587587
    588588Boundary tags are not restricted to \code{`left'}, \code{`right'},
     
    601601resolution. See Figure \ref{fig:interior meshes}.
    602602
    603 \begin{figure}[hbt] 
    604 
    605 
    606  
     603\begin{figure}[hbt]
     604
     605
     606
    607607  \caption{Interior meshes with individual resolution}
    608   \label{fig:interior meshes} 
    609 \end{figure} 
     608  \label{fig:interior meshes}
     609\end{figure}
    610610
    611611In its general form, \code{pmesh} takes for its input a bounding
     
    638638\code{meshname}.
    639639
    640 The statements 
     640The statements
    641641
    642642{\small \begin{verbatim}
     
    648648are used to read in the specific polygons \code{project.harbour\_polygon\_2} and
    649649\code{botanybay\_polygon\_2} from \code{project.py} and assign a
    650 common resolution of 5000 to each. The statement 
     650common resolution of 5000 to each. The statement
    651651
    652652{\small \begin{verbatim}
    653653    create_mesh_from_regions(project.diffpolygonall,%
    654                          boundary_tags= {'bottom': [0],% 
     654                         boundary_tags= {'bottom': [0],%
    655655                                         'right1': [1],%
    656656                                         'right0': [2],%
     
    661661                                         'left3': [7]},%
    662662                         maximum_triangle_area=100000,%
    663                          filename=meshname,%           
     663                         filename=meshname,%
    664664                         interior_regions=interior_regions)
    665665\end{verbatim}}
    666666
    667667is then used to create the mesh, taking the bounding polygon to be the polygon
    668 \code{diffpolygonall} specified in \code{project.py}. The 
    669 argument \code{boundary\_tags} assigns a dictionary, whose keys are the 
    670 names of the boundary tags used for the bounding polygon---\code{`bottom'}, 
    671 `right0', `right1', `right2', `top', `left1', `left2' and `left3'--- 
     668\code{diffpolygonall} specified in \code{project.py}. The
     669argument \code{boundary\_tags} assigns a dictionary, whose keys are the
     670names of the boundary tags used for the bounding polygon---\code{`bottom'},
     671`right0', `right1', `right2', `top', `left1', `left2' and `left3'---
    672672and whose values identify the indices of the segments associated with each of these
    673673tags. (The value associated with each boundary tag is a one-element list.)
     
    702702taken from \code{project.py}.
    703703
    704 {\small \begin{verbatim} 
     704{\small \begin{verbatim}
    705705    domain.set_name(project.basename)%
    706706    domain.set_datadir(project.outputdir)%
     
    725725\code{slump\_tsunami}. This is similar to how we set elevation in
    726726\code{bedslopephysical.py} using a function---however, in this case the
    727 function is both more complex and more interesting. 
    728 
    729 The function returns the water displacement for all \code{x} 
    730 and \code{y} in the domain. The water displacement is a ?? function that depends 
     727function is both more complex and more interesting.
     728
     729The function returns the water displacement for all \code{x}
     730and \code{y} in the domain. The water displacement is a ?? function that depends
    731731on the characteristics of the slump (length, thickness, slope, etc), its
    732 location (origin) and the depth at that location. 
     732location (origin) and the depth at that location.
    733733
    734734
     
    746746The elevation is specified by reading data from a file:
    747747
    748 {\small \begin{verbatim}%
    749     domain.set_quantity('elevation',%
    750                     filename = project.combineddemname + '.pts',%
    751                     use_cache = True,%
    752                     verbose = True)%
     748{\small \begin{verbatim}
     749    domain.set_quantity('elevation',
     750                    filename = project.combineddemname + '.pts',
     751                    use_cache = True,
     752                    verbose = True)
    753753\end{verbatim}}
    754754
     
    777777\subsection{Boundary Conditions}
    778778
    779 Setting boundaries follows a similar pattern to the one used for 
    780 \code{bedslopephysical.py}, except that in this case we need to associate a 
     779Setting boundaries follows a similar pattern to the one used for
     780\code{bedslopephysical.py}, except that in this case we need to associate a
    781781boundary type with each of the
    782 boundary tag names introduced when we established the mesh. In place of the four 
    783 boundary types introduced for \code{bedslopephysical.py}, we use the reflective 
     782boundary tag names introduced when we established the mesh. In place of the four
     783boundary types introduced for \code{bedslopephysical.py}, we use the reflective
    784784boundary for each of the
    785785eight tagged segments:
     
    799799{\small \begin{verbatim}
    800800    import time t0 = time.time()
    801    
     801
    802802    for t in domain.evolve(yieldstep = 120, duration = 18000):
    803803        print domain.timestepping_statistics()
    804804        print domain.boundary_statistics(tags = 'bottom')
    805    
     805
    806806    print 'That took %.2f seconds' %(time.time()
    807807\end{verbatim}}
     
    878878
    879879% Translate following into layman's language
    880 This function is used to create a triangular mesh suitable for use with 
    881 \anuga, within a specified region. The region is specified as the interior of a polygon 
    882 (the \emph{bounding polygon}). The user specifies the bounding polygon and the 
    883 \emph{resolution}---that is, maximal area of any triangle in the mesh. There is 
     880This function is used to create a triangular mesh suitable for use with
     881\anuga, within a specified region. The region is specified as the interior of a polygon
     882(the \emph{bounding polygon}). The user specifies the bounding polygon and the
     883\emph{resolution}---that is, maximal area of any triangle in the mesh. There is
    884884also an option to specify a number of internal polygons within each of which a
    885885separate mesh is created, generally with a smaller resolution. Additionally,
    886 the user specifies a list of boundary tags, one for each edge of the bounding 
    887 polygon. 
     886the user specifies a list of boundary tags, one for each edge of the bounding
     887polygon.
    888888\end{funcdesc}
    889889
     
    894894Module: \code{pyvolution.pmesh2domain}
    895895
    896 Once the initial mesh file has been created, this function is applied 
     896Once the initial mesh file has been created, this function is applied
    897897to convert it to a domain object---that is, to a member of
    898898the special Python class Domain (or a subclass of Domain), which provides access to properties and
     
    911911\begin{funcdesc} {set\_name}{name}
    912912    Module: \code{pyvolution.domain}
    913    
     913
    914914    Assigns the name \code{name} to the domain
    915915\end{funcdesc}
     
    917917\begin{funcdesc} {get\_name}{}
    918918    Module: \code{pyvolution.domain}
    919    
     919
    920920    Returns the name assigned to the domain by \code{set_name}. If no name has been
    921921    assigned, returns `domain'.
     
    924924\begin{funcdesc} {set\_datadir}{name}
    925925    Module: \code{pyvolution.domain}
    926    
     926
    927927    Sets the directory used for data to the value \code{name}. The default value, before
    928     \code{set\_datadir} is run, is the value \code{default_datadir} 
     928    \code{set\_datadir} is run, is the value \code{default_datadir}
    929929    specified in \code{config.py}.
    930930\end{funcdesc}
     
    932932\begin{funcdesc} {get_datadir}{}
    933933    Module: \code{pyvolution.domain}
    934    
     934
    935935    Returns the data directory set by \code{set\_datadir} or, if \code{set\_datadir} has not
    936     been run, returns the value \code{default_datadir} specified in 
     936    been run, returns the value \code{default_datadir} specified in
    937937    \code{config.py}.
    938938\end{funcdesc}
     
    948948\section{Setting Quantities}
    949949
    950 \begin{funcdesc}{set\_quantity}{name, 
    951     numeric = None, 
    952     quantity = None, 
    953     function = None, 
    954     geospatial_data = None, 
     950\begin{funcdesc}{set\_quantity}{name,
     951    numeric = None,
     952    quantity = None,
     953    function = None,
     954    geospatial_data = None,
    955955    filename = None,
    956     attribute_name = None, 
    957     alpha = None, 
    958     location = 'vertices', 
    959     indices = None, 
     956    attribute_name = None,
     957    alpha = None,
     958    location = 'vertices',
     959    indices = None,
    960960    verbose = False,
    961     use_cache = False} 
     961    use_cache = False}
    962962  Module: \code{pyvolution.domain}
    963963  (see also \code{pyvolution.quantity.set_values})
     
    973973the quantity in question.
    974974\item a list of numbers or a Numeric array ordered the same way as the mesh vertices.
    975 \item a function (e.g.\ see the samples introduced in Chapter 2) 
     975\item a function (e.g.\ see the samples introduced in Chapter 2)
    976976\item an expression composed of other quantities and numbers, arrays, lists (for
    977977example, a linear combination of quantities)
    978 \item the name of a file from which the data can be read. In this case, the optional argument attribute_name will select which attribute to use from the file. If left out, set_quantity will pick one. This is useful in cases where there is only one attribute. 
     978\item the name of a file from which the data can be read. In this case, the optional argument attribute_name will select which attribute to use from the file. If left out, set_quantity will pick one. This is useful in cases where there is only one attribute.
    979979\item a geospatial dataset (See ?????). Optional argument attribute_name applies here as with files.
    980980\end{itemize}
     
    986986
    987987
    988 Set quantity will look at the type of the second argument (\code{numeric}) and 
    989 determine what action to take. 
     988Set quantity will look at the type of the second argument (\code{numeric}) and
     989determine what action to take.
    990990
    991991Values can also be set using the appropriate keyword arguments.
    992 If x is a function, for example, \code{domain.set\_quantity(name, x)}, \code{domain.set\_quantity(name, numeric=x)}, and \code{domain.set\_quantity(name, function=x)} 
    993 are all equivalent. 
     992If x is a function, for example, \code{domain.set\_quantity(name, x)}, \code{domain.set\_quantity(name, numeric=x)}, and \code{domain.set\_quantity(name, function=x)}
     993are all equivalent.
    994994
    995995
     
    998998\item \code{indices} which is a list of ids of triangles to which set_quantity should apply its assignment of values.
    999999\item \code{location} determines which part of the triangles to assign to. Options are 'vertices' (default), 'edges', and 'centroids'.
    1000 \end{itemize} 
     1000\end{itemize}
    10011001
    10021002
     
    10181018with \code{set_quantity}.
    10191019
    1020 \begin{funcdesc}{tsunami_slump}{length, depth, slope, width=None, thickness=None, \
    1021                 x0=0.0, y0=0.0, alpha=0.0, \
    1022                 gravity=9.8, gamma=1.85, \
    1023                 massco=1, dragco=1, frictionco=0, psi=0, \
    1024                 dx=None, kappa=3.0, kappad=0.8, zsmall=0.01, \
     1020\begin{funcdesc}{tsunami_slump}{length, depth, slope, width=None, thickness=None,
     1021                x0=0.0, y0=0.0, alpha=0.0,
     1022                gravity=9.8, gamma=1.85,
     1023                massco=1, dragco=1, frictionco=0, psi=0,
     1024                dx=None, kappa=3.0, kappad=0.8, zsmall=0.01,
    10251025                domain=None,
    10261026                verbose=False}
     
    10651065Module: \code{pyvolution.least\_squares}
    10661066
    1067 Given a time series, either as a sequence of numbers or 
     1067Given a time series, either as a sequence of numbers or
    10681068defined at the vertices of a triangular mesh (such
    10691069as those stored in \code{sww} files), \code{Interpolation\_function}
    10701070is used to create a callable object that interpolates a value for
    1071 an arbitrary time \code{t} within the model limits and possibly a 
    1072 point \code{(x, y)} within a mesh region. 
    1073 
    1074 The actual time series at which data is available is specified by means 
     1071an arbitrary time \code{t} within the model limits and possibly a
     1072point \code{(x, y)} within a mesh region.
     1073
     1074The actual time series at which data is available is specified by means
    10751075of an array \code{time} of monotonically increasing times.
    1076 The quantities containing the values to be interpolated are specified in 
    1077 an array---or dictionary of arrays (used in conjunction with the optional argument 
     1076The quantities containing the values to be interpolated are specified in
     1077an array---or dictionary of arrays (used in conjunction with the optional argument
    10781078\code{quantitity\_names}) --- called \code{quantities}.
    1079 The optional arguments \code{vertex_coordinates} and \code{triangles} represent 
     1079The optional arguments \code{vertex_coordinates} and \code{triangles} represent
    10801080the spatial mesh associated with the quantity arrays. If omitted the function created
    10811081by \code{Interpolation\_function} will be a function of \code{t} only.
    10821082
    10831083
    1084 Since, in practice, values need to be computed at specified 
     1084Since, in practice, values need to be computed at specified
    10851085points, the syntax allows the user to specify, once and for all, a list
    10861086\code{interpolation\_points} of points at which values are required. In this case,
     
    11201120This function allows you to assign a boundary object (corresponding to a
    11211121pre-defined or user-specified boundary condition) to every boundary segment that
    1122 has been assigned a particular tag. 
     1122has been assigned a particular tag.
    11231123
    11241124This is done by specifying a dictionary \code{boundary\_map}, whose values are the boundary objects
     
    12091209
    12101210  \begin{funcdesc}{evolve}{yieldstep = None, finaltime = None, duration = None, skip_initial_step = False}
    1211  
     1211
    12121212  Module: pyvolution.domain
    1213  
    1214   This function (a method of \code{domain}) is invoked once all the preliminaries have been 
    1215   completed, and causes the model to progress through successive steps in its evolution, storing results and 
     1213
     1214  This function (a method of \code{domain}) is invoked once all the preliminaries have been
     1215  completed, and causes the model to progress through successive steps in its evolution, storing results and
    12161216  outputting statistics whenever a user-specified period \code{yieldstep} is completed (generally
    12171217  during this period the model will evolve through several steps internally). The user specifies
    12181218  the total time period over which the evolution is to take place, by specifying values (in seconds) for either
    1219   \code{duration} or \code{finaltime}, as well as the interval in seconds after which results are to be 
    1220   stored and statistics output. 
    1221  
     1219  \code{duration} or \code{finaltime}, as well as the interval in seconds after which results are to be
     1220  stored and statistics output.
     1221
    12221222  You can include \code{evolve} in a statement of the type:
    1223  
     1223
    12241224  {\small \begin{verbatim}
    12251225      for t in domain.evolve(yieldstep, finaltime):
     
    12411241
    12421242  \end{funcdesc}
    1243  
    1244  
     1243
     1244
    12451245  \begin{funcdesc}{get_quantity}{???}
    1246   Module: \code{pyvolution.domain} 
     1246  Module: \code{pyvolution.domain}
    12471247  Allow access to individual quantities and their methods
    1248  
    1249   \end{funcdesc} 
    1250  
    1251  
     1248
     1249  \end{funcdesc}
     1250
     1251
    12521252  \begin{funcdesc}{get_values}{???}
    1253   Module: \code{pyvolution.quantity}   
    1254  
     1253  Module: \code{pyvolution.quantity}
     1254
    12551255  Extract values for quantity as an array
    1256  
    1257   \end{funcdesc}   
    1258  
    1259  
     1256
     1257  \end{funcdesc}
     1258
     1259
    12601260  \begin{funcdesc}{get_integral}{???}
    1261   Module: \code{pyvolution.quantity}   
    1262  
     1261  Module: \code{pyvolution.quantity}
     1262
    12631263  Return computed integral over entire domain for this quantity
    1264  
    1265   \end{funcdesc}     
    1266  
    1267  
    1268 \section{Other} 
    1269 
    1270   \begin{funcdesc}{domain.create_quantity_from_expression}{???} 
    1271  
    1272   Handy for creating derived quantities on-the-fly. 
     1264
     1265  \end{funcdesc}
     1266
     1267
     1268\section{Other}
     1269
     1270  \begin{funcdesc}{domain.create_quantity_from_expression}{???}
     1271
     1272  Handy for creating derived quantities on-the-fly.
    12731273  See \code{Analytical\_solution\_circular\_hydraulic\_jump.py} for an example of use.
    1274   \end{funcdesc}       
     1274  \end{funcdesc}
    12751275
    12761276%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    13671367
    13681368  \begin{funcdesc}{sww2dem}{???}
    1369   Module: \code{pyvolution.data\_manager}   
    1370  
    1371  
    1372   \end{funcdesc}     
    1373 
    1374  
     1369  Module: \code{pyvolution.data\_manager}
     1370
     1371
     1372  \end{funcdesc}
     1373
     1374
    13751375  \begin{funcdesc}{dem2pts}{???}
    1376   Module: \code{pyvolution.data_manager}   
    1377  
    1378  
    1379   \end{funcdesc}       
     1376  Module: \code{pyvolution.data_manager}
     1377
     1378
     1379  \end{funcdesc}
    13801380
    13811381%\[
     
    14871487  func_defualts, co_argcount)} and the function will be recomputed.
    14881488
    1489   Options are set by means of the function \code{set_option(key, value)}, 
     1489  Options are set by means of the function \code{set_option(key, value)},
    14901490  where \code{key} is a key associated with a
    1491   Python dictionary \code{options}. This dictionary stores settings such as the name of 
     1491  Python dictionary \code{options}. This dictionary stores settings such as the name of
    14921492  the directory used, the maximum
    14931493  number of cached files allowed, and so on.
     
    15061506    \end{verbatim}}
    15071507
    1508  
     1508
    15091509\section{swollen}
    1510 The output generated by \anuga may be viewed by means of the visualisation tool \code{swollen}, 
    1511 which takes the \code{sww} file output by \anuga and creates a visual representation of the data. 
    1512 Examples may be seen in Figures \ref{fig:bedslopestart} and \ref{fig:bedslope2}. 
    1513 To view an \code{sww} file with \code{swollen} in the 
    1514 Windows environment, you can simply drag the icon representing the file over an icon on the desktop 
     1510The output generated by \anuga may be viewed by means of the visualisation tool \code{swollen},
     1511which takes the \code{sww} file output by \anuga and creates a visual representation of the data.
     1512Examples may be seen in Figures \ref{fig:bedslopestart} and \ref{fig:bedslope2}.
     1513To view an \code{sww} file with \code{swollen} in the
     1514Windows environment, you can simply drag the icon representing the file over an icon on the desktop
    15151515for the \code{swollen} executable file (or a shortcut to it). Alternatively, you can operate \code{swollen}
    15161516from the command line, in both Windows and Linux environments.
    15171517
    15181518On successful operation, you will see an interactive moving-picture display. You can use keys and the mouse
    1519 to slow down, speed up or stop the display, change the viewing position or carry out a number of other 
     1519to slow down, speed up or stop the display, change the viewing position or carry out a number of other
    15201520simple operations.
    1521  
     1521
    15221522The main keys operating the interactive screen are:\\
    15231523
     
    15801580
    15811581  \begin{classdesc}{Polygon_function}{regions, default = 0.0, geo_reference = None}
    1582   Module: \code{utilities.polygon} 
    1583  
    1584  
     1582  Module: \code{utilities.polygon}
     1583
     1584
    15851585  \end{classdesc}
    1586  
     1586
    15871587  \begin{funcdesc}{read_polygon}{filename}
    1588   Module: \code{utilities.polygon} 
    1589  
     1588  Module: \code{utilities.polygon}
     1589
    15901590  Reads the specified file and returns a polygon. Each
    15911591  line of the file must contain exactly two numbers, separated by a comma, which are interpreted
    15921592  as coordinates of one vertex of the polygon.
    15931593  \end{funcdesc}
    1594  
     1594
    15951595  \begin{funcdesc}{populate_polygon}{polygon, number_of_points, seed = None, exclude = None}
    1596   Module: \code{utilities.polygon} 
    1597  
     1596  Module: \code{utilities.polygon}
     1597
    15981598  Populates the interior of the specified polygon with the specified number of points,
    15991599  selected by means of a uniform distribution function.
    16001600  \end{funcdesc}
    1601  
     1601
    16021602  \begin{funcdesc}{point_in_polygon}{polygon, delta=1e-8}
    1603   Module: \code{utilities.polygon} 
    1604  
     1603  Module: \code{utilities.polygon}
     1604
    16051605  Returns a point inside the specified polygon and close to the edge. The distance between
    16061606  the returned point and the nearest point of the polygon is less than $\sqrt{2}$ times the
    16071607  second argument \code{delta}, which is taken as $10^{-8}$ by default.
    16081608  \end{funcdesc}
    1609  
     1609
    16101610  \begin{funcdesc}{inside_polygon}{points, polygon, closed = True, verbose = False}
    1611   Module: \code{utilities.polygon} 
    1612  
     1611  Module: \code{utilities.polygon}
     1612
    16131613  Used to test whether a single point---or the members of a list of points---
    16141614  are inside the specified polygon. If the first argument is a single point,
     
    16171617  array comprising the indices of the points in the list that lie inside the polygon.
    16181618  (If none of the points are inside, returns \code{zeros((0,), 'l')}.)
    1619   Points on the edges of the polygon are regarded as inside if 
     1619  Points on the edges of the polygon are regarded as inside if
    16201620  \code{closed} is set to \code{True} or omitted; otherwise they are regarded as outside.
    16211621  \end{funcdesc}
    1622  
     1622
    16231623  \begin{funcdesc}{outside_polygon}{points, polygon, closed = True, verbose = False}
    1624   Module: \code{utilities.polygon} 
    1625  
     1624  Module: \code{utilities.polygon}
     1625
    16261626  Exactly like \code{inside_polygon}, but with the words `inside' and `outside' interchanged.
    16271627  \end{funcdesc}
    1628  
     1628
    16291629  \begin{funcdesc}{point_on_line}{x, y, x0, y0, x1, y1}
    16301630  Module: \code{utilities.polygon}
    1631  
     1631
    16321632  Returns \code{True} or \code{False}, depending on whether the point with coordinates
    1633   \code{x, y} is on the line passing through the points with coordinates \code{x0, y0} 
     1633  \code{x, y} is on the line passing through the points with coordinates \code{x0, y0}
    16341634  and \code{x1, y1} (extended if necessary at either end).
    16351635  \end{funcdesc}
    1636  
     1636
    16371637  \begin{funcdesc}{separate_points_by_polygon}{points, polygon,
    16381638                               closed = True, verbose = False}\indexedcode{separate_points_by_polygon}
    1639   Module: \code{utilities.polygon} 
    1640  
     1639  Module: \code{utilities.polygon}
     1640
    16411641  \end{funcdesc}
    1642    
     1642
    16431643
    16441644
     
    16471647\section{geo_spatial_data}
    16481648
    1649 This describes a class that represents arbitrary point data in UTM 
     1649This describes a class that represents arbitrary point data in UTM
    16501650coordinates along with named attribute values.
    16511651
Note: See TracChangeset for help on using the changeset viewer.