Skip to content

The case of all features in a dataset having "null" values (nodata) is not handled #9

@balladaniel

Description

@balladaniel

Describe the bug
If all features in a dataset have null-values (nodata), the plugin proceeds to attempt classifying them, producing uncaught errors. Simple-statistics.js ends up crashing the thing with error "Quantile requires at least one data point.", or the plugin itself tries to process non-existent classes when using method "jenks", ending up in uncaught TypeErrors.

To Reproduce
Any GeoJSON dataset with 3+ features, where all of them have "null" for the chosen attribute.

Expected behavior
Handle it as early as possible (show a warning in console) AND still show the features, given noDataIgnore is set to false. In this case, the features should still be shown on the map, belonging to the "nodata" class.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions