CRNEAT

Create a neatline


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

Back to top

Description


CRNEAT creates a neatline or a series of neatlines. A neatline is often used as an aid to registration for digitizing, as a clipping boundary, or is used to set up a map series (for example, NTS). CRNEAT can create a single neatline or it can create many "tiles" that are based on given extents; for example, for five maps across and five maps down, where each tile is 1000m x 2000m.
Back to top

Parameters


crneat(fili, filo, dbvs, dbsl, dbsn, dbsd, vareatype, neattype, mapunits, llbounds, ulx, uly, lrx, lry, numtiles)

Name Type Caption Length Value range
FILI str Input file name 0 -    
FILO str Output file name 0 -    
DBVS List[int] Input vector segment or layer 0 - 1  
DBSL List[int] Output segment list 0 -   1 -
DBSN str Output vector segment name 0 - 8 Default: CRNEAT
DBSD str Output vector segment description 0 -   Default: Neatline created
VAREATYPE str Output layer type 0 - 9 TOPOAREA (Line), WHOLEPOLY (Whole Polygon)
Default: WHOLEPOLY
NEATTYPE str Neatline type 0 - 10 Geocoded, Geographic
Default: Geocoded
MAPUNITS str Map units 0 - 17 PIXEL, UTM, METER, and others
Default: METER
LLBOUNDS str Bounds are Long/Lat: NO/YES 0 - 3 NO, YES
Default: NO
ULX str Upper-left x-coordinate 0 - 64  
ULY str Upper-left y-coordinate 0 - 64  
LRX str Lower-right x-coordinate 0 - 64  
LRY str Lower-right y-coordinate 0 - 64  
NUMTILES List[int] Number of tiles 0 - 2 1,1 -
Default: 1,1
Back to top

Parameter descriptions

FILI

Specifies the name of the file that contains the optional vector segment and input channel to be processed.

FILO

Specifies the name of the file that contains the output neatline vector layers.

If this parameter is not specified, the file specified by FILI is used as the output file.

DBVS

Specifies the vector segment or layer that contains projection information that is used for the output file.

If DBVS is specified, its projection information is used and MAPUNITS and BOUNDS are ignored. DBVS is ignored if BOUNDS is specified.

DBSL

Specifies the output neatline vector channel segments. DBSL must have the same amount of inputs as NUMTILES.

If an existing output file is used, it must also be specified. DBSL is ignored if a new output file is created.

DBSN

Specifies a name (up to 8 characters) for the output vector segment.

DBSD

Describes (in up to 64 characters) the contents or origins of the vectors.

VAREATYPE

Specifies the output layer type.

Valid values are TOPOAREA and WHOLEPOLY. If an invalid value is entered, VAREATYPE is set to WHOLEPOLY.

NEATTYPE

Specifies whether the neatline is geocoded or geographic.

MAPUNITS

Specifies a new type of georeferencing, GCP, or vector unit for an existing georeferencing, GCP, or vector segment. If MAPUNITS is not specified, the georeferencing, GCP, or vector unit is not changed. MAPUNITS is ignored if the segment type is not a georeferencing (type 150), GCP (type 213 or 214), or vector (type 116) segment. The following units are supported:

MAPUNITS can specify the UTM grid zone number and row and Earth model, as follows:

 MAPUNITS = "UTM mm r Ennn"
 

Where 'mm' represents the two-digit zone number between 1 and 60 and 'r' represents the zone row. A single letter between N and X is used for north of the equator; a single letter between C and M is used for south of the equator. Zone rows A, B, Y, and Z are not supported; rows I and O do not exist. 'Ennn' specifies the Earth model, where the model number is between 0 and 19. If the Earth model is not specified, then E000 (Clarke 1866) is assumed. The Earth model can be specified for longitude and latitude (and other units except PIXEL) as follows:

MAPUNITS="LONG/LAT Ennn"

For a complete list of supported projections and Earth models, see Understanding map projections. The format of the map units string is described in Output units.

LLBOUNDS

Specifies the boundaries of the graticule or grid. If a boundary is not entered but a DBVS parameter is specified, the extents of the vector objects in that segment are used by default. If a boundary is not entered and no DBVS is specified, the extents of FILI are used by default.

The accepted values for BOUNDS are Xul (the x-coordinate for the upper-left corner), Yul (the y-coordinate for the upper-left corner), Xlr (the x-coordinate for the lower-right corner), and Ylr (the y-coordinate for the lower-right corner).

Depending on the input projection, BOUNDS is measured in either geographic units (latitude and longitude, measured in decimal degrees) or geocoded units (such as meters or feet).

If a geographic value is used, it must be transformed into its decimal equivalent (for example, 00d00m36s = 0.01).

ULX

Specifies the upper-left x-coordinate.

ULY

Specifies the upper-left y-coordinate.

LRX

Specifies the lower-right x-coordinate.

LRY

Specifies the lower-right y-coordinate.

NUMTILES

Specifies multiples of neatline columns and rows. Each new multiple neatline is written to a new vector segment.

Back to top

Details

If multiple neatlines are created, one new neatline vector segment can be optionally created for each neatline. One neatline is always created with a default of 1 column x 1 row.

Neatline 1-1 is the upper-left corner of a multiple neatline setup. You can specify that a "grid" of neatlines is created (for example, 2 x 2, 3 x 3, and so on, or 2 x 3, 5 x 6, 3 x 6, and so on). Each new multiple neatline is written to a new vector segment in the output file. If the output is to the viewer, all neatlines are dispalyed as separate entries in the tree. Each new multiple neatline has the same projection and datum. The extents for each new multiple neatline is calculated based on the original input extents. For example:

Input is:
Output is:

In the western hemisphere, the longitude values decrease as you move east.

You can specify the layer name as part of the input. If you create tiles, the system generates a new layer name each time. If tiles are created, the new layer name is the input layer name plus its column and row position (for example, the default name is CRNEAT for tiles of 2x2 and the output layer names are CRNEAT1-1, CRNEAT2-1, CRNEAT1-2, and CRNEAT2-2. Each neatline has the same description.

Back to top

Example

A new neatline vector layer is built in oirvine.pix with georeference projection information from FILI.

from pci.crneat import crneat

fili	=	"irvine.pix"
filo	=	"oirvine.pix"	# creates a new output file
dbvs	=	[]	# uses georeference projection information
dbsl	=	[]	# output segment is 1 because oirvine.pix is created
# and 1 tile is specified
dbsn	=	""	# use default "CRNEAT"
dbsd	=	""	# use default "Neatline created"
vareatype	=	""	# use default "WHOLEPOLY"
neattype	=	""	# use default "Geocoded"
mapunits	=	""	# use default "METER"
llbounds	=	""	# use projection from database vector segment
ulx	=	"117.76958"
uly	=	"33.74901"
lrx	=	"117.60279"
lry	=	"33.6114"
numtiles	=	[]	# use default 1,1

crneat( fili, filo, dbvs, dbsl, dbsn, dbsd, vareatype, neattype, \
mapunits, llbounds, ulx, uly, lrx, lry, numtiles )

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