Skip to content

Commit

Permalink
Revert module doc changes
Browse files Browse the repository at this point in the history
Fixes issues with the tests.
  • Loading branch information
evuez committed Oct 17, 2020
1 parent dc33954 commit 30ae443
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 1,5 @@
# Geohax

<!-- MDOC !-->

[![Hex.pm](https://img.shields.io/hexpm/v/geohax.svg)](https://hex.pm/packages/geohax)
[![Build Status](https://travis-ci.org/evuez/geohax.svg?branch=master)](https://travis-ci.org/evuez/geohax)
[![Inline docs](http://inch-ci.org/github/evuez/geohax.svg)](http://inch-ci.org/github/evuez/geohax)
Expand All @@ -11,14 9,9 @@ Geohash encoding and decoding for Elixir.

## Ordering of longitude and latitude

*Every* function in `Geohax` use the `longitude,latitude` ordering; make sure
not to invert these!
*Every* function in `Geohax` use the `longitude,latitude` ordering; make sure not to invert these!

Both [Redis](https://redis.io/commands/geoadd) and
[PostGIS](https://postgis.net/docs/ST_MakePoint.html) use this same ordering,
but if you feel strongly about that and would prefer to use
`latitude,longitude` instead, you can simply create a new module that does this
for you:
Both [Redis](https://redis.io/commands/geoadd) and [PostGIS](https://postgis.net/docs/ST_MakePoint.html) use this same ordering, but if you feel strongly about that and would prefer to use `latitude,longitude` instead, you can simply create a new module that does this for you:

```elixir
defmodule MyGeohash do
Expand Down Expand Up @@ -64,13 57,7 @@ iex> Geohax.neighbor("311x1r", :north)

```elixir
iex> Geohax.within({52.291725, 16.731831}, {52.508736, 17.071703})
["u37ck", "u37cm", "u37cq", "u37cr", "u3k12", "u3k13", "u3k16", "u3k17",
"u3k1k", "u37cs", "u37ct", "u37cw", "u37cx", "u3k18", "u3k19", "u3k1d",
"u3k1e", "u3k1s", "u37cu", "u37cv", "u37cy", "u37cz", "u3k1b", "u3k1c",
"u3k1f", "u3k1g", "u3k1u", "u37fh", "u37fj", "u37fn", "u37fp", "u3k40",
"u3k41", "u3k44", "u3k45", "u3k4h", "u37fk", "u37fm", "u37fq", "u37fr",
"u3k42", "u3k43", "u3k46", "u3k47", "u3k4k", "u37fs", "u37ft", "u37fw",
"u37fx", "u3k48", "u3k49", "u3k4d", "u3k4e", "u3k4s"]
["u37ck", "u37cm", "u37cq", "u37cr", "u3k12", "u3k13", "u3k16", "u3k17", "u3k1k", "u37cs", "u37ct", "u37cw", "u37cx", "u3k18", "u3k19", "u3k1d", "u3k1e", "u3k1s", "u37cu", "u37cv", "u37cy", "u37cz", "u3k1b", "u3k1c", "u3k1f", "u3k1g", "u3k1u", "u37fh", "u37fj", "u37fn", "u37fp", "u3k40", "u3k41", "u3k44", "u3k45", "u3k4h", "u37fk", "u37fm", "u37fq", "u37fr", "u3k42", "u3k43", "u3k46", "u3k47", "u3k4k", "u37fs", "u37ft", "u37fw", "u37fx", "u3k48", "u3k49", "u3k4d", "u3k4e", "u3k4s"]
```

## Installation
Expand Down
7 changes: 3 additions & 4 deletions lib/geohax.ex
Original file line number Diff line number Diff line change
@@ -1,8 1,7 @@
defmodule Geohax do
@moduledoc "README.md"
|> File.read!()
|> String.split("<!-- MDOC !-->")
|> Enum.fetch!(1)
@moduledoc """
Geohash encoding and decoding.
"""

use Bitwise

Expand Down

0 comments on commit 30ae443

Please sign in to comment.