geotools/geotools — pull request #174 by bakk (2013-04-04 08:53:17+00:00)
Title: Read SQL Servers binary format directly

Read SQL Server binary directly into JTS Geometries, instead of going
via WKB. While geotools will use a little longer to decode (about 50% more
compared to WKB), SQL Server won't have to encode at all, resulting in a performance
improvement.

A simple benchmark showed a performance increase around 50% on a
layer with many small geometries (a grid), while another layer only showed
7% performance increase.

The binary reader only support v1 of the specification. V2 adds support for CircularString, CompoundCurve, CurvePolygon, FullGlobe (http://go.microsoft.com/fwlink/?LinkId=226407), and is not supported by today's WKB implementation either (as far as I can see).

It would be nice if the added classes (for parsing the sql server binary) could be licenced freely (eg. apache/bsd), but if you would like it to be LGPL like the rest, that's OK too.

It's important to review this thoroughly so that everything that today's implementation supports still works :)