Skip to content

Commit

Permalink
Pin dep
Browse files Browse the repository at this point in the history
  • Loading branch information
armandfardeau committed Jan 13, 2023
1 parent 52d490d commit 812a8f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
restore-keys: |
npm-
- run: |
sudo apt-get update && sudo apt-get install libproj-dev proj-bin -y
sudo apt-get update && sudo apt-get install libproj-dev proj-bin=7.2.1-1 -y
sudo apt-cache policy proj-bin
bundle config set build.rgeo-proj4 --with-proj-dir="/usr/bin/"
bundle pristine rgeo-proj4
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ bundle exec rake decidim_homepage_interactive_map:webpacker:install

* On OSX:
```bash
brew install proj
bundle config set build.rgeo-proj4 --with-proj-dir="/opt/homebrew"
bundle config set build.rgeo --with-proj-dir="/opt/homebrew"
brew install proj@7
bundle config set build.rgeo-proj4 --with-proj-dir="/opt/homebrew/opt/proj@7"
bundle pristine rgeo-proj4
bundle install
```

* On Ubuntu:
```bash
sudo apt-get install libproj-dev proj-bin
sudo apt-get install libproj-dev proj-bin=7.2.1
bundle config set build.rgeo-proj4 --with-proj-dir="/usr/bin/"
bundle config set build.rgeo --with-proj-dir="/usr/bin/"
bundle pristine rgeo-proj4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
end

it "transforms the coordinates" do
expect(subject.transform(coordinates, "EPSG:3943", "EPSG:4326")).to eq([1.4372663283532223, 43.61605815886825])
expect(subject.transform(coordinates, "EPSG:3943", "EPSG:4326")).to eq([1.4372663283532217, 43.61605815886816])
end

context "when coordinates are nested" do
Expand All @@ -139,22 +139,10 @@
[1_573_864.4303, 2_269_611.967399989],
[1_573_866.1109999998, 2_269_612.390899989],
[1_573_937.0363999999, 2_269_622.778199987],
[1_573_969.0081999998, 2_269_625.055299987]
]
]
]
[1_573_969.0081999998, 2_269_625.055299987]]]]
end
let(:expected_coordinates) do
[
[
[
[1.4372663283532223, 43.61605815886825],
[1.4372870486871636, 43.61606225141765],
[1.4381631712894696, 43.616167599899605],
[1.4385586652364657, 43.61619344103805]
]
]
]
[[[[1.4372663283532217, 43.61605815886816], [1.4372870486871632, 43.616062251417574], [1.4381631712894694, 43.61616759989949], [1.4385586652364657, 43.61619344103795]]]]
end

it "transforms the coordinates" do
Expand Down Expand Up @@ -250,16 +238,7 @@
},
geometry: {
type: "MultiPolygon",
coordinates: [
[
[
[1.4372663283532223, 43.61605815886825],
[1.4372870486871636, 43.61606225141765],
[1.4381631712894696, 43.616167599899605],
[1.4385586652364657, 43.61619344103805]
]
]
],
coordinates: [[[[1.4372663283532217, 43.61605815886816], [1.4372870486871632, 43.616062251417574], [1.4381631712894694, 43.61616759989949], [1.4385586652364657, 43.61619344103795]]]],
crs: "EPSG:4326"
},
centroid: {
Expand Down

0 comments on commit 812a8f3

Please sign in to comment.