Version 0.8

lecture: Evolving JSTS to a modern port of JTS using AST transformation

Event large 4b8aa978adbb7c8e80151f5a83c6782a12e763374ae3a042a55e7e626a64d93b

JTS is a well known Java library of spatial predicates and functions for processing geometry.


JSTS has since 2011 provided a port of JTS to JavaScript that provides that proven library for use in browsers and other popular JavaScript runtimes. It brings the functionality of JTS to the browser without having to make a roundtrip to a server which enables advanced spatial operations to web applications even in offline conditions and is, for example, used by MapBox as a significant part of turf.js.


The initial effort to create JSTS was a long, arduous and manual process and has since lagged behind JTS missing crucial new bug fixes and features. Resorting to additional manual porting effort was not in anyone's interest, it seems. Instead there was dreams of an automated translation from Java to JavaScript.


In this talk I will explain how I managed to automatically translate JTS to create a new version of JSTS that supersedes the old manual port with a more complete, correct and up to date implementation.


Links to project: https://github.com/bjornharrtell/jsts