-
Notifications
You must be signed in to change notification settings - Fork 46
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
R crashes if esri shape file loaded with sf has empty geometry #176
Comments
Thanks. I can reproduce this error and will look into it. |
The specific error is from googlePolylines::encode( sa2_shape[sa2_shape$AREA_SQKM == 0, ] ) ## crashes
# vs
googlePolylines::encode( sa2_shape[sa2_shape$AREA_SQKM != 0, ] ) |
ReproducibleThese all cause RStudio / R to crash googlePolylines::encode( sf::st_sfc(sf::st_multipoint()) )
googlePolylines::encode( sf::st_sfc(sf::st_multilinestring()) )
googlePolylines::encode( sf::st_sfc(sf::st_multipolygon()) ) non-MULTI* objects are finegooglePolylines::encode( sf::st_sfc(sf::st_point()) )
googlePolylines::encode( sf::st_sf(geometry = sf::st_sfc(sf::st_point())) )
googlePolylines::encode( sf::st_sfc(sf::st_linestring()) )
googlePolylines::encode( sf::st_sf(geometry = sf::st_sfc(sf::st_linestring())) )
googlePolylines::encode( sf::st_sfc(sf::st_polygon()) )
googlePolylines::encode( sf::st_sf(geometry = sf::st_sfc(sf::st_polygon())) )
Working through this on googlePolylines issue |
SymbolixAU
pushed a commit
that referenced
this issue
Aug 30, 2018
closed - SymbolixAU/googlePolylines#32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
R crashes if the geometry column (from using sf) contains an empty list record.
R Studio Version 1.1.456
R version 3.5.1
Based on slack question.
Shape file: SA2_2016_AUST.shp
Source: https://datapacks.censusdata.abs.gov.au/datapacks/
2016_SA2_shape.zip
In code below, placed files in
abs_data/sa2_esri_shapefile
Workaround is to add filter on AREA_SQKM:
The text was updated successfully, but these errors were encountered: