From b3330ff8b38d47b04ad7c109d908b47c91c2ce86 Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Fri, 10 Aug 2018 11:30:50 -0700 Subject: [PATCH 1/2] Update examples and docs for #93 --- CHANGELOG.md | 2 ++ README.md | 31 +++++++++++++++---------------- examples/distance.c | 6 +++--- examples/edge.c | 4 ++++ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13a916510..c6439dc6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The public API of this library consists of the functions declared in file [h3api.h](./src/h3lib/include/h3api.h). ## [Unreleased] +### Changed +- Longitude outputs are now ine range [-Pi, Pi]. (#93) ## [3.1.0] - 2018-08-03 ### Added diff --git a/README.md b/README.md index 7ebd6f72a..0e673cad5 100644 --- a/README.md +++ b/README.md @@ -106,14 +106,13 @@ This will produce the vertices of the hexagon at this location: ``` 8a2a1072b59ffff { - 40.690058601 285.955848238 - 40.689907695 285.954938208 - 40.689270936 285.954658582 - 40.688785091 285.955288969 - 40.688935993 285.956198979 - 40.689572744 285.956478623 -} -``` + 40.690058601 -74.044151762 + 40.689907695 -74.045061792 + 40.689270936 -74.045341418 + 40.688785091 -74.044711031 + 40.688935993 -74.043801021 + 40.689572744 -74.043521377 +}``` You can get the center coordinate of the hexagon like so: @@ -125,7 +124,7 @@ You can get the center coordinate of the hexagon like so: This will produce some coordinate: ``` -40.6894218437 285.9555686001 +40.6894218437 -74.0444313999 ``` ### From C @@ -141,13 +140,13 @@ You should get output like: ``` The index is: 8a2a1072b59ffff -Boundary vertex #0: 40.690059, 285.955848 -Boundary vertex #1: 40.689908, 285.954938 -Boundary vertex #2: 40.689271, 285.954659 -Boundary vertex #3: 40.688785, 285.955289 -Boundary vertex #4: 40.688936, 285.956199 -Boundary vertex #5: 40.689573, 285.956479 -Center coordinates: 40.689422, 285.955569 +Boundary vertex #0: 40.690059, -74.044152 +Boundary vertex #1: 40.689908, -74.045062 +Boundary vertex #2: 40.689271, -74.045341 +Boundary vertex #3: 40.688785, -74.044711 +Boundary vertex #4: 40.688936, -74.043801 +Boundary vertex #5: 40.689573, -74.043521 +Center coordinates: 40.689422, -74.044431 ``` ## Contributing diff --git a/examples/distance.c b/examples/distance.c index 0d504bcf6..9b3d656b5 100644 --- a/examples/distance.c +++ b/examples/distance.c @@ -65,8 +65,8 @@ int main(int argc, char *argv[]) { radsToDegs(geoHQ2.lon), h3Distance(h3HQ1, h3HQ2), haversineDistance(geoHQ1.lat, geoHQ1.lon, geoHQ2.lat, geoHQ2.lon)); // Output: - // origin: (37.775236, 237.580245) - // destination: (37.789991, 237.597879) + // origin: (37.775236, -122.419755) + // destination: (37.789991, -122.402121) // grid distance: 2340 - // distance in km: 2.256850km + // distance in km: 2.256853km } diff --git a/examples/edge.c b/examples/edge.c index 38da9731a..c5923aaaf 100644 --- a/examples/edge.c +++ b/examples/edge.c @@ -36,4 +36,8 @@ int main(int argc, char *argv[]) { radsToDegs(boundary.verts[v].lat), radsToDegs(boundary.verts[v].lon)); } + // Output: + // The edge is 16a2a1072b59ffff + // Edge vertex #0: 40.690059, -74.044152 + // Edge vertex #1: 40.689908, -74.045062 } From a3b46d107d5959f32036b6548bc92d66aa361dfc Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Wed, 15 Aug 2018 08:46:26 -0700 Subject: [PATCH 2/2] Fix typo in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6439dc6e..9312eb47f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ The public API of this library consists of the functions declared in file ## [Unreleased] ### Changed -- Longitude outputs are now ine range [-Pi, Pi]. (#93) +- Longitude outputs are now guaranteed to be in the range [-Pi, Pi]. (#93) ## [3.1.0] - 2018-08-03 ### Added