When importing tables into Cartographica using File > Import Table Data… Cartographica uses a sampling of the file to help determine the types of the data.
If the imported file is a DBF file, field information (name, length, and type) are taken directly from the schema in the file.
The process is as follows:
- First it scans the beginning of the file looking for delimiters to determine the end of line, field break, and field escape characters. Line breaks are expected to be either CR, LF, or CRLF.
- If you have marked the first line as containing the field names, they are taken as the field names and the line is skipped.
- A series of lines (usually 30) are read by Cartographica to sample the data for type information. All fields are originally presumed to be string (text) fields, but each of the fields in each of the lines is tested to see if they could also be another format, such as date or number.
- Once the lines are read and the testing is done, Cartographica makes a determination based on the data in the fields as to the type. If all read lines contain valid numbers, the field is presumed to be numeric; if all lines contain valid dates, the field is presumed to be dates; otherwise, it is taken as a string.
In the cases of data which is highly regular, this set of assumptions works well. However, in some cases, such as fields that sometimes contain only numbers and sometimes contain numbers and letters, it can cause misleading results.
In version 1.4 and beyond, the Field Mapping window allows you to manually change the type of the field after Cartographica has taken a guess at it, so you have a chance to fix the problem.
In versions prior to 1.4, if you encounter a situation where a field is mistakenly recognized as a date or number field, it is possible to remedy this by moving a line (or lines) that does not comply with that to the top of the file.
In versions prior to 1.4, if you encounter a situation where a field is mistakenly recognized as a date or number field, it is possible to remedy this by moving a line (or lines) that does not comply with that to the top of the file.
Comments