amillb / pgMapMatch

map-matching of GPS traces
MIT License
77 stars 20 forks source link

Ensure fields are converted to correct type #17

Closed amillb closed 4 years ago

amillb commented 4 years ago

Exceptions can occur if fields are as Decimal or another non-float type.

E.g.

  File "pgMapMatch\mapmatcher.py", line 932, in transProb
    networkDist = self.distMatrix[n0, n2]+rr1['km']*frc1+rr2['km']*frc2
TypeError: unsupported operand type(s) for +: 'decimal.Decimal' and 'float'