Learned a lot in the past to weeks in the GIS domain. Finally came up with a good and performant solution for "adding privacy" to GPS traces by stenciling out private spots like overnight stays and adding smoothing - all in SQL.
Green is the precise version. Pink is coarse and red is coarser and both without overnight stops.