Override hashCode and overload == operator for GeoJSON types
- [x] Position
- [x] BBox
- [x] Point
- [ ] MultiPoint
- [ ] LineString
- [ ] MultiLineString
- [ ] Polygon
- [ ] MultiPolygon
- [ ] GeometryCollection
- [x] Feature
- [ ] FeatureCollection
as discussed in #43
:+1: on this issue, to be able to scale the functionality of this library, this is a must have feature.
For context, was adding a new functionality and couldn't easily compare two FeatureCollections:
GeoJSONObject actual = flip(GeoJSONObject.fromJson(json));
GeoJSONObject expected = GeoJSONObject.fromJson(flippedJson);
expect(actual, expected);
Hi @tobrun,
we are currently working on a separate library that offers equality functions for the more complex data types of geojson. https://github.com/dartclub/turf_equality The lib is based on: https://www.npmjs.com/package/geojson-equality
We have to find a way to combine the new lib into turf_dart at a later point.
And I still think it's a problem if we override == with a really performance hungry function that can compare e.g. highly nested FeatureCollections.
CC @armantorkzaban
–> DECISION: What should be done with booleanEqual?