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

Allow write for Vector or even other itererables of geometries. #92

Open
rafaqz opened this issue May 13, 2024 · 3 comments
Open

Allow write for Vector or even other itererables of geometries. #92

rafaqz opened this issue May 13, 2024 · 3 comments

Comments

@rafaqz
Copy link
Member

rafaqz commented May 13, 2024

It would be nice if arrays/iterables of geometries would just write as a GeometryCollection without having to explicitly wrap them as that, as its a common way to hold and manipulate geometries you are working on.

@asinghvi17
Copy link
Member

Wouldn't the correct handling for this be a FeatureCollection with no attributes?

@rafaqz
Copy link
Member Author

rafaqz commented May 14, 2024

Probably!

@asinghvi17
Copy link
Member

asinghvi17 commented Jun 16, 2024

function vec2fc(vec)
	@assert all(x -> !isnothing(GI.geomtrait(x)), vec)
	fc = GI.FeatureCollection(GI.Feature.(vec; properties = (;))
end

ought to work as the core conversion method, if someone wants to take this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants