ustroetz/cost_model — pull request #29 by perrygeo (2013-08-09 19:25:56+00:00)
Title: Test for multi/single linestrings directly

Test for multi/single linestrings directly;

relying on try/except is the proper python way to handle this but OGR exceptions don't work reliably enough.

When OGR raises an exception on a geometry operation, it is difficult to "recover" from. Any subsequent calls on that geometry continue to raise the RuntimeError which means the except block doesn't execute properly. This is purely an OGR problem and may be fixed in more recent versions - however, to maintain compatibility with our server OS and its older version of OGR, we need this fix.