We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Now to setup a pipeline, we need to handle the C API:
julia> pipe = Proj.proj_create("+proj=pipeline +step +proj=unitconvert +xy_in=deg +z_in=m +xy_out=rad +z_out=m +step +inv +proj=longlat +a=6378136.3 +rf=298.257 +e=0.08181922146 +step +proj=cart +a=6378136.3 +rf=298.257 +step +inv +proj=cart +ellps=WGS84 +step +proj=unitconvert +xy_in=rad +z_in=m +xy_out=deg +z_out=m +step +proj=axisswap +order=2,1") Ptr{Nothing} @0x00000001254061d0 julia> Proj.proj_trans(pipe, Proj.PJ_FWD, (0,0,0)) 4-element Proj.Coord: 0.0 0.0 -0.7000000001862645 Inf
The text was updated successfully, but these errors were encountered:
We can also create a new struct, such as Pipeline?
Pipeline
Sorry, something went wrong.
I'd prefer to support this as part of the Proj.Transformation API. It secretly already works:
Proj.Transformation
julia> using Proj julia> pipe = Proj.proj_create("+proj=pipeline +step +proj=unitconvert +xy_in=deg +z_in=m +xy_out=rad +z_out=m +step +inv +proj=longlat +a=6378136.3 +rf=298.257 +e=0.08181922146 +step +proj=cart +a=6378136.3 +rf=298.257 +step +inv +proj=cart +ellps=WGS84 +step +proj=unitconvert +xy_in=rad +z_in=m +xy_out=deg +z_out=m +step +proj=axisswap +order=2,1") Ptr{Nothing} @0x0000000066f7aee0 julia> trans = Proj.Transformation(pipe, PJ_FWD); julia> trans(0, 0, 0) (0.0, 0.0, -0.7000000001862645)
Though that hides the rough edges, since some of the code, like, show don't work:
show
julia> trans = Proj.Transformation(pipe, PJ_FWD) Error showing value of type Proj.Transformation: ERROR: ArgumentError: cannot convert NULL to string Stacktrace: [1] unsafe_string @ .\strings\string.jl:70 [inlined] [2] unsafe_string @ .\c.jl:193 [inlined] [3] show(io::IOContext{Base.TTY}, trans::Proj.Transformation) @ Proj D:\visser_mn\.julia\dev\Proj\src\coord.jl:104
And we'd probably want a constructor that takes a single string, rather than passing the pointer to the pipeline created by proj_create.
proj_create
Successfully merging a pull request may close this issue.
Now to setup a pipeline, we need to handle the C API:
The text was updated successfully, but these errors were encountered: