TRANSEC

Create perpendicular transects


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example

Back to top

Description


Creates perpendicular transects from a segment of shore baseline at regular intervals. The perpendicular transects will be created with a table denoting the distance of each shoreline from the shore baseline. A new output vector segment is created.
Back to top

Parameters


transec(file, dbvs, dbsl, fldnme, num1, str1, str2, num2)

Name Type Caption Length Value range
FILE * str Input file name 1 -    
DBVS * List[int] Input shorelines vector segment 1 -    
DBSL * List[int] Input baseline vector segment 1 - 1  
FLDNME * str Field containing the year 1 - 64  
NUM1 * List[int] Interval between perpendicular transects 1 - 1  
STR1 str Query string for selecting shorelines 0 - 64  
STR2 str Method for computing new shoreline 0 - 64 NONE | FIXED | ENDPOINT | AVERAGE
Default: NONE
NUM2 List[int] Years of erosion/erosion rate 0 - 1  

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK file to process. The specified file must contain at least one vector segment.

DBVS

Specifies the input vector segment that describes the shorelines for which transects are to be made.

DBSL

Specifies the baseline input vector segment that defines the normal direction in which transects are to be made.

FLDNME

Specifies a field, associated with each input vector segment, to use as the year marker.

NUM1

Specifies, in ground units, the interval to use for the automated transects.

STR1

Optionally specifies a vector query expression used to selectively use vectors that satisfy the search criteria.

For example, using the following expression:
"year < 1970"

TRANSEC uses only vectors that have "year" values of less than 1970.

The following is the grammar:
 EXPRESSION: PRIMARY
             not (EXPRESSION)
             (EXPRESSION) BINARY_OP (EXPRESSION)

 PRIMARY: FIELDNAME OPERATOR VALUE

 OPERATOR: =
           <=
           >=
           <
           >

 BINARY_OP: and
            or
 VALUE: number
        "string"

 FIELDNAME: valid fieldname of the vector segment or "ShapeId"

        attribute = 1
        not (attribute = 1)
        (attribute < 12 and attribute > 4) or (group < 2)

STR2

Specifies the method to use to compute a new shoreline.

Supported methods are:

NUM2

If STR2 (Method for Computing New Shoreline) is AVERAGE or ENDPOINT, specifies the number of years of erosion to simulate.

If STR2 is FIXED, specifies the total erosion.

Back to top

Return Value

Returns: 

Type:  PCI_INT

This parameter holds the number of the segment created.

Back to top

Details

Transects are created along the base line vectors every NUM1 units. Should a transect interval span an interior vertex of the base line, a bisector is created for the transect at the interior vertex. In all other cases, a transect perpendicular to the baseline is created. A minimum of two line segments are created for each line segment.

A vertex is created where each transect crosses a shore boundary. A shore may cross a transect more than once and all vertices are recorded. If several shoreline layers are specified, vertices are added sequentially to each transect for each shoreline segment.

A record is created with each transect, with each field denoting the distance between the baseline and shoreline. Each field will be marked with the values obtained from the field specified by FLDNME (Field Containing the Year).

In the case of a shore boundary that crosses the transect multiple times, the closest one to the baseline is recorded.

Where a shoreline does not cross the transect, the distance recorded will be -1.

If the specified Method for Computing New Shorelines (STR2) is not NONE, a predicted shoreline will also be created based on either calculated or provided erosion rates.

Back to top

Example

Generate a vector segment from a segment of shore baseline at regular intervals.

from pci.transec import transec

file	=	"maaexample.pix"	# input file
dbvs	=	[2,3,4,5,6,7]	# shoreline vector segments
dbsl	=	[11]	# baseline vector segment
fldnme	=	"Year"	# field name
num1	=	[10]	# interval of transects
str1	=	"year > 1980"	# after 1980
str2	=	""	# none
num2	=	[]

transec( file, dbvs, dbsl, fldnme, num1, str1, str2, num2 )

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.