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

rebuild should use child geometries as the source of dimensional truth #183

Open
asinghvi17 opened this issue Jul 21, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@asinghvi17
Copy link
Member

rebuild takes its cue on geometry dimensions from the original geometry, not the child geometries - this means that a 2d to 3d transformation will return e.g. a 2d linestring with internal 3d points.

rebuild(geom, child_geoms; kw...) = rebuild(GI.trait(geom), geom, child_geoms; kw...)
function rebuild(trait::GI.AbstractTrait, geom, child_geoms; crs=GI.crs(geom), extent=nothing)
T = GI.geointerface_geomtype(trait)
if GI.is3d(geom)
# The Boolean type parameters here indicate "3d-ness" and "measure" coordinate, respectively.
return T{true,false}(child_geoms; crs, extent)
else
return T{false,false}(child_geoms; crs, extent)
end
end

@asinghvi17 asinghvi17 added the bug Something isn't working label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant