S2Geometry Library Release v0.2

Vijay Nayar madric at gmail.com
Sat May 25 11:48:12 UTC 2019

Greetings everyone.

I wanted to announce here the v0.2 release of the S2 Geometry 
Library in the D language. The DUB page should be updated to show 
v0.2 shortly.


What is it?
The S2 Geometry library is an extremely high precision and 
performant library for geometry on the surface of the Earth. It 
is useful for dealing with areas, boundaries, lines, polygons, 
etc. As a practical example, it can answer very quickly if 
thousands of driving paths would pass through the arbitrary 
boundaries of an airport and thus need to pay a toll.

It was originally created by Eric Veach and the library is used 
in Google. I have converted this library in the D programming 

What's New?
This release is now nearly feature complete with the C++ library. 
Only encoding/decoding of geometric objects is missing.

What's in Store Next?
* More work is needed to improve performance further. The full D 
test suite runs in 139 seconds while the C++ full test suite only 
needs 112 seconds.
* Encoding/Decoding support for transmitting geometric objects in 
binary form.
* Work on this library will slow down, as I plan to start using 
it instead of writing it.

Why does this matter?
Currently only C++ and D have this level of feature support, 
which cannot be found in Java, Python, Go, Rust, or any other 
languages today.

Part of the reason for this is that it's a very very very large 
and complex project that makes use of a large set of C++ features.

Language           files        blank      comment         code
C++                  177         6082        12820        37378
C/C++ Header         164         6385        18691        21935
Python                 1           35           24          188
CMake                  1            0            0           16
SUM:                 343        12502        31535        59517

D's philosophy of having a large tool-box makes this work doable 
by a single person while other languages have spent many years 
with many contributors.

More information about the Digitalmars-d-announce mailing list