This tool can be used to import a series of points contained within a comma-separated values (*.csv) file (input_file
) into a vector shapefile of a POINT VectorGeometryType. The input file must be an ASCII text file with a .csv extensions. The tool will automatically detect the field data type; for numeric fields, it will also determine the appropriate length and precision. The user must specify the x-coordinate (x_field_num
) and y-coordiante (y_field_num
) fields. All fields are imported as attributes in the output (output
) vector file. The tool assumes that the first line of the file is a header line from which field names are retrieved.
merge_table_with_csv, export_table_to_csv
def csv_points_to_vector(self, input_file: str, x_field_num: int = 0, y_field_num: int = 1, epsg: int = 0) -> Vector: ...