Changeset 2637
- Timestamp:
- Mar 30, 2006, 8:20:39 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/anuga_user_manual.tex
r2631 r2637 171 171 The present example represents a simple scenario and does not 172 172 include any forcing terms, nor is the data taken from a file as it 173 would be in many typical cases. 173 would be in many typical cases. 174 174 175 175 The conserved quantities involved in the 176 176 problem are water depth, $x$-momentum and $y$-momentum. Other quantities 177 involved in the computation are the friction, stage (absolute height of water surface) 177 involved in the computation are the friction, stage (absolute height of water surface) 178 178 and elevation, the last two being related to 179 179 the depth through the equation 180 180 181 \begin{tabular}{rcrcl} 181 \begin{tabular}{rcrcl} 182 182 \code{stage} &=& \code{elevation} &+& \code{depth} 183 \end{tabular} 183 \end{tabular} 184 184 185 185 … … 337 337 338 338 The stage (the height of the water surface) is related to the 339 elevation and the depth at any time by the equation 339 elevation and the depth at any time by the equation 340 340 341 341 342 342 {\small \begin{verbatim} 343 343 stage = elevation + depth 344 \end{verbatim}} 345 344 \end{verbatim}} 345 346 346 347 347 For this example, we simply assign a constant value to \code{stage}, … … 352 352 \end{verbatim}} 353 353 354 which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units 354 which specifies that the surface level is set to a height of $-0.4$, i.e. 0.4 units 355 355 below the zero level. 356 356 … … 360 360 involving other quantities. Suppose, instead of setting a constant value 361 361 for the stage, we wished 362 to specify a constant value for the \emph{depth}. For such a case we 362 to specify a constant value for the \emph{depth}. For such a case we 363 363 need to specify that \code{stage} is 364 364 everywhere obtained by adding that value to the value already … … 370 370 \end{verbatim}} 371 371 372 That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus the 372 That is, the value of \code{stage} is set to $\code{h} = 0.05$ plus the 373 373 value of \code{elevation} already defined. 374 374 375 The reader will probably appreciate that this capability to incorporate 375 The reader will probably appreciate that this capability to incorporate 376 376 expressions into statements using \code{set\_quantity} greatly expands 377 377 its power.) … … 410 410 411 411 \item[Dirichlet boundary]Specifies a fixed value at the 412 boundary and assigns initial values to the $x$-momentum and $y$-momentum. 412 boundary and assigns initial values to the $x$-momentum and $y$-momentum. 413 413 414 414 \item[Time boundary.]A Dirichlet boundary whose behaviour varies with time. … … 428 428 429 429 The 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 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 432 432 433 433 {\small \begin{verbatim} … … 483 483 484 484 485 \begin{figure}[hbt] 485 \begin{figure}[hbt] 486 486 487 487 % \centerline{ \includegraphics[width=75mm, height=75mm]{examples/bedslopestart.eps}} 488 488 489 489 \caption{Bedslope example viewed with Swollen} 490 490 \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{ 497 497 % \includegraphics[width=75mm, height=75mm]{examples/bedslopeduring.eps} 498 498 % \includegraphics[width=75mm, height=75mm]{examples/bedslopeend.eps} 499 } 500 499 } 500 501 501 \caption{Bedslope example viewed with Swollen} 502 502 \label{fig:bedslope2} 503 \end{figure} 503 \end{figure} 504 504 505 505 … … 518 518 scenario, rather than the artificial illustrative one used in 519 519 \code{bedslopephysical.py}. The domain of interest surrounds the Sydney region, 520 and predominantly covers Sydney Harbour. A hypothetical tsunami wave is 520 and predominantly covers Sydney Harbour. A hypothetical tsunami wave is 521 521 generated by a submarine mass failure situated on the edge of the 522 522 continental shelf. … … 574 574 area of a triangle used for triangulation---and mesh points are 575 575 created 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 577 577 the triangulation is carried out within a pentagon. 578 578 579 579 580 \begin{figure}[hbt] 581 582 583 580 \begin{figure}[hbt] 581 582 583 584 584 \caption{Mesh points are created inside the polygon} 585 \label{fig:pentagon} 586 \end{figure} 585 \label{fig:pentagon} 586 \end{figure} 587 587 588 588 Boundary tags are not restricted to \code{`left'}, \code{`right'}, … … 601 601 resolution. See Figure \ref{fig:interior meshes}. 602 602 603 \begin{figure}[hbt] 604 605 606 603 \begin{figure}[hbt] 604 605 606 607 607 \caption{Interior meshes with individual resolution} 608 \label{fig:interior meshes} 609 \end{figure} 608 \label{fig:interior meshes} 609 \end{figure} 610 610 611 611 In its general form, \code{pmesh} takes for its input a bounding … … 638 638 \code{meshname}. 639 639 640 The statements 640 The statements 641 641 642 642 {\small \begin{verbatim} … … 648 648 are used to read in the specific polygons \code{project.harbour\_polygon\_2} and 649 649 \code{botanybay\_polygon\_2} from \code{project.py} and assign a 650 common resolution of 5000 to each. The statement 650 common resolution of 5000 to each. The statement 651 651 652 652 {\small \begin{verbatim} 653 653 create_mesh_from_regions(project.diffpolygonall,% 654 boundary_tags= {'bottom': [0],% 654 boundary_tags= {'bottom': [0],% 655 655 'right1': [1],% 656 656 'right0': [2],% … … 661 661 'left3': [7]},% 662 662 maximum_triangle_area=100000,% 663 filename=meshname,% 663 filename=meshname,% 664 664 interior_regions=interior_regions) 665 665 \end{verbatim}} 666 666 667 667 is 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 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'--- 672 672 and whose values identify the indices of the segments associated with each of these 673 673 tags. (The value associated with each boundary tag is a one-element list.) … … 702 702 taken from \code{project.py}. 703 703 704 {\small \begin{verbatim} 704 {\small \begin{verbatim} 705 705 domain.set_name(project.basename)% 706 706 domain.set_datadir(project.outputdir)% … … 725 725 \code{slump\_tsunami}. This is similar to how we set elevation in 726 726 \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 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 731 731 on the characteristics of the slump (length, thickness, slope, etc), its 732 location (origin) and the depth at that location. 732 location (origin) and the depth at that location. 733 733 734 734 … … 746 746 The elevation is specified by reading data from a file: 747 747 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) 753 753 \end{verbatim}} 754 754 … … 777 777 \subsection{Boundary Conditions} 778 778 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 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 781 781 boundary 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 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 784 784 boundary for each of the 785 785 eight tagged segments: … … 799 799 {\small \begin{verbatim} 800 800 import time t0 = time.time() 801 801 802 802 for t in domain.evolve(yieldstep = 120, duration = 18000): 803 803 print domain.timestepping_statistics() 804 804 print domain.boundary_statistics(tags = 'bottom') 805 805 806 806 print 'That took %.2f seconds' %(time.time() 807 807 \end{verbatim}} … … 878 878 879 879 % 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 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 884 884 also an option to specify a number of internal polygons within each of which a 885 885 separate 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. 886 the user specifies a list of boundary tags, one for each edge of the bounding 887 polygon. 888 888 \end{funcdesc} 889 889 … … 894 894 Module: \code{pyvolution.pmesh2domain} 895 895 896 Once the initial mesh file has been created, this function is applied 896 Once the initial mesh file has been created, this function is applied 897 897 to convert it to a domain object---that is, to a member of 898 898 the special Python class Domain (or a subclass of Domain), which provides access to properties and … … 911 911 \begin{funcdesc} {set\_name}{name} 912 912 Module: \code{pyvolution.domain} 913 913 914 914 Assigns the name \code{name} to the domain 915 915 \end{funcdesc} … … 917 917 \begin{funcdesc} {get\_name}{} 918 918 Module: \code{pyvolution.domain} 919 919 920 920 Returns the name assigned to the domain by \code{set_name}. If no name has been 921 921 assigned, returns `domain'. … … 924 924 \begin{funcdesc} {set\_datadir}{name} 925 925 Module: \code{pyvolution.domain} 926 926 927 927 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} 929 929 specified in \code{config.py}. 930 930 \end{funcdesc} … … 932 932 \begin{funcdesc} {get_datadir}{} 933 933 Module: \code{pyvolution.domain} 934 934 935 935 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 937 937 \code{config.py}. 938 938 \end{funcdesc} … … 948 948 \section{Setting Quantities} 949 949 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, 955 955 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, 960 960 verbose = False, 961 use_cache = False} 961 use_cache = False} 962 962 Module: \code{pyvolution.domain} 963 963 (see also \code{pyvolution.quantity.set_values}) … … 973 973 the quantity in question. 974 974 \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) 976 976 \item an expression composed of other quantities and numbers, arrays, lists (for 977 977 example, 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. 979 979 \item a geospatial dataset (See ?????). Optional argument attribute_name applies here as with files. 980 980 \end{itemize} … … 986 986 987 987 988 Set quantity will look at the type of the second argument (\code{numeric}) and 989 determine what action to take. 988 Set quantity will look at the type of the second argument (\code{numeric}) and 989 determine what action to take. 990 990 991 991 Values 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. 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. 994 994 995 995 … … 998 998 \item \code{indices} which is a list of ids of triangles to which set_quantity should apply its assignment of values. 999 999 \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} 1001 1001 1002 1002 … … 1018 1018 with \code{set_quantity}. 1019 1019 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, 1025 1025 domain=None, 1026 1026 verbose=False} … … 1065 1065 Module: \code{pyvolution.least\_squares} 1066 1066 1067 Given a time series, either as a sequence of numbers or 1067 Given a time series, either as a sequence of numbers or 1068 1068 defined at the vertices of a triangular mesh (such 1069 1069 as those stored in \code{sww} files), \code{Interpolation\_function} 1070 1070 is 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 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 1075 1075 of 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 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 1078 1078 \code{quantitity\_names}) --- called \code{quantities}. 1079 The optional arguments \code{vertex_coordinates} and \code{triangles} represent 1079 The optional arguments \code{vertex_coordinates} and \code{triangles} represent 1080 1080 the spatial mesh associated with the quantity arrays. If omitted the function created 1081 1081 by \code{Interpolation\_function} will be a function of \code{t} only. 1082 1082 1083 1083 1084 Since, in practice, values need to be computed at specified 1084 Since, in practice, values need to be computed at specified 1085 1085 points, the syntax allows the user to specify, once and for all, a list 1086 1086 \code{interpolation\_points} of points at which values are required. In this case, … … 1120 1120 This function allows you to assign a boundary object (corresponding to a 1121 1121 pre-defined or user-specified boundary condition) to every boundary segment that 1122 has been assigned a particular tag. 1122 has been assigned a particular tag. 1123 1123 1124 1124 This is done by specifying a dictionary \code{boundary\_map}, whose values are the boundary objects … … 1209 1209 1210 1210 \begin{funcdesc}{evolve}{yieldstep = None, finaltime = None, duration = None, skip_initial_step = False} 1211 1211 1212 1212 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 1216 1216 outputting statistics whenever a user-specified period \code{yieldstep} is completed (generally 1217 1217 during this period the model will evolve through several steps internally). The user specifies 1218 1218 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 1222 1222 You can include \code{evolve} in a statement of the type: 1223 1223 1224 1224 {\small \begin{verbatim} 1225 1225 for t in domain.evolve(yieldstep, finaltime): … … 1241 1241 1242 1242 \end{funcdesc} 1243 1244 1243 1244 1245 1245 \begin{funcdesc}{get_quantity}{???} 1246 Module: \code{pyvolution.domain} 1246 Module: \code{pyvolution.domain} 1247 1247 Allow access to individual quantities and their methods 1248 1249 \end{funcdesc} 1250 1251 1248 1249 \end{funcdesc} 1250 1251 1252 1252 \begin{funcdesc}{get_values}{???} 1253 Module: \code{pyvolution.quantity} 1254 1253 Module: \code{pyvolution.quantity} 1254 1255 1255 Extract values for quantity as an array 1256 1257 \end{funcdesc} 1258 1259 1256 1257 \end{funcdesc} 1258 1259 1260 1260 \begin{funcdesc}{get_integral}{???} 1261 Module: \code{pyvolution.quantity} 1262 1261 Module: \code{pyvolution.quantity} 1262 1263 1263 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. 1273 1273 See \code{Analytical\_solution\_circular\_hydraulic\_jump.py} for an example of use. 1274 \end{funcdesc} 1274 \end{funcdesc} 1275 1275 1276 1276 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 1367 1367 1368 1368 \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 1375 1375 \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} 1380 1380 1381 1381 %\[ … … 1487 1487 func_defualts, co_argcount)} and the function will be recomputed. 1488 1488 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)}, 1490 1490 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 1492 1492 the directory used, the maximum 1493 1493 number of cached files allowed, and so on. … … 1506 1506 \end{verbatim}} 1507 1507 1508 1508 1509 1509 \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 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 1515 1515 for the \code{swollen} executable file (or a shortcut to it). Alternatively, you can operate \code{swollen} 1516 1516 from the command line, in both Windows and Linux environments. 1517 1517 1518 1518 On 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 1519 to slow down, speed up or stop the display, change the viewing position or carry out a number of other 1520 1520 simple operations. 1521 1521 1522 1522 The main keys operating the interactive screen are:\\ 1523 1523 … … 1580 1580 1581 1581 \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 1585 1585 \end{classdesc} 1586 1586 1587 1587 \begin{funcdesc}{read_polygon}{filename} 1588 Module: \code{utilities.polygon} 1589 1588 Module: \code{utilities.polygon} 1589 1590 1590 Reads the specified file and returns a polygon. Each 1591 1591 line of the file must contain exactly two numbers, separated by a comma, which are interpreted 1592 1592 as coordinates of one vertex of the polygon. 1593 1593 \end{funcdesc} 1594 1594 1595 1595 \begin{funcdesc}{populate_polygon}{polygon, number_of_points, seed = None, exclude = None} 1596 Module: \code{utilities.polygon} 1597 1596 Module: \code{utilities.polygon} 1597 1598 1598 Populates the interior of the specified polygon with the specified number of points, 1599 1599 selected by means of a uniform distribution function. 1600 1600 \end{funcdesc} 1601 1601 1602 1602 \begin{funcdesc}{point_in_polygon}{polygon, delta=1e-8} 1603 Module: \code{utilities.polygon} 1604 1603 Module: \code{utilities.polygon} 1604 1605 1605 Returns a point inside the specified polygon and close to the edge. The distance between 1606 1606 the returned point and the nearest point of the polygon is less than $\sqrt{2}$ times the 1607 1607 second argument \code{delta}, which is taken as $10^{-8}$ by default. 1608 1608 \end{funcdesc} 1609 1609 1610 1610 \begin{funcdesc}{inside_polygon}{points, polygon, closed = True, verbose = False} 1611 Module: \code{utilities.polygon} 1612 1611 Module: \code{utilities.polygon} 1612 1613 1613 Used to test whether a single point---or the members of a list of points--- 1614 1614 are inside the specified polygon. If the first argument is a single point, … … 1617 1617 array comprising the indices of the points in the list that lie inside the polygon. 1618 1618 (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 1620 1620 \code{closed} is set to \code{True} or omitted; otherwise they are regarded as outside. 1621 1621 \end{funcdesc} 1622 1622 1623 1623 \begin{funcdesc}{outside_polygon}{points, polygon, closed = True, verbose = False} 1624 Module: \code{utilities.polygon} 1625 1624 Module: \code{utilities.polygon} 1625 1626 1626 Exactly like \code{inside_polygon}, but with the words `inside' and `outside' interchanged. 1627 1627 \end{funcdesc} 1628 1628 1629 1629 \begin{funcdesc}{point_on_line}{x, y, x0, y0, x1, y1} 1630 1630 Module: \code{utilities.polygon} 1631 1631 1632 1632 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} 1634 1634 and \code{x1, y1} (extended if necessary at either end). 1635 1635 \end{funcdesc} 1636 1636 1637 1637 \begin{funcdesc}{separate_points_by_polygon}{points, polygon, 1638 1638 closed = True, verbose = False}\indexedcode{separate_points_by_polygon} 1639 Module: \code{utilities.polygon} 1640 1639 Module: \code{utilities.polygon} 1640 1641 1641 \end{funcdesc} 1642 1642 1643 1643 1644 1644 … … 1647 1647 \section{geo_spatial_data} 1648 1648 1649 This describes a class that represents arbitrary point data in UTM 1649 This describes a class that represents arbitrary point data in UTM 1650 1650 coordinates along with named attribute values. 1651 1651
Note: See TracChangeset
for help on using the changeset viewer.