• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

go-spatial / tegola / 607999c17

26 Mar 2025 11:55PM UTC coverage: 40.462%. Remained the same
607999c17

Pull #1041

github

web-flow
build(deps): bump github.com/redis/go-redis/v9 from 9.7.0 to 9.7.3

Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.7.0 to 9.7.3.
- [Release notes](https://github.com/redis/go-redis/releases)
- [Changelog](https://github.com/redis/go-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/go-redis/compare/v9.7.0...v9.7.3)

---
updated-dependencies:
- dependency-name: github.com/redis/go-redis/v9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #1041: build(deps): bump github.com/redis/go-redis/v9 from 9.7.0 to 9.7.3

6656 of 16450 relevant lines covered (40.46%)

219.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/basic/clone.go
1
package basic
2

3
import "github.com/go-spatial/tegola"
4

5
// ClonePoint will return a basic.Point for given tegola.Point.
6
func ClonePoint(pt tegola.Point) Point {
×
7
        return Point{pt.X(), pt.Y()}
×
8
}
×
9

10
// ClonePoint will return a basic.Point3 for given tegola.Point3.
11
func ClonePoint3(pt tegola.Point3) Point3 {
×
12
        return Point3{pt.X(), pt.Y(), pt.Z()}
×
13
}
×
14

15
// CloneMultiPoint will return a basic.MultiPoint for the given tegol.MultiPoint
16
func CloneMultiPoint(mpt tegola.MultiPoint) MultiPoint {
×
17
        var bmpt MultiPoint
×
18
        for _, pt := range mpt.Points() {
×
19
                bmpt = append(bmpt, ClonePoint(pt))
×
20
        }
×
21
        return bmpt
×
22
}
23

24
/*
25
// CloneMultiPoint3 will return a basic.MultiPoint3 for the given tegol.MultiPoint3
26
func CloneMultiPoint3(mpt tegola.MultiPoint3) MultiPoint3 {
27
        var bmpt MultiPoint3
28
        for _, pt := range mpt.Points() {
29
                bmpt = append(bmpt, ClonePoint3(pt))
30
        }
31
        return bmpt
32
}
33
*/
34

35
// CloneLine will return a basic.Line for a given tegola.LineString
36
func CloneLine(line tegola.LineString) (l Line) {
×
37
        for _, pt := range line.Subpoints() {
×
38
                l = append(l, Point{pt.X(), pt.Y()})
×
39
        }
×
40
        return l
×
41
}
42

43
// CloneMultiLine will return a basic.MultiLine for a given togola.MultiLine
44
func CloneMultiLine(mline tegola.MultiLine) (ml MultiLine) {
×
45
        for _, ln := range mline.Lines() {
×
46
                ml = append(ml, CloneLine(ln))
×
47
        }
×
48
        return ml
×
49
}
50

51
// ClonePolygon will return a basic.Polygon for a given tegola.Polygon
52
func ClonePolygon(polygon tegola.Polygon) (ply Polygon) {
×
53
        for _, ln := range polygon.Sublines() {
×
54
                ply = append(ply, CloneLine(ln))
×
55
        }
×
56
        return ply
×
57
}
58

59
// CloneMultiPolygon will return a basic.MultiPolygon for a given tegola.MultiPolygon.
60
func CloneMultiPolygon(mpolygon tegola.MultiPolygon) (mply MultiPolygon) {
×
61
        for _, ply := range mpolygon.Polygons() {
×
62
                mply = append(mply, ClonePolygon(ply))
×
63
        }
×
64
        return mply
×
65
}
66

67
func Clone(geo tegola.Geometry) Geometry {
×
68
        switch g := geo.(type) {
×
69
        case tegola.Point:
×
70
                return ClonePoint(g)
×
71
        case tegola.MultiPoint:
×
72
                return CloneMultiPoint(g)
×
73
        case tegola.LineString:
×
74
                return CloneLine(g)
×
75
        case tegola.MultiLine:
×
76
                return CloneMultiLine(g)
×
77
        case tegola.Polygon:
×
78
                return ClonePolygon(g)
×
79
        case tegola.MultiPolygon:
×
80
                return CloneMultiPolygon(g)
×
81
        }
82
        return nil
×
83
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc