Ensure polygons are created correctly
This commit is contained in:
parent
09c32c2d64
commit
5a8feec56b
1 changed files with 2 additions and 0 deletions
|
@ -64,6 +64,8 @@ func geoPolygon(ctx context.Context, args ...interface{}) (interface{}, error) {
|
||||||
for _, a := range args {
|
for _, a := range args {
|
||||||
if p, _ := ensurePoint(a); p != nil {
|
if p, _ := ensurePoint(a); p != nil {
|
||||||
pnts = append(pnts, p)
|
pnts = append(pnts, p)
|
||||||
|
} else if p := ensureFloats(a); len(p) == 2 {
|
||||||
|
pnts = append(pnts, sql.NewPoint(p[0], p[1]))
|
||||||
} else {
|
} else {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue