Registering spatial functions
You must register the spatial functions before using them.
The spatial functions are implemented as SparkSQL user-defined functions (UDFs) and employ
user-defined types (UDTs). In order to register these UDFs and UDTs within your SQLContext, your
code must include the following statement:
SqlGeometry.registerAll(spark)