Skip to content

sterkh66/jts-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala spatial extension over Java Topology Suite (JTS)

Provides various spatial utils over JTS such as:

  • polygon map quad tree (trie) spatial indexing
  • improved STRTree index search with result refinement and neighboors detecting

Example: Query polygons containing point

      import com.github.sterkh66.spatial.index.quadtree.QuadTree
      import com.github.sterkh66.spatial.index.Shape
      import org.locationtech.jts.io.WKTReader

      val wkt = new WKTReader()
      val shape = Shape("s1", wkt.read("POLYGON ((3 3, 3 4, 4 4, 4 3, 3 3))"))
      val qt = new QuadTree[String]()

      qt.createIndex(List(shape), 8)
      qt.queryIndex(3.1, 3.5)
      
      Seq("s1")

About

Scala extension for Java Topology Suite (JTS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages