Skip to content

Commit 6d6a1b8

Browse files
committed
Fix typos
1 parent 1568d95 commit 6d6a1b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+68
-68
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This tag is broken, please use v0.7.1 instead.
7373

7474
### Breaking Changes
7575

76-
- tilecover now returns an error (vs. panicing) on non-closed 2d geometry by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/87
76+
- tilecover now returns an error (vs. panicking) on non-closed 2d geometry by [@paulmach](https://github.com/paulmach) in https://github.com/paulmach/orb/pull/87
7777

7878
This changes the signature of many of the methods in the [maptile/tilecover](https://github.com/paulmach/orb/tree/master/maptile/tilecover) package.
7979
To emulate the old behavior replace:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ They each provide their own README with extra info.
1010
- **GeoJSON** - support as part of the [`geojson`](geojson) sub-package.
1111
- **Mapbox Vector Tile** - encoding and decoding as part of the [`encoding/mvt`](encoding/mvt) sub-package.
1212
- **Direct to type from DB query results** - by scanning WKB data directly into types.
13-
- **Rich set of sub-packages** - including [`clipping`](clip), [`simplifing`](simplify), [`quadtree`](quadtree) and more.
13+
- **Rich set of sub-packages** - including [`clipping`](clip), [`simplifying`](simplify), [`quadtree`](quadtree) and more.
1414

1515
## Type definitions
1616

@@ -142,7 +142,7 @@ layers.RemoveEmpty(1.0, 2.0)
142142
// encoding using the Mapbox Vector Tile protobuf encoding.
143143
data, err := mvt.Marshal(layers) // this data is NOT gzipped.
144144
145-
// Sometimes MVT data is stored and transfered gzip compressed. In that case:
145+
// Sometimes MVT data is stored and transferred gzip compressed. In that case:
146146
data, err := mvt.MarshalGzipped(layers)
147147
```
148148

bound.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ func (b Bound) IsEmpty() bool {
156156
return b.Min[0] > b.Max[0] || b.Min[1] > b.Max[1]
157157
}
158158

159-
// IsZero return true if the bound just includes just null island.
159+
// IsZero return true if the bound includes just null island.
160160
func (b Bound) IsZero() bool {
161161
return b.Max == Point{} && b.Min == Point{}
162162
}
163163

164-
// Bound returns the the same bound.
164+
// Bound returns the same bound.
165165
func (b Bound) Bound() Bound {
166166
return b
167167
}

clip/clip_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestInternalLine(t *testing.T) {
2929
},
3030
},
3131
{
32-
name: "clips line crossign many times",
32+
name: "clips line crossing many times",
3333
bound: orb.Bound{Min: orb.Point{0, 0}, Max: orb.Point{20, 20}},
3434
input: orb.LineString{
3535
{10, -10}, {10, 30}, {20, 30}, {20, -10},
@@ -175,7 +175,7 @@ func TestLineString(t *testing.T) {
175175
output orb.MultiLineString
176176
}{
177177
{
178-
name: "clips line crossign many times",
178+
name: "clips line crossing many times",
179179
bound: orb.Bound{Min: orb.Point{0, 0}, Max: orb.Point{20, 20}},
180180
input: orb.LineString{
181181
{10, -10}, {10, 30}, {20, 30}, {20, -10},
@@ -233,7 +233,7 @@ func TestLineString_OpenBound(t *testing.T) {
233233
output orb.MultiLineString
234234
}{
235235
{
236-
name: "clips line crossign many times",
236+
name: "clips line crossing many times",
237237
bound: orb.Bound{Min: orb.Point{0, 0}, Max: orb.Point{20, 20}},
238238
input: orb.LineString{
239239
{10, -10}, {10, 30}, {20, 30}, {20, -10},

clip/smartclip/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This package extends the clip functionality to handle partial 2d geometries. The
44
rings need to only intersect the bound. The algorithm will use that, plus the orientation, to
55
wrap/close the rings around the edge of the bound.
66

7-
The use case is [OSM multipolyon relations](https://wiki.openstreetmap.org/wiki/Relation#Multipolygon)
7+
The use case is [OSM multipolygon relations](https://wiki.openstreetmap.org/wiki/Relation#Multipolygon)
88
where a ring (inner or outer) contains multiple ways but only one is in the current viewport.
99
With only the ways intersecting the viewport and their orientation the correct shape can be drawn.
1010

@@ -17,7 +17,7 @@ bound := orb.Bound{Min: orb.Point{1, 1}, Max: orb.Point{10, 10}}
1717
ring := orb.Ring{{0, 0}, {11, 11}}
1818
clipped := smartclip.Ring(bound, ring, orb.CCW)
1919

20-
// clipped is a multipolyon with one ring that wraps counter-clockwise
20+
// clipped is a multipolygon with one ring that wraps counter-clockwise
2121
// around the top triangle of the box
2222
// [[[[1 1] [10 10] [5.5 10] [1 10] [1 5.5] [1 1]]]]
2323
```

clip/smartclip/smart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func smartWrap(box orb.Bound, input []orb.LineString, o orb.Orientation) orb.Mul
287287

288288
// this operation is O(n^2). Technically we could use a linked list
289289
// and remove points instead of marking them as "used".
290-
// However since n is 2x the number of segements I think we're okay.
290+
// However since n is 2x the number of segments I think we're okay.
291291
for i := 0; i < 2*len(points); i++ {
292292
ep := points[i%len(points)]
293293
if ep.Used {

clip/smartclip/smart_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func TestRing(t *testing.T) {
137137
t.Logf("%v", expected)
138138
}
139139

140-
// should give same result if mulipolygon
140+
// should give same result if multipolygon
141141
result = MultiPolygon(bound, orb.MultiPolygon{{input}}, o)
142142
if !deepEqualMultiPolygon(result, expected) {
143143
t.Errorf("incorrect multipolygon")
@@ -159,7 +159,7 @@ func TestPolygon(t *testing.T) {
159159
expected orb.MultiPolygon
160160
}{
161161
{
162-
name: "with innner ring",
162+
name: "with inner ring",
163163
bound: oneSix,
164164
input: orb.Polygon{
165165
{{0, 2}, {5, 2}, {5, 5}, {0, 5}, {0, 2}},
@@ -171,7 +171,7 @@ func TestPolygon(t *testing.T) {
171171
}},
172172
},
173173
{
174-
name: "with innner ring that will share a side with the outer ring",
174+
name: "with inner ring that will share a side with the outer ring",
175175
bound: oneSix,
176176
input: orb.Polygon{
177177
{{0, 2}, {3, 2}, {3, 5}, {0, 5}},
@@ -321,7 +321,7 @@ func TestPolygon(t *testing.T) {
321321
t.Logf("%v", expected)
322322
}
323323

324-
// should give same result if inputed as multi polygon
324+
// should give same result if inputted as multi polygon
325325
result = MultiPolygon(bound, orb.MultiPolygon{input}, o)
326326
if !deepEqualMultiPolygon(result, expected) {
327327
t.Errorf("incorrect multipolygon")
@@ -378,7 +378,7 @@ func TestClipMultiPolygon(t *testing.T) {
378378
},
379379
},
380380
{
381-
name: "polygon with innner ring and single ring polygon",
381+
name: "polygon with inner ring and single ring polygon",
382382
bound: orb.Bound{Min: orb.Point{1, 1}, Max: orb.Point{9, 9}},
383383
input: orb.MultiPolygon{
384384
{

encoding/ewkb/ewkb_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func compare(t testing.TB, e orb.Geometry, s int, b []byte) {
8383
t.Errorf("decoder: incorrect srid: %v != %v", srid, s)
8484
}
8585

86-
// Umarshal
86+
// Unmarshal
8787
g, srid, err = Unmarshal(b)
8888
if err != nil {
8989
t.Fatalf("unmarshal: read error: %v", err)
@@ -111,7 +111,7 @@ func compare(t testing.TB, e orb.Geometry, s int, b []byte) {
111111
if !bytes.Equal(data, b) {
112112
t.Logf("%v", data)
113113
t.Logf("%v", b)
114-
t.Errorf("marshal: incorrent encoding")
114+
t.Errorf("marshal: incorrect encoding")
115115
}
116116

117117
// Encode
@@ -132,7 +132,7 @@ func compare(t testing.TB, e orb.Geometry, s int, b []byte) {
132132
if !bytes.Equal(data, buf.Bytes()) {
133133
t.Logf("%v", data)
134134
t.Logf("%v", b)
135-
t.Errorf("encode: incorrent encoding")
135+
t.Errorf("encode: incorrect encoding")
136136
}
137137

138138
// pass in srid
@@ -146,7 +146,7 @@ func compare(t testing.TB, e orb.Geometry, s int, b []byte) {
146146
if !bytes.Equal(data, buf.Bytes()) {
147147
t.Logf("%v", data)
148148
t.Logf("%v", b)
149-
t.Errorf("encode with srid: incorrent encoding")
149+
t.Errorf("encode with srid: incorrect encoding")
150150
}
151151

152152
// preallocation

encoding/ewkb/scanner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ func TestScanBound_errors(t *testing.T) {
11841184
}
11851185

11861186
func TestValue(t *testing.T) {
1187-
t.Run("marshalls geometry", func(t *testing.T) {
1187+
t.Run("marshals geometry", func(t *testing.T) {
11881188
testPoint := orb.Point{1, 2}
11891189
testPointData := MustMarshal(testPoint, 4326)
11901190
val, err := Value(testPoint, 4326).Value()

encoding/internal/wkbcommon/wkb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const (
3030

3131
const (
3232
// limits so that bad data can't come in and preallocate tons of memory.
33-
// Well formed data with less elements will allocate the correct amount just fine.
33+
// Well formed data with fewer elements will allocate the correct amount just fine.
3434
MaxPointsAlloc = 10000
3535
MaxMultiAlloc = 100
3636
)

0 commit comments

Comments
 (0)