-
AtriPol: Polygon labeling
Access this help text as a web page: AtriPol
Presentation and options
This application adds attributes (labels) to the polygons generated with the Ciclar application. Attributes are added to the P.DBF file as new fields of the database. The main use of the application is the inclusion of attributes not inherent to the geometry and topological structure of the polygons, but that give thematic meaning to each region (for ex. which type of vegetation has a given polygon). This application has two options:
AtriPol:
Adds attributes (labels) to the polygons generated with the Ciclar program.
AtriPol Field:
Adds attributes (labels) to the polygons using a fields file where the fields to be added are specified.
Attributes are associated to polygons by transfer of the attributes from a point inside the polygon. This point is usually called 'label'. Three different types of files can be used as label files:
- PNT file (recommended format): The polygons file will inherit one or more fields of the points database. The 'x' parameter controls which fields are copied. It can be generated with VecPNT.
If the main table has multiples records for each graphic identifier then it must be used AtriTop.
- VEC file containing points: A new field is added to the P.DBF file; this field contains the attribute of each label. The field name and its descriptor are interactively requested.
- Special DBF file for AtriPol: This file has two numeric (N) fields, called MAPX and MAPY, where the map coordinates of the point are expressed. The polygons file will inherit some or all fields of the DBF file.
Prior to start the labeling operation, the POL input file must have only one record for all and every graphic element (the Ciclar application generates a POL with such characteristics). So it is still NOT supported:
- The lack of records in the polygons database, i.e., all the polygons must have an associated record before labeling.
- The existence of polygons that previously present multiple record, even when the application is able to generate them.
In these cases you have to use AtriTop.
When the labels file does not give any label on a polygon, the field will remain blank, except in the case where the field already existed; in this case the pre-existing attribute or attributes are preserved.
When the labels file has only one label with only one record on a polygon, the application will act depending on the 'n' option of the command line:
- n=0, pre-existing fields that are not blank are preserved;
- n=1, pre-existing fields are overwritten with the new values;
- n=2, a new record in the database is generated except if the pre-existing attributes and the new ones are equal. When new records have to be generated, the last record is copied and the fields are updated according to the labels file.
When the labels file has more than one label or some label with more than one record on a given polygon, the logic is the following:
- n=0, all the pre-existing fields are preserved except the ones in blank. Blank fields are modified while new fields take values from the first record of the first label found.
- n=1, pre-existent fields are overwritten with the new values of the last record of the last label found.
- n=2, the application generates as many new records as point records exists. Old records are preserved (in first position), but if a new record is equal to the old one, the new is not written (it is not duplicated).
AtriPol only modifies the P.DBF and P.REL files. An original copy of these files can be recovered since two back-up copies P.BK1 and P.BK2 are respectively created.
In addition, the application generates three files:
- QUEIXES.TXT (complaint) file, editable with any text editor, in which you will find:
- Non labeled polygons.
- Incoherently relabeled polygons.
- Coherently relabeled polygons (having labels with equal values).
- BADPOINT.VEC file: incoherent labels.
- BADPOL.VEC file, with rectangles that enclose each non label polygon.
These files are also created when option 2 of the application is chosen (the option that allows inheriting several labels on one polygon). In this case, probably it will only be useful for non labeled polygons.
In all cases, fields called MAPX and MAPY can be created in the P.DBF file. These fields contain the X,Y coordinates of the used labels, which can have documentary value. For PNT files, even the graphic identifier could be inherited from the point, of course provided if it has a different field name than the polygon graphic identifier. When the option 'x' is equal to 0 (copy of all fields) the field ID_GRAFIC is NOT transferred to the P.DBF. In option x=2, fields are selected reading a list in a file. The format of this file is:
FieldNameA "Field Descriptor A"
FieldNameB "Field Descriptor B"
...
Note: the descriptor must be quoted.
Dialog box of the application
Syntax
Syntax:
- AtriPol PointsFile OutputFile n x
- AtriPol PointsFile OutputFile n FieldFile
Parameters:
- PointsFile
(Points file (with extension) -
Input parameter): Can be a PNT file, a VEC file containing points, or a DBF.
- OutputFile
(Output file -
Output parameter): Is a polygon file.
- n
(Multiple label -
Input parameter):
- 0: If there are two or more labels on a polygon, the first one found is transferred.
- 1: If there are two or more labels on a polygon, the last one found is transferred.
- 2: If there are two or more labels on a polygon, all the labels are transferred and n additional records are generated in the polygons database for the n labels.
- x
(Add fields -
Input parameter):
- 0: All the fields of the PointsFile are added, including MAPX and MAPY.
- 1: One or more fields in the points file are added (it is requested by the program). If labeling from a PNT or a VEC file, the program also asks about including MAPX and MAPY.
- 2: The fields listed in FieldFile file are added.
- FieldFile
(Field file -
Input parameter): In option x=2 the fields are selected through a field file that has the following format: FieldName A "Field descriptor A", FieldName B "Field descriptor B".
This application works and generates files of v. 1.1