
vectorpipe.vectortile.Simplify.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vectorpipe_2.11 Show documentation
Show all versions of vectorpipe_2.11 Show documentation
Import OSM data and output to VectorTiles with GeoTrellis.
The newest version!
package vectorpipe.vectortile
import geotrellis.vector._
import geotrellis.layer._
import org.locationtech.jts.simplify.TopologyPreservingSimplifier
object Simplify {
/**
* Simplifies geometry using JTS's topology-preserving simplifier.
*
* Note that there are known bugs with this simplifier. Please refer to the
* JTS documentation. Faster simplifiers with fewer guarantees are available
* there as well.
*/
def withJTS(g: Geometry, ld: LayoutDefinition): Geometry = {
TopologyPreservingSimplifier.simplify(g, ld.cellSize.resolution)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy