Presentation Dialog box of the application
Syntax

Presentation

This application obtains point type (X,Y) geographic locations from fields in a table in a (local or remote) database and creates a topologically structured points file in the MiraMon PNT format.

This is particularly useful when the user has a table in which each record consists of the (X,Y) location of a single point and one or more attributes (for example, pollution levels in wells). In such cases the program converts the table into a graphical information layer (PNT) with associated alphanumeric information (either maintaining the link to the original database or by exporting the data to a DBF table associated with the point file).

The table may be stored in any of a number of databases, e.g. DBF, ACCESS, ORACLE, DB2, EXCEL... For all these databases, except DBF, the access is performed via ODBC (Open DataBase Connectivity). For those databases stored in a file (e.g. MDB files for ACCESS, XLS files for EXCEL, etc.) the file can be accessed directly. For those databases stored on a server (eg ORACLE, INFORMIX, DB2, etc.) it is necessary to use a special DSN (Data Source Name) file, which can be generated using the "Orígenes de Datos (ODBC)" WINDOWS tool (search for ODBC in WINDOWS for more information). In the cases where a databases is accessed via ODBC it is possible to select either any existing table or view (predefined query) in the database, or to choose to use a SQL statement to dynamically generate the desired table.

A special case for the use of this program is for recovering the labels that were used to assign attributes to a polygon layer as the polygon database (P.dbf) often contains, in the MAPX and MAPY fields, the coordinates of the labels. It must be remembered, however, that it is always possible to recover the labels of a polygon layer through Etiqueta.

Thus, the input table may be a DBF format table, a DBF table associated with a polygon database (P.dbf), or a table from any of a number of databases (ACCESS, EXCEL, ORACLE, DB2, SQL-Server, etc). Whatever the case, the input table must have two fields that contain the X and the Y coordinates of the point respectively. When the points are extracted from a DBF file or table in a generic database, these fields may have any name; however they must be called MAPX and MAPY when dealing with a DBF file associated with a polygon database (the default option in the MiraMon topology structuring process).

When the points are extracted from a DBF file or table in a generic database, all the fields are exported to the points database (T.dbf) only in those cases where the user has chosen not to maintain the link with the original database. On the other hand, when the labels are extracted from a structured polygon file (P.dbf) the only fields that are incorporated to the T.dbf are those fields that do NOT refer to the geometric and topological characteristics of the polygons (fields like AREA, PERIMETRE, N_VERTEXS, etc, are not exported). If it is necessary to select just a few fields, then use a SQL sentence via ODBC.

The fields containing the X and Y coordinates can be numeric (N) (e.g. 4500120.0 for UTMY or 12.01 degrees) or character (C) fields. In the latter case, the format of degrees, minutes and seconds is supported: Dº M' S".

By default, the program structures topologically the layer of points created, that is, it ensures spatial uniqueness so that two points located at a distance less than or equal to a given tolerance are considered the same point. From the "Advanced" button it is possible to indicate the value of this tolerance (which will have a zero value if no other is indicated). Also from this "Advanced" button the user can indicate that do not want to structure topologically, and in this case two or more points located in the same place will be kept as independent points.

As just explained, the tolerance value, which only applies when it is structured topologically, must be expressed in the same units as the XY coordinates and serves to consider two points located as equal at a Euclidean distance less than or equal to this value. When this happens, if the attributes of the two or more points located within a radius less than or equal to the tolerance are different (in any of the subject fields in the database), the point becomes, in the T.dbf table, as many records as original points had different attributes (a situation described as "multiple record"). Instead, if the attributes are the same (very close points but with repeated information) a single record is generated, in the T.dbf table, for the point. In the case of maintaining the link to the original database via ODBC and having to generate multiple records due to topological structuring and tolerance, this multiple record is created naturally.

Through the "Advanced" button it is also possible to indicate the reference system. If not specified, the default reference system (saved in MiraMon.par) is applied.

If in the last run a non-zero tolerance was defined, or a different reference system than the default system indicated in MiraMon.par, the symbol '!' next to the "Advanced..." button will warn that it is very convenient to press the button and check if the user still wants to apply these special parameters.


Dialog box of the application

BDPNT dialog box.


Syntax

Syntax:

Parameters:

Modifiers:



NOTES:
For DBF files:
The field names CAMPX, CAMPY, CAMPID must follow the DBF specifications.
+ Valid characters are: upper case letters [A-Z], figures [0-9] and the character '_', but not in the initial position.
+ Blank spaces are not permitted.
+ The maximum number of characters is 10.

For databases accessed via ODBC:
+ If the CAMPX, CAMPY, CAMPID field names do not satisfy the dBase standards they are modified and the original name is left as a field descriptor in the REL.
+ In cases using a SQL sentence, it is possible to use aliases for the fields.

For example:
/CAMPX=X
/CAMPY=Y
/SQL="SELECT Coordenada_X as X, Coordenada_Y as Y, IdentificadorEntitat AS IDE FROM DataFile.txt"