Skip to content

Commit

Permalink
Add new wrap api: Distance3D
Browse files Browse the repository at this point in the history
  • Loading branch information
victor9011 committed Oct 9, 2019
1 parent 56cda83 commit 0443cbf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ogr.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,15 @@ func (geom Geometry) Distance(other Geometry) float64 {
return float64(dist)
}

// Compute 3D distance between thie geometry and the other.
// This method is built on the SFCGAL library,
// check it for the definition of the geometry operation.
// If OGR is built without the SFCGAL library, this method will always return -1.0
func (geom Geometry) Distance3D(other Geometry) float64 {
dist := C.OGR_G_Distance3D(geom.cval, other.cval)
return float64(dist)
}

// Compute length of geometry
func (geom Geometry) Length() float64 {
length := C.OGR_G_Length(geom.cval)
Expand Down

0 comments on commit 0443cbf

Please sign in to comment.