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

Table to FeatureCollection #59

Closed
wants to merge 10 commits into from
Closed

Table to FeatureCollection #59

wants to merge 10 commits into from

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented Dec 29, 2022

Adds a Tables.jl handler to the FeatureCollection constructor. This implementation is likely not very performant, but it works for now.

Closes #55

Copy link
Member

@visr visr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Nice to have this. I left a few small comments.

src/features.jl Outdated Show resolved Hide resolved
src/features.jl Outdated Show resolved Hide resolved
df = DataFrame(GeoJSON.FeatureCollection(features))
@test df == DataFrame(GeoJSON.FeatureCollection(df))

df_custom_col = DataFrame(:points => [p, p], :x => [1, 2])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with other non-GeoJSON.jl geometry types as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! I actually forgot about that. So we need the other convert PR merged first.

I'll get that passing and come back to this. It's also a good example of how the traittype method will be useful from within a package as well.

rafaqz and others added 2 commits December 31, 2022 19:28
Co-authored-by: Martijn Visser <[email protected]>
Co-authored-by: Martijn Visser <[email protected]>
@rafaqz
Copy link
Member Author

rafaqz commented Feb 13, 2023

Arrg I really stalled on this, just ran into it again... but I guess it has to wait for the @evetion PR.

@evetion evetion mentioned this pull request Mar 3, 2023
4 tasks
@rafaqz
Copy link
Member Author

rafaqz commented Apr 20, 2023

This is also not really worth having if we instead have write from a DataFrame to GeoJSON.

@rafaqz rafaqz closed this Apr 20, 2023
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

Successfully merging this pull request may close these issues.

Support constructing FeatureCollection from Tables
2 participants