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 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.