[HACKERS] Path and Polygon types
[HACKERS] Path and Polygon types
От:
"Thomas G. Lockhart" <Thomas.Lockhart@jpl.nasa.gov>
Дата:
I updated the code tree and regression tests to use the new syntax for path and polygon geometric types. This will require a table update when upgrading from pre-v6.1 databases, but I think this is preferable to having two syntax styles lurking in the interpreter. From a previous message to Hal Snyder: >... One problem with retaining the ability to read the old notation is >that, for path and polygon, the interpretation of the input varies >wildly depending on how many parens you include in your string. For >example, > >(for paths) >'1,2,3,4,5,6' is interpreted as '((1,2),(3,4),(5,6))' >'(1,2,3,4,5,6)' is interpreted as '((3,4),(5,6))' >'((1,2),(3,4),(5,6))' is interpreted as in the first case > >(for polygons) >'1,2,3,4' is interpreted as '((1,2),(3,4))' >'(1,2,3,4)' is interpreted as '((1,3),(2,4))' >'((1,2),(3,4))' is interpreted as in the first case The "new syntax" gives a consistant interpretation to all of the above input variations. Hal was the only one who responded to my query a couple of weeks ago regarding this topic, and he concurred on the change (at least on second thought :) I think the downside of having to update a few existing databases (not everyone uses the geometric types) is far outweighed by not having syntax variations to cope with in the future. I don't expect these changes to cause big troubles, and I will make sure that any unanticipated problems are fixed immediately. I had wanted to put this in earlier, but did not have the time. - Tom "idle hands are the devil's playground"... ------------------------------