Skip to content

Commit b130393

Browse files
committed
[general] General Fixes for Spelling and Formatting.
1 parent 6711455 commit b130393

File tree

12 files changed

+42
-40
lines changed

12 files changed

+42
-40
lines changed

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Tegola is a vector tile server delivering [Mapbox Vector Tiles](https://github.c
1111
## Features
1212
- Native geometry processing (simplification, clipping, make valid, intersection, contains, scaling, translation)
1313
- [Mapbox Vector Tile v2 specification](https://github.com/mapbox/vector-tile-spec) compliant.
14-
- Embedded viewer with auto generated style for quick data visualization and inspection.
14+
- An embedded viewer with an automatically generated style for quick data visualization and inspection.
1515
- Support for [PostGIS](provider/postgis) and [GeoPackage](provider/gpkg) data providers. Extensible design to support additional data providers.
1616
- Support for several cache backends: [file](cache/file), [s3](cache/s3), [redis](cache/redis), [azure blob store](cache/azblob).
1717
- Cache seeding and invalidation via individual tiles (ZXY), lat / lon bounds and ZXY tile list.
@@ -45,7 +45,7 @@ Use "tegola [command] --help" for more information about a command.
4545

4646
## Running tegola as a vector tile server
4747
1. Download the appropriate binary of tegola for your platform via the [release page](https://github.com/go-spatial/tegola/releases).
48-
2. Setup your config file and run. Dy default tegola looks for a `config.toml` in the same directory as the binary. You can set a different location for the `config.toml` using a command flag:
48+
2. Set up your config file and run. By default, Tegola looks for a `config.toml` in the same directory as the binary. You can set a different location for the `config.toml` using a command flag:
4949

5050
```
5151
./tegola serve --config=/path/to/config.toml
@@ -57,7 +57,7 @@ Use "tegola [command] --help" for more information about a command.
5757
/
5858
```
5959

60-
The server root will display a built in viewer with an auto generated style. For example:
60+
The server root will display the built-in viewer with an automatically generated style. For example:
6161

6262
![tegola built in viewer](https://raw.githubusercontent.com/go-spatial/tegola/v0.4.0/docs/screenshots/built-in-viewer.png "tegola built in viewer")
6363

@@ -196,7 +196,7 @@ name = "zoning" # used in the URL to reference this
196196

197197
\* more on PostgreSQL SSL mode [here](https://www.postgresql.org/docs/9.2/static/libpq-ssl.html). The `postgis` config also supports "ssl_cert" and "ssl_key" options are required, corresponding semantically with "PGSSLKEY" and "PGSSLCERT". These options do not check for environment variables automatically. See the section [below](#environment-variables) on injecting environment variables into the config.
198198

199-
### Example config using Postres 12 / PostGIS 3.0 ST_AsMVT():
199+
### Example config using Postgres 12 / PostGIS 3.0 ST_AsMVT():
200200

201201
```toml
202202
# register a MVT data provider. MVT data providers have the prefix "mvt_" in their type
@@ -253,10 +253,10 @@ max_connections = "${POSTGIS_MAX_CONN}"
253253

254254
The following environment variables can be used for debugging:
255255

256-
`TEGOLA_SQL_DEBUG` specify the type of SQL debug information to output. Currently support two values:
256+
`TEGOLA_SQL_DEBUG` specify the type of SQL debug information to output. Currently, supporting two values:
257257

258-
- `LAYER_SQL`: print layer SQL as they are parsed from the config file.
259-
- `EXECUTE_SQL`: print SQL that is executed for each tile request and the number of items it returns or an error.
258+
- `LAYER_SQL` will print layer SQL as they are parsed from the config file.
259+
- `EXECUTE_SQL` will print SQL that is executed for each tile request, and the number of items it returns or an error.
260260

261261
#### Usage
262262

@@ -273,27 +273,27 @@ The following environment variables can be used to control various runtime optio
273273

274274
## Client side debugging
275275

276-
When debugging client side, it's often helpful to to see an outline of a tile along with it's Z/X/Y values. To encode a debug layer into every tile add the query string variable `debug=true` to the URL template being used to request tiles. For example:
276+
When debugging client side, it's often helpful to see an outline of a tile along with it's Z/X/Y values. To encode a debug layer into every tile add the query string variable `debug=true` to the URL template being used to request tiles. For example:
277277

278278
```
279279
http://localhost:8080/maps/mymap/{z}/{x}/{y}.vector.pbf?debug=true
280280
```
281281

282-
The requested tile will be encode a layer with the `name` value set to `debug` and include two features:
282+
The requested tile will be encoded with a layer that has the `name` value set to `debug` and includes the three following features.
283283

284-
- `debug_outline`: a line feature that traces the border of the tile
285-
- `debug_text`: a point feature in the middle of the tile with the following tags:
286-
- `zxy`: a string with the `Z`, `X` and `Y` values formatted as: `Z:0, X:0, Y:0`
284+
- `debug_outline` is a line feature that traces the border of the tile
285+
- `debug_text` is a point feature in the middle of the tile with the following tags:
286+
- `zxy` is a string with the `Z`, `X` and `Y` values formatted as: `Z:0, X:0, Y:0`
287287

288288
## Building from source
289289

290-
Tegola is written in [Go](https://golang.org/) and requires Go 1.16 to compile from source. To build tegola from source, make sure you have Go installed and have cloned the repository. Navigate to the repository then run the following command:
290+
Tegola is written in [Go](https://golang.org/) and requires Go 1.16 to compile from the source. (We support the two newest versions of Go.) To build tegola from the source, make sure you have Go installed and have cloned the repository. Navigate to the repository then run the following command:
291291

292292
```bash
293293
cd cmd/tegola/ && go build -mod vendor
294294
```
295295

296-
You will now have a binary named `tegola` in the current directory which is [ready for running](#running-tegola).
296+
You will now have a binary named `tegola` in the current directory which is [ready to run.](#running-tegola-as-a-vector-tile-server).
297297

298298
**Build Flags**
299299
The following build flags can be used to turn off certain features of tegola:
@@ -303,20 +303,20 @@ The following build flags can be used to turn off certain features of tegola:
303303
- `noRedisCache` - turn off the Redis cache back end.
304304
- `noPostgisProvider` - turn off the PostGIS data provider.
305305
- `noGpkgProvider` - turn off the GeoPackage data provider. Note, GeoPackage uses CGO and will be turned off if the environment variable `CGO_ENABLED=0` is set prior to building.
306-
- `noViewer` - turn off the built in viewer.
306+
- `noViewer` - turn off the built-in viewer.
307307
- `pprof` - enable [Go profiler](https://golang.org/pkg/net/http/pprof/). Start profile server by setting the environment `TEGOLA_HTTP_PPROF_BIND` environment (e.g. `TEGOLA_HTTP_PPROF_BIND=localhost:6060`).
308308
- `noPrometheusObserver` - turn off support for the Prometheus metric end point.
309309

310-
Example of using the build flags to turn of the Redis cache back end, the GeoPackage provider and the built in viewer.
310+
Example of using the build flags to turn of the Redis cache back end, the GeoPackage provider and the built-in viewer.
311311

312312
```bash
313313
go build -tags 'noRedisCache noGpkgProvider noViewer'
314314
```
315315

316316
## License
317317

318-
See [license](LICENSE.md) file in repo.
318+
See [license](LICENSE.md) file in the repo.
319319

320320
## Looking for a vector tile style editor?
321321

322-
Once you have tegola running you're likely going to want to work on your map's cartography. Give [fresco](https://github.com/go-spatial/fresco) a try!
322+
After Tegola is running you're likely going to want to work on your map's cartography. Give [fresco](https://github.com/go-spatial/fresco) a try!

atlas/atlas.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func init() {
5555
}
5656
}
5757

58-
// defaultAtlas is instanitated for convenience
58+
// defaultAtlas is instantiated for convenience
5959
var defaultAtlas = &Atlas{}
6060

6161
const (

cache/cache.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type Interface interface {
2121
}
2222

2323
// ParseKey will parse a string in the format /:map/:layer/:z/:x/:y into a Key struct. The :layer value is optional
24-
// ParseKey also supports other OS delimeters (i.e. Windows - "\")
24+
// ParseKey also supports other OS delimiters (i.e. Windows - "\")
2525
func ParseKey(str string) (*Key, error) {
2626
var err error
2727
var key Key
@@ -30,7 +30,7 @@ func ParseKey(str string) (*Key, error) {
3030
// will fail our keyParts check since it uses backslashes.
3131
str = filepath.ToSlash(str)
3232

33-
// remove the basepath and the first slash, then split the parts
33+
// remove the base-path and the first slash, then split the parts
3434
keyParts := strings.Split(strings.TrimLeft(str, "/"), "/")
3535
// we're expecting a z/x/y scheme
3636
if len(keyParts) < 3 || len(keyParts) > 5 {
@@ -57,7 +57,7 @@ func ParseKey(str string) (*Key, error) {
5757
zxy = keyParts
5858
}
5959

60-
// parse our URL vals to ints
60+
// parse our URL vals into integers
6161
var placeholder uint64
6262
placeholder, err = strconv.ParseUint(zxy[0], 10, 32)
6363
if err != nil || placeholder > tegola.MaxZ {
@@ -145,7 +145,7 @@ func Register(cacheType string, init InitFunc) error {
145145
return nil
146146
}
147147

148-
// Registered returns the caché's that have been registered.
148+
// Registered returns the cache's that have been registered.
149149
func Registered() (c []string) {
150150
for k := range cache {
151151
c = append(c, k)

cmd/tegola/cmd/cache/cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ TileChannelLoop:
169169
break
170170
}
171171

172-
{ // worker error occured.
172+
{ // worker error occurred.
173173
errLock.RLock()
174174
e := mapTileErr
175175
errLock.RUnlock()

cmd/tegola/cmd/cache/seed_purge.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var (
6060
var SeedPurgeCmd = &cobra.Command{
6161
Use: "seed",
6262
Aliases: []string{"purge"},
63-
Short: "seed or pruge tiles from the cache",
63+
Short: "seed or purge tiles from the cache",
6464
Long: "command to seed or purge tiles from the cache",
6565
Example: "tegola cache seed --bounds lng,lat,lng,lat",
6666
}
@@ -83,7 +83,7 @@ func init() {
8383
SeedPurgeCmd.AddCommand(TileNameCmd)
8484
}
8585

86-
// seedPurgeCmdValidate will validate the presistent flags and set associated variables as needed
86+
// seedPurgeCmdValidate will validate the persistent flags and set associated variables as needed
8787
func seedPurgeCmdValidatePersistent(cmd *cobra.Command, args []string) error {
8888

8989
if cmd.HasParent() {
@@ -185,9 +185,9 @@ func seedPurgeCommand(cmd *cobra.Command, args []string) (err error) {
185185
}()
186186

187187
log.Info("zoom list: ", zooms)
188-
tilechannel := generateTilesForBounds(ctx, seedPurgeBounds, zooms)
188+
tileChannel := generateTilesForBounds(ctx, seedPurgeBounds, zooms)
189189

190-
return doWork(ctx, tilechannel, seedPurgeMaps, cacheConcurrency, seedPurgeWorker)
190+
return doWork(ctx, tileChannel, seedPurgeMaps, cacheConcurrency, seedPurgeWorker)
191191
}
192192

193193
func generateTilesForBounds(ctx context.Context, bounds [4]float64, zooms []uint) *TileChannel {

cmd/tegola/cmd/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var serverCmd = &cobra.Command{
2929
gdcmd.OnComplete(provider.Cleanup)
3030

3131
// check config for server port setting
32-
// if you set the port via the comand line it will override the port setting in the config
32+
// if you set the port via the command line it will override the port setting in the config
3333
if serverPort == defaultHTTPPort && conf.Webserver.Port != "" {
3434
serverPort = string(conf.Webserver.Port)
3535
}

cmd/tegola_lambda/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func init() {
116116
}
117117

118118
func main() {
119-
// the second argument here tells algnhasa to watch for the MVT MimeType Content-Type headers
119+
// the second argument here tells algnhsa to watch for the MVT MimeType Content-Type headers
120120
// if it detects this in the response the payload will be base64 encoded. Lambda needs to be configured
121121
// to handle binary responses so it can convert the base64 encoded payload back into binary prior
122122
// to sending to the client

geometry.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Package tegola describes the basic geometeries that can be used to convert to
1+
// Package tegola describes the basic geometries that can be used to convert to
22
// and from.
33
package tegola
44

maths/maths.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Package math contins generic math functions that we need for doing transforms.
2+
Package math contains generic math functions that we need for doing transforms.
33
this package will augment the go math library.
44
*/
55
package maths
@@ -331,6 +331,8 @@ func Exp2(p uint64) uint64 {
331331

332332
// Minimum of uints
333333
func Min(x, y uint) uint {
334-
if x < y {return x}
334+
if x < y {
335+
return x
336+
}
335337
return y
336-
}
338+
}

provider/provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (tu TilerUnion) Layers() ([]LayerInfo, error) {
134134
// InitFunc initialize a provider given a config map. The init function should validate the config map, and report any errors. This is called by the For function.
135135
type InitFunc func(dicter dict.Dicter) (Tiler, error)
136136

137-
// CleanupFunc is called to when the system is shuting down, this allows the provider to cleanup.
137+
// CleanupFunc is called to when the system is shutting down, this allows the provider to cleanup.
138138
type CleanupFunc func()
139139

140140
type pfns struct {

server/middleware_tile_cache.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TileCacheHandler(a *atlas.Atlas, next http.Handler) http.Handler {
4949
// buffer which will hold a copy of the response for writing to the cache
5050
var buff bytes.Buffer
5151

52-
// ovewrite our current responseWriter with a tileCacheResponseWriter
52+
// overwrite our current responseWriter with a tileCacheResponseWriter
5353
w = newTileCacheResponseWriter(w, &buff)
5454

5555
next.ServeHTTP(w, r)
@@ -89,7 +89,7 @@ func newTileCacheResponseWriter(resp http.ResponseWriter, w io.Writer) http.Resp
8989
}
9090
}
9191

92-
// tileCacheResponsWriter wraps http.ResponseWriter (https://golang.org/pkg/net/http/#ResponseWriter)
92+
// tileCacheResponseWriter wraps http.ResponseWriter (https://golang.org/pkg/net/http/#ResponseWriter)
9393
// to additionally write the response to a cache when there is a cache MISS
9494
type tileCacheResponseWriter struct {
9595
// status response code

server/server.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func hostName(r *http.Request) string {
132132
return r.Host
133133
}
134134

135-
// various checks to determin if the request is http or https. the scheme is needed for the TileURLs
135+
// various checks to determine if the request is http or https. the scheme is needed for the TileURLs
136136
// r.URL.Scheme can be empty if a relative request is issued from the client. (i.e. GET /foo.html)
137137
func scheme(r *http.Request) string {
138138
if r.Header.Get("X-Forwarded-Proto") != "" {
@@ -174,13 +174,13 @@ func buildCapabilitiesURL(r *http.Request, uriParts []string, query url.Values)
174174
return fmt.Sprintf("%v%v%v", URLRoot(r), path.Join(URIPrefix, uri), q)
175175
}
176176

177-
// corsHanlder is used to respond to all OPTIONS requests for registered routes
177+
// corsHandler is used to respond to all OPTIONS requests for registered routes
178178
func corsHandler(w http.ResponseWriter, r *http.Request, params map[string]string) {
179179
setHeaders(w)
180180
return
181181
}
182182

183-
// setHeaders sets deafult headers and user defined headers
183+
// setHeaders sets default headers and user defined headers
184184
func setHeaders(w http.ResponseWriter) {
185185
// add our default CORS headers
186186
for name, val := range DefaultCORSHeaders {

0 commit comments

Comments
 (0)