1,554 changes: 834 additions & 720 deletions src/ui/qgsdelimitedtextsourceselectbase.ui

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions tests/src/python/test_qgsdelimitedtextprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,38 @@ def test_013_read_dms_xy(self):
]
runTest(description,wanted,log_wanted,filename,**params)


def test_014_decimal_point(self):
description='Reading degrees/minutes/seconds angles'
filename='testdp.csv'
params={'yField': 'geom_y', 'xField': 'geom_x', 'type': 'csv', 'delimiter': ';', 'decimalPoint': ','}
if printTests:
createTest('014_decimal_point',description,filename,**params)
assert False,"Set printTests to False to run delimited text tests"
wanted={
u'1': {
'id': u'1',
'description': u'Comma as decimal point 1',
'geom_x': u'10',
'geom_y': u'20',
'other': u'30',
'text field': u'Field with , in it',
'#geometry': 'POINT(10.0 20.0)',
},
u'2': {
'id': u'2',
'description': u'Comma as decimal point 2',
'geom_x': u'12',
'geom_y': u'25.003',
'other': u'-38.55',
'text field': u'Plain text field',
'#geometry': 'POINT(12.0 25.003)',
},
}
log_wanted=[
]
runTest(description,wanted,log_wanted,filename,**params)

#END

if __name__ == '__main__':
Expand Down
3 changes: 3 additions & 0 deletions tests/testdata/delimitedtext/testdp.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id;description;geom_x;geom_y;other;text field
1;Comma as decimal point 1;10,0;20,0;30,0;Field with , in it
2;Comma as decimal point 2;12;25,003;-38,55;Plain text field