Skip to content

Commit

Permalink
[issue-227] Quick fix for bug reported in go-spatial#227
Browse files Browse the repository at this point in the history
When writing out WKT's of a geometry collection we were using the index,
instead of the geometry.
  • Loading branch information
gdey committed Dec 15, 2017
1 parent 4ac2308 commit 52c0588
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wkb/wkt.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func wkt(geo tegola.Geometry) string {
func WKT(geo tegola.Geometry) string {
switch g := geo.(type) {
default:
// This is temporary till the new wkt package is ready.
panic("Don't know the geometry type!")
return ""
case tegola.Point:
// POINT( 10 10)
Expand Down Expand Up @@ -105,7 +107,7 @@ func WKT(geo tegola.Geometry) string {

}
var geometries []string
for sg := range g.Geometries() {
for _, sg := range g.Geometries() {
s := WKT(sg)
geometries = append(geometries, s)
}
Expand Down

0 comments on commit 52c0588

Please sign in to comment.