CoordRefSystems.jl v0.16.3
Dozens of new datums added since v0.16, and the implementation of grid offset transforms in the accompanying CoordGridTransforms.jl package.
Dozens of new datums added since v0.16, and the implementation of grid offset transforms in the accompanying CoordGridTransforms.jl package.
If only you can tell us which datum has been added.
It is no fun living on Ship Australia (continental Australia) that travels 1.7 meters per year! That means the GPS data shifts by that much a year. A map that is 10 years old will be off by 17 meters!!!
You can check the source code. There are too many to list here:
Well, it moves fast, but not that fast. More on the order of 7 cm/year.
It depends on whether the Australians are all rowing in the same direction or not.
Here is where I went wrong.
I was hoping that this update would allow me to remove my dependency on Proj.jl, but apparently I still need it.
Published point data (easting and northing) in Northern Ireland are on the Irish National Grid (epsg=29903
) but the UK boundaries are all on the British National Grid (epsg=27700
).
Both OSGB36
and Ire65
are listed in the source code @juliohm linked to.
I’m trying to assign each postcode centroid to the boundary it falls within. I can do this easily enough if I transform the coordinates first using Proj.jl, but had hoped it would now work implicitly.
geo_pccodes = georef(pccodes, ("oseast1m", "osnrth1m"); crs=EPSG{epsg})
newgeo = geojoin(geo_pccodes, bounds, kind=:left, pred=((g1, g2) -> in(g1, g2)))
These two lines work in GB, when points and boundaries are on the same grid. But in NI, where the two use two different grids, I get
ERROR: MethodError: no method matching transform(::Type{OSGB36}, ::Type{Ire65})
The function `transform` exists, but no method is defined for this combination of argument types.
Closest candidates are:
transform(::Type{<:OSGB36}, ::Type{<:WGS84})
@ CoordRefSystems C:\Users\TGebbels\.julia\packages\CoordRefSystems\2kUDj\src\transforms.jl:38
transform(::Type{<:WGS84}, ::Type{<:Ire65})
@ CoordRefSystems C:\Users\TGebbels\.julia\packages\CoordRefSystems\2kUDj\src\transforms.jl:39
transform(::Type{<:Potsdam}, ::Type{<:WGS84})
@ CoordRefSystems C:\Users\TGebbels\.julia\packages\CoordRefSystems\2kUDj\src\transforms.jl:38
...
Stacktrace:
[1] convert(::Type{Cartesian{Ire65}}, coords::Cartesian3D{OSGB36, Quantity{Float64, 𝐋, Unitful.FreeUnits{…}}} )
@ CoordRefSystems C:\Users\TGebbels\.julia\packages\CoordRefSystems\2kUDj\src\crs\basic.jl:361
[2] convert(::Type{GeodeticLatLon{Ire65}}, coords::GeodeticLatLon{OSGB36, Quantity{Float64, NoDims, Unitful.FreeUnits{…}}})
@ CoordRefSystems C:\Users\TGebbels\.julia\packages\CoordRefSystems\2kUDj\src\crs\geographic\geodetic.jl:239
[3] convert(::Type{…}, coords::TransverseMercator{…})
@ CoordRefSystems C:\Users\TGebbels\.julia\packages\CoordRefSystems\2kUDj\src\crs\projected.jl:210
[4] _proj(CRS::Type, p::Point{𝔼{…}, TransverseMercator{…}} )
@ Meshes C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms\proj.jl:90
[5] applycoord(::Proj{TransverseMercator{…}}, p::Point{𝔼{…}, TransverseMercator{…}} )
@ Meshes C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms\proj.jl:55
[6] (::Meshes.var"#715#716"{Proj{…}})(gᵢ::Point{𝔼{…}, TransverseMercator{…}} )
@ Meshes .\none:0
[7] iterate
@ .\generator.jl:48 [inlined]
[8] collect
@ .\array.jl:791 [inlined]
[9] applycoord
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:84 [inlined]
[10] macro expansion
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65 [inlined]
[11] applycoord(t::Proj{TransverseMercator{…}}, g::Ring{𝔼{…}, TransverseMercator{…}, CircularArrays.CircularVector{…}} )
@ Meshes C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65
[12] (::Meshes.var"#713#714"{Proj{…}})(gᵢ::Ring{𝔼{…}, TransverseMercator{…}, CircularArrays.CircularVector{…}} )
@ Meshes .\none:0
[13] iterate
@ .\generator.jl:48 [inlined]
[14] collect
@ .\array.jl:791 [inlined]
[15] applycoord
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:83 [inlined]
[16] macro expansion
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65 [inlined]
[17] applycoord(t::Proj{TransverseMercator{…}}, g::PolyArea{𝔼{…}, TransverseMercator{…}, Ring{…}, Vector{…}} )
@ Meshes C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65
[18] (::Meshes.var"#713#714"{Proj{…}})(gᵢ::PolyArea{𝔼{…}, TransverseMercator{…}, Ring{…}, Vector{…}} )
@ Meshes .\none:0
[19] iterate
@ .\generator.jl:48 [inlined]
[20] collect
@ .\array.jl:791 [inlined]
[21] applycoord
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:83 [inlined]
[22] macro expansion
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65 [inlined]
[23] applycoord(t::Proj{TransverseMercator{…}}, g::MultiPolygon{𝔼{…}, TransverseMercator{…}, PolyArea{…}} )
@ Meshes C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65
[24] #713
@ .\essentials.jl:0 [inlined]
[25] iterate
@ .\generator.jl:48 [inlined]
[26] collect(itr::Base.Generator{Vector{MultiPolygon{…}}, Meshes.var"#713#714"{Proj{…}}})
@ Base .\array.jl:791
[27] applycoord
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:83 [inlined]
[28] macro expansion
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65 [inlined]
[29] applycoord(t::Proj{TransverseMercator{…}}, g::GeometrySet{𝔼{…}, TransverseMercator{…}, MultiPolygon{…}} )
@ Meshes C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms.jl:65
[30] apply
@ C:\Users\TGebbels\.julia\packages\Meshes\km42B\src\transforms\proj.jl:44 [inlined]
[31] apply(transform::Proj{TransverseMercator{…}}, geotable::GeoTable{GeometrySet{…}, @NamedTuple{…}})
@ GeoTables C:\Users\TGebbels\.julia\packages\GeoTables\szpHL\src\geotransforms.jl:6
[32] Transform
@ C:\Users\TGebbels\.julia\packages\TransformsBase\w6gll\src\interface.jl:124 [inlined]
[33] |>
@ .\operators.jl:926 [inlined]
[34] _adjustcrs
@ C:\Users\TGebbels\.julia\packages\GeoTables\szpHL\src\geoops\geojoin.jl:220 [inlined]
[35] _geojoin(gtb1::GeoTable{…}, gtb2::GeoTable{…}, selector::ColumnSelectors.NoneSelector, aggfuns::Vector{…}; kind::Symbol, pred::Function, on::Nothing)
@ GeoTables C:\Users\TGebbels\.julia\packages\GeoTables\szpHL\src\geoops\geojoin.jl:71
[36] _geojoin
@ C:\Users\TGebbels\.julia\packages\GeoTables\szpHL\src\geoops\geojoin.jl:45 [inlined]
[37] #geojoin#45
@ C:\Users\TGebbels\.julia\packages\GeoTables\szpHL\src\geoops\geojoin.jl:39 [inlined]
[38] nationcodes(pccodes::SubDataFrame{…}, bounds::GeoTable{…}, code::Symbol, name::Symbol; epsg::Int64)
@ Main c:\Users\TGebbels\...\Documents\Public Affairs\plotmissing.jl:221
[39] getDevolvedCodes()
@ Main c:\Users\TGebbels\...\Documents\Public Affairs\plotmissing.jl:248
[40] top-level scope
@ c:\Users\TGebbels\...\Documents\Public Affairs\plotmissing.jl:291
Some type information was truncated. Use `show(err)` to see complete types.
@TimG you probably need to add CoordGridTransforms.jl to your environment. The next GeoStats.jl release will have this dependency.
If the error is still present after the CoordGridTransforms.jl package is installed, please feel free to open an issue on github. This thread is specific to CoordRefSystems.jl announcements.