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

this causes a crash #51

Closed
SymbolixAU opened this issue Nov 9, 2018 · 1 comment
Closed

this causes a crash #51

SymbolixAU opened this issue Nov 9, 2018 · 1 comment
Assignees
Milestone

Comments

@SymbolixAU
Copy link
Owner

@SymbolixAU SymbolixAU commented Nov 9, 2018

geojsonsf::geojson_sf('{"type":"MultiPolygon","coordinates":[[[0,0],[0,1],[1,1],[1,0],[0,0]],[[0,0],[0,-1],[-1,-1],[1,0],[0,0]]]}')

because it's missing a set of outer braces

geojsonsf::geojson_sf('{"type":"MultiPolygon","coordinates":[[[[0,0],[0,1],[1,1],[1,0],[0,0]],[[0,0],[0,-1],[-1,-1],[1,0],[0,0]]]]}')

TODO - handle mis-specified geometries

  • POINT
  • MULTIPOINT
  • LINESTRING
  • MULTILINESTRING
  • POLYGON
  • MULTIPOLYGON
@SymbolixAU SymbolixAU self-assigned this Nov 13, 2018
@SymbolixAU SymbolixAU added this to the v.1.3 milestone Nov 13, 2018
@SymbolixAU SymbolixAU reopened this Nov 13, 2018
@SymbolixAU
Copy link
Owner Author

@SymbolixAU SymbolixAU commented Nov 13, 2018

this wasn't correct. it caused

geojsonsf::geojson_sf( '{"type":"MultiLineString","coordinates":[[[0,0],[1,1]],[0,0]]}' )

~~to fail, when it shouldn't. ~~

Actually, this should fail, the second linestring should be in an array

geojsonsf::geojson_sf( '{"type":"MultiLineString","coordinates":[[[0,0],[1,1]],[[0,0]]]}' )
SymbolixAU added a commit that referenced this issue Nov 13, 2018
SymbolixAU added a commit that referenced this issue Nov 13, 2018
test and fix for #51
@SymbolixAU SymbolixAU closed this Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.