Description
Package polyline implements a Google Maps Encoding Polyline encoder and decoder.
See https://godoc.org/github.com/twpayne/go-polyline.
Encoding example:
polyline alternatives and similar packages
Based on the "GIS" category.
Alternatively, view polyline alternatives based on common mentions on social networks and blogs.
-
go-geom
Package geom implements efficient geometry types for geospatial applications. -
go-kml
Package kml provides convenience methods for creating and writing KML documents. -
UTM
Bidirectional UTM-WGS84 converter for golang :earth_africa: :globe_with_meridians: -
go-sypexgeo
SypexGeo library for Go (provides access data from SypexGeo IP database files) -
go-gpx
Package gpx provides convenience types for reading and writing GPX files.
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of polyline or a related project?
Popular Comparisons
README
go-polyline
Package polyline
implements a Google Maps Encoding Polyline encoder and decoder.
Encoding example
func ExampleEncodeCoords() {
coords := [][]float64{
{38.5, -120.2},
{40.7, -120.95},
{43.252, -126.453},
}
fmt.Println(string(polyline.EncodeCoords(coords)))
// Output: _p~iF~ps|U_ulLnnqC_mqNvxq`@
}
Decoding example
func ExampleDecodeCoords() {
buf := []byte("_p~iF~ps|U_ulLnnqC_mqNvxq`@")
coords, _, _ := polyline.DecodeCoords(buf)
fmt.Println(coords)
// Output: [[38.5 -120.2] [40.7 -120.95] [43.252 -126.453]]
}
License
BSD-2-Clause
*Note that all licence references and agreements mentioned in the polyline README section above
are relevant to that project's source code only.