mharnold / spiderosm

Spider Open Street Matcher: GIS street network matching library
MIT License
27 stars 3 forks source link

dbinterface, assert self.get_column_names(TABLE[1,2]) order of elements #7

Closed rbracket closed 9 years ago

rbracket commented 9 years ago

If the element order of the assert col_names statements are changed per the diff notes below, spiderosm_test.py completes with postgis_enabled.

I will email the changed dbinterface.py file.

< assert col_names == ['test_key', 'other', 'a:f1']

    assert col_names == ['a:f1', 'other', 'test_key']

< assert self.get_column_names(TABLE1) == ['geometry', 'test_key', 'other', 'a:f1']

    assert self.get_column_names(TABLE1) == ['a:f1', 'other', 'test_key', 'geometry']

< < assert self.get_column_names(TABLE2) == ['geometry', 'length', 'a:name', 'id']

    assert  self.get_column_names(TABLE2) == ['id', 'a:name', 'length', 'geometry']
mharnold commented 9 years ago

The take home is column order is not 'defined' I fixed this by sorting the col names alphabetically. (Fixed in version 0.3.3)