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

[WIP] Add a Tables.jl extension for FeatureCollection and Feature #156

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

asinghvi17
Copy link
Member

This PR treats FeatureCollections as row tables, and Features as rows.

julia> @time DataFrame(fc2)
  6.790032 seconds (10.19 M allocations: 3.447 GiB, 1.13% gc time)
177×169 DataFrame
 Row │ geometry                           FCLASS_IL        CONTINENT      NAME_FA              WB_A3   ADM0_A3_WB  FCLASS_SE        NAME_RU                
     │ WrapperG                          Union           String         String               String  Int64       Union           String                 
─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ MultiPolygon{false, false, Vecto                   Oceania        فیجی                 FJI            -99                   Фиджи                  
   2 │ Polygon{false, false, Vector{Lin                   Africa         تانزانیا             TZA            -99                   Танзания
   3 │ Polygon{false, false, Vector{Lin                   Africa         صحرای غربی           -99            -99                   Западная Сахара
   4 │ MultiPolygon{false, false, Vecto                   North America  کانادا               CAN            -99                   Канада
   5 │ MultiPolygon{false, false, Vecto                   North America  ایالات متحده آمریکا  USA            -99                   США                    
                                                                                                                              
 173 │ Polygon{false, false, Vector{Lin                   Europe         صربستان              SRB            -99                   Сербия
 174 │ Polygon{false, false, Vector{Lin                   Europe         مونتهنگرو            MNE            -99                   Черногория
 175 │ Polygon{false, false, Vector{Lin  Admin-0 country  Europe         کوزووو               KSV            -99  Admin-0 country  Республика Косово
 176 │ Polygon{false, false, Vector{Lin                   North America  ترینیداد و توباگو    TTO            -99                   Тринидад и Тобаго      
 177 │ Polygon{false, false, Vector{Lin  

so it's not great, but we can make it work. I'm still not sure how GeoJSON gets it so fast.

@asinghvi17 asinghvi17 self-assigned this Sep 20, 2024
but it actually increases runtime...something else is going on!
missT(::Type{Nothing}) = Missing
missT(::Type{T}) where {T} = T

function property_schema(features)
Copy link
Member

Choose a reason for hiding this comment

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

Will this work for GeoJSON too? Would be good to delete the code there if it does

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

Successfully merging this pull request may close these issues.

2 participants