You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-42Lines changed: 39 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
# PolylineAlgorithm for .NET
2
2
3
-
Lightweight .NET Standard 2.1 library implementing Google-compliant Encoded Polyline Algorithm with strong input validation, modern API patterns, and extensibility for custom coordinate types.
Google's Encoded Polyline Algorithm compresses sequences of geographic coordinates into a compact ASCII string, widely used in mapping APIs. This library provides a fully compliant .NET implementation with extensible, type-safe encoding and decoding APIs.
The library provides abstract base classes to implement your own encoder and decoder for any coordinate and polyline type.
51
+
The library provides abstract base classes to implement your own encoder and decoder for any coordinate and polyline type. Inherit from `AbstractPolylineEncoder` or `AbstractPolylineDecoder`, override the coordinate accessors, then call `Encode` or `Decode`.
52
+
53
+
### Quick Start
54
+
55
+
```csharp
56
+
// 1. Implement a minimal encoder (see full example below)
57
+
varencoder=newMyPolylineEncoder();
58
+
stringencoded=encoder.Encode(coordinates); // e.g. "yseiHoc_MwacOjnwM"
59
+
60
+
// 2. Implement a minimal decoder (see full example below)
@@ -136,8 +128,13 @@ Full API docs and guides (auto-generated from source) are available at [API Refe
136
128
137
129
## Benchmarks
138
130
139
-
- See `/benchmarks` in the repo for performance evaluation.
140
-
- Contributors: Update benchmarks and document results for performance-impacting PRs.
131
+
- See [`/benchmarks`](./benchmarks) in the repo for benchmark projects.
132
+
- Run benchmarks with:
133
+
```shell
134
+
dotnet run --project benchmarks/PolylineAlgorithm.Benchmarks --configuration Release
135
+
```
136
+
- For guidance on writing and interpreting benchmarks, see [docs/benchmarks.md](./docs/benchmarks.md).
137
+
- Contributors: update benchmarks and document results for performance-impacting PRs.
141
138
142
139
## FAQ
143
140
@@ -173,13 +170,13 @@ A: Currently, only batch encode/decode is supported. For streaming scenarios, im
173
170
174
171
## Contributing
175
172
176
-
- Follow code style and PR instructions in [AGENTS.md](./AGENTS.md).
173
+
- Follow code style and PR instructions in [CONTRIBUTING.md](./CONTRIBUTING.md).
177
174
- Ensure all features are covered by tests and XML doc comments.
178
175
- For questions or suggestions, open an issue and use the provided templates.
179
176
180
177
## Support
181
178
182
-
Have a question, bug, or feature request? [Open an issue!](https://github.com/petesramek/polyline-algorithm-csharp/issues)
179
+
Have a question, bug, or feature request? [Open an issue](https://github.com/petesramek/polyline-algorithm-csharp/issues/new/choose) — bug report and feature request templates are available to guide you.
0 commit comments