Skip to content

Commit ddd0f56

Browse files
committed
update badge links
1 parent 6908e0c commit ddd0f56

File tree

13 files changed

+56
-32
lines changed

13 files changed

+56
-32
lines changed

Diff for: clip/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# orb/clip [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/clip?status.svg)](https://godoc.org/github.com/paulmach/orb/clip)
1+
# orb/clip [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/clip)
22

33
Package orb/clip provides functions for clipping lines and polygons to a bounding box.
44

@@ -23,6 +23,6 @@ clipped = clip.Geometry(bound, ls)
2323
clipped = clip.LineString(bound, ls)
2424
```
2525

26-
### Acknowledgements
26+
## Acknowledgements
2727

2828
This library is based on [mapbox/lineclip](https://github.com/mapbox/lineclip).

Diff for: encoding/mvt/README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# encoding/mvt [![Godoc Reference](https://godoc.org/github.com/paulmach/orb?status.svg)](https://godoc.org/github.com/paulmach/orb/encoding/mvt)
1+
# encoding/mvt [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/encoding/mvt)
22

33
Package mvt provides functions for encoding and decoding
44
[Mapbox Vector Tiles](https://www.mapbox.com/vector-tiles/specification/).
@@ -27,7 +27,17 @@ func (l Layer) ProjectToTile(tile maptile.Tile)
2727
func (l Layer) ProjectToWGS84(tile maptile.Tile)
2828
```
2929

30-
### Encoding example
30+
## Version 1 vs. Version 2
31+
32+
There is no data format difference between v1 and v2. The difference is v2 requires geometries
33+
be simple/clean. e.g. lines that are not self intersecting and polygons that are encoded in the correct winding order.
34+
35+
This library does not do anything to validate the geometry, it just encodes what you give it, so it defaults to v1.
36+
I've seen comments from Mapbox about this and they only want you to claim your library is a v2 encoder if it does cleanup/validation.
37+
38+
However, if you know your geometry is simple/clean you can change the [layer version](https://pkg.go.dev/github.com/paulmach/orb/encoding/mvt#Layer) manually.
39+
40+
## Encoding example
3141

3242
```go
3343
// Start with a set of feature collections defining each layer in lon/lat (WGS84).
@@ -56,7 +66,7 @@ data, err := layers.Marshal() // this data is NOT gzipped.
5666
data, err := layers.MarshalGzipped()
5767
```
5868

59-
### Feature IDs
69+
## Feature IDs
6070

6171
Since GeoJSON ids can be any number or string they won't necessarily map to vector tile uint64 ids.
6272
This is a common incompatibility between the two types.

Diff for: encoding/wkb/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# encoding/wkb [![Godoc Reference](https://godoc.org/github.com/paulmach/orb?status.svg)](https://godoc.org/github.com/paulmach/orb/encoding/wkb)
1+
# encoding/wkb [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/encoding/wkb)
22

33
This package provides encoding and decoding of [WKB](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary)
44
data. The interface is defined as:
@@ -17,7 +17,7 @@ func NewDecoder(r io.Reader) *Decoder
1717
func (d *Decoder) Decode() (orb.Geometry, error)
1818
```
1919

20-
### Reading and Writing to a SQL database
20+
## Reading and Writing to a SQL database
2121

2222
This package provides wrappers for `orb.Geometry` types that implement
2323
`sql.Scanner` and `driver.Value`. For example:

Diff for: encoding/wkt/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# encoding/wkt [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/encoding/wkt)
2+
3+
This package provides encoding and decoding of [WKT](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry)
4+
data. The interface is defined as:
5+
6+
```go
7+
func MarshalString(g orb.Geometry) string
8+
9+
func UnmarshalCollection(s string) (p orb.Collection, err error)
10+
func UnmarshalLineString(s string) (p orb.LineString, err error)
11+
func UnmarshalMultiLineString(s string) (p orb.MultiLineString, err error)
12+
func UnmarshalMultiPoint(s string) (p orb.MultiPoint, err error)
13+
func UnmarshalMultiPolygon(s string) (p orb.MultiPolygon, err error)
14+
func UnmarshalPoint(s string) (p orb.Point, err error)
15+
func UnmarshalPolygon(s string) (p orb.Polygon, err error)
16+
```

Diff for: geo/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# orb/geo [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/geo?status.svg)](https://godoc.org/github.com/paulmach/orb/geo)
1+
# orb/geo [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/geo)
22

33
The geometries defined in the `orb` package are generic 2d geometries.
44
Depending on what projection they're in, e.g. lon/lat or flat on the plane,
55
area and distance calculations are different. This package implements methods
66
that assume the lon/lat or WGS84 projection.
77

8-
### Examples
8+
## Examples
99

1010
Area of the [San Francisco Main Library](https://www.openstreetmap.org/way/24446086):
1111

Diff for: geojson/README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
# orb/geojson [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/geojson?status.svg)](https://godoc.org/github.com/paulmach/orb/geojson)
1+
# orb/geojson [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/geojson)
22

33
This package **encodes and decodes** [GeoJSON](http://geojson.org/) into Go structs
44
using the geometries in the [orb](https://github.com/paulmach/orb) package.
55
Supports both the [json.Marshaler](http://golang.org/pkg/encoding/json/#Marshaler) and
66
[json.Unmarshaler](http://golang.org/pkg/encoding/json/#Unmarshaler) interfaces.
77
The package also provides helper functions such as `UnmarshalFeatureCollection` and `UnmarshalFeature`.
88

9-
## Examples
10-
11-
#### Unmarshalling (JSON -> Go)
9+
## Unmarshalling (JSON -> Go)
1210

1311
```go
1412
rawJSON := []byte(`
@@ -32,7 +30,7 @@ err := json.Unmarshal(rawJSON, &fc)
3230
point := fc.Features[0].Geometry.(orb.Point)
3331
```
3432

35-
#### Marshalling (Go -> JSON)
33+
## Marshalling (Go -> JSON)
3634

3735
```go
3836
fc := geojson.NewFeatureCollection()
@@ -44,7 +42,7 @@ rawJSON, _ := fc.MarshalJSON()
4442
blob, _ := json.Marshal(fc)
4543
```
4644

47-
#### Foreign/extra members in a feature collection
45+
## Foreign/extra members in a feature collection
4846

4947
```go
5048
rawJSON := []byte(`

Diff for: maptile/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# orb/tile [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/maptile?status.svg)](https://godoc.org/github.com/paulmach/orb/maptile)
1+
# orb/maptile [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/maptile)
22

3-
Package orb/maptile provides types and methods for working with
3+
Package `maptile` provides types and methods for working with
44
[web mercator map tiles](https://www.google.com/search?q=web+mercator+map+tiles).
55
It defines a tile as:
66

@@ -17,11 +17,11 @@ Functions are provided to create tiles from lon/lat points as well as
1717
[quadkeys](https://msdn.microsoft.com/en-us/library/bb259689.aspx).
1818
The tile defines helper methods such as `Parent()`, `Children()`, `Siblings()`, etc.
1919

20-
### tilecover sub-package
20+
## List of sub-package utilities
2121

22-
Still a work in progress but the goal is to provide geo.Geometry -> covering tiles.
22+
- [`tilecover`](tilecover) - computes the covering set of tiles for an `orb.Geometry`.
2323

24-
#### Similar libraries in other languages:
24+
## Similar libraries in other languages:
2525

2626
- [mercantile](https://github.com/mapbox/mercantile) - Python
2727
- [sphericalmercator](https://github.com/mapbox/sphericalmercator) - Node

Diff for: maptile/tilecover/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# orb/maptile/tilecover [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/maptile/tilecover?status.svg)](https://godoc.org/github.com/paulmach/orb/maptile/tilecover)
1+
# orb/maptile/tilecover [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/maptile/tilecover)
22

33
Package `tilecover` computes the covering set of tiles for an `orb.Geometry`.
44
It is a a port of the nodejs library [tile-cover](https://github.com/mapbox/tile-cover)
55
which is a port from Google's S2 library. The same set of tests pass.
66

7-
### Usage
7+
## Usage
88

99
```go
1010
poly := orb.Polygon{}
@@ -18,6 +18,6 @@ for t := range tiles {
1818
tiles = tilecover.MergeUp(tiles, 0)
1919
```
2020

21-
#### Similar libraries in other languages:
21+
## Similar libraries in other languages:
2222

2323
- [tilecover](https://github.com/mapbox/tile-cover) - Node

Diff for: planar/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# orb/planar [![Godoc Reference](https://godoc.org/github.com/paulmach/planar/geo?status.svg)](https://godoc.org/github.com/paulmach/orb/planar)
1+
# orb/planar [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/planar)
22

33
The geometries defined in the `orb` package are generic 2d geometries.
44
Depending on what projection they're in, e.g. lon/lat or flat on the plane,
55
area and distance calculations are different. This package implements methods
66
that assume the planar or Euclidean context.
77

8-
### Examples
8+
## Examples
99

1010
Area of 3-4-5 triangle:
1111

Diff for: project/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# orb/project [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/project?status.svg)](https://godoc.org/github.com/paulmach/orb/project)
1+
# orb/project [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/project)
22

3-
Package orb/project has helper function for projection geometries.
3+
Package `project` has helper function for projecting geometries.
44

55
### Examples
66

Diff for: quadtree/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# orb/quadtree [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/quadtree?status.svg)](https://godoc.org/github.com/paulmach/orb/quadtree)
1+
# orb/quadtree [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/quadtree)
22

3-
Package quadtree implements a quadtree using rectangular partitions.
3+
Package `quadtree` implements a quadtree using rectangular partitions.
44
Each point exists in a unique node. This implementation is based off of the
55
[d3 implementation](https://github.com/mbostock/d3/wiki/Quadtree-Geom).
66

Diff for: resample/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# orb/resample [![Godoc Reference](https://godoc.org/github.com/paulmach/orb/resample?status.svg)](https://godoc.org/github.com/paulmach/orb/resample)
1+
# orb/resample [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/resample)
22

3-
Package orb/resample has a couple functions for resampling line geometry
3+
Package `resample` has a couple functions for resampling line geometry
44
into more or less evenly spaces points.
55

66
```go

Diff for: simplify/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# orb/simplify [![Godoc Reference](https://godoc.org/github.com/paulmach/orb?status.svg)](https://godoc.org/github.com/paulmach/orb/simplify)
1+
# orb/simplify [![Godoc Reference](https://pkg.go.dev/badge/github.com/paulmach/orb)](https://pkg.go.dev/github.com/paulmach/orb/simplify)
22

33
This package implements several reducing/simplifing function for `orb.Geometry` types.
44

0 commit comments

Comments
 (0)