Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump geo from 3.6.0 to 4.0.0 #217

Closed
wants to merge 1 commit into from
Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 18, 2024

Bumps geo from 3.6.0 to 4.0.0.

Release notes

Sourced from geo's releases.

v4.0.0

Potentially breaking change: Default decoded GeoJSON to SRID 4326 (WGS 84)

This aligns our GeoJSON decoding with the GeoJSON spec by making all decoded GeoJSON infer the WGS 84 datum (SRID 4326) by default. Whereas previously when you called Geo.JSON.decode/1 or decode!/1, we would return geometries with an :srid of nil, we now return srid: 4326. Likewise when encoding GeoJSON, we explicitly output a crs field indicating the datum.

This is unlikely to break real-world usage unless your implementation was assuming a different datum by default.

A couple examples of the changes:

Before:

iex> Geo.JSON.decode!(%{"type" => "Point", "coordinates" => [1.0, 2.0]})
%Geo.Point{
  coordinates: {1.0, 2.0},
  # Note the old default nil SRID!
  srid: nil
}

After

iex> Geo.JSON.decode!(%{"type" => "Point", "coordinates" => [1.0, 2.0]})
%Geo.Point{
  coordinates: {1.0, 2.0},
  # New explicit default of WGS 84
  srid: 4326
}

If you were to then encode this value again, you'd end up with a new crs field in the output GeoJSON:

iex> %{"type" => "Point", "coordinates" => [1.0, 2.0]}
...> |> Geo.JSON.decode!()
...> |> GeoJSON.encode!()
%{
  "type" => "Point",
  "coordinates" => [1.0, 2.0],
  # Note the new `crs` field which was not present in the input to Geo.JSON.decode!/1
  "crs" => %{"properties" => %{"name" => "EPSG:4326"}, "type" => "name"}
}

This last behavior is the most potentially troublesome. However, we don't have a good way of distinguishing a case where you explicitly had the crs set in the input to the decoding function (in which case you would probably also like to have it present in the re-encoded version) compared to one in which it's been inferred.

Thanks to @​gworkman for reporting this issue (#129).

Potentially breaking change: Convert string coordinates to floats, or raise an error

... (truncated)

Changelog

Sourced from geo's changelog.

v4.0.0 — 2024-09-17

Potentially breaking change: Default decoded GeoJSON to SRID 4326 (WGS 84)

This aligns our GeoJSON decoding with the GeoJSON spec by making all decoded GeoJSON infer the WGS 84 datum (SRID 4326) by default. Whereas previously when you called Geo.JSON.decode/1 or decode!/1, we would return geometries with an :srid of nil, we now return srid: 4326. Likewise when encoding GeoJSON, we explicitly output a crs field indicating the datum.

This is unlikely to break real-world usage unless your implementation was assuming a different datum by default.

A couple examples of the changes:

Before:

iex> Geo.JSON.decode!(%{"type" => "Point", "coordinates" => [1.0, 2.0]})
%Geo.Point{
  coordinates: {1.0, 2.0},
  # Note the old default nil SRID!
  srid: nil
}

After

iex> Geo.JSON.decode!(%{"type" => "Point", "coordinates" => [1.0, 2.0]})
%Geo.Point{
  coordinates: {1.0, 2.0},
  # New explicit default of WGS 84
  srid: 4326
}

If you were to then encode this value again, you'd end up with a new crs field in the output GeoJSON:

iex> %{"type" => "Point", "coordinates" => [1.0, 2.0]}
...> |> Geo.JSON.decode!()
...> |> GeoJSON.encode!()
%{
  "type" => "Point",
  "coordinates" => [1.0, 2.0],
  # Note the new `crs` field which was not present in the input to Geo.JSON.decode!/1
  "crs" => %{"properties" => %{"name" => "EPSG:4326"}, "type" => "name"}
}

This last behavior is the most potentially troublesome. However, we don't have a good way of distinguishing a case where you explicitly had the crs set in the input to the decoding function (in which case you would probably also like to have it present in the re-encoded version) compared to one in which it's been inferred.

Thanks to @​gworkman for reporting this issue (#129).

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [geo](https://github.com/felt/geo) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/felt/geo/releases)
- [Changelog](https://github.com/felt/geo/blob/master/CHANGELOG.md)
- [Commits](felt/geo@v3.6.0...v4.0.0)

---
updated-dependencies:
- dependency-name: geo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Sep 18, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 18, 2024

Looks like geo is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Sep 18, 2024
@dependabot dependabot bot deleted the dependabot/hex/geo-4.0.0 branch September 18, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Development

Successfully merging this pull request may close these issues.

1 participant