package smartclip

import "github.com/paulmach/orb/clip/smartclip"

Package smartclip performs a more advanced clipping algorithm so it can deal with correctly oriented open rings and polygon.

Index

Functions

func Geometry

func Geometry(box orb.Bound, g orb.Geometry, o orb.Orientation) orb.Geometry

Geometry will do a smart more involved clipping and wrapping of the geometry. It will return simple OGC geometries. Rings that are NOT closed AND have an endpoint in the bound will be implicitly closed.

func MultiPolygon

func MultiPolygon(box orb.Bound, mp orb.MultiPolygon, o orb.Orientation) orb.MultiPolygon

MultiPolygon will smart clip a multipolygon to the bound. Rings that are NOT closed AND have an endpoint in the bound will be implicitly closed.

func Polygon

func Polygon(box orb.Bound, p orb.Polygon, o orb.Orientation) orb.MultiPolygon

Polygon will smart clip a polygon to the bound. Rings that are NOT closed AND have an endpoint in the bound will be implicitly closed.

func Ring

func Ring(box orb.Bound, r orb.Ring, o orb.Orientation) orb.MultiPolygon

Ring will smart clip a ring to the boundary. This may result multiple rings so a multipolygon is possible. Rings that are NOT closed AND have an endpoint in the bound will be implicitly closed.

Source Files

around_bound.go smart.go

Version
v0.1.0
Published
Sep 11, 2018
Platform
js/wasm
Imports
4 packages
Last checked
3 hours ago

Tools for package owners.