Skip to content

Areal weighing test completed with buggy code #35

@fnorf

Description

@fnorf

npm test did not show errors for areal-weighting when I accidentally returned the whole sourceFeatures list from getIntersectingFeatures instead of only the filtered sourceList.

  sourceList = sourceFeatures;
  return [sourceList, intersects];

cogran -d -i testdata/berlin/kriminalitaet_bezirksregionen.geojson -t testdata/berlin/447_lor_planungsraeume.geojson -o testdata/berlin/arealWeighting_kriminalitaet_bezirksregionenToPlanungsraeume.geojson --attr Alle_2012 returned totally wrong values for Alle_2012 then though, as to be expected.

To reproduce add this in line 47 of https://github.com/berlinermorgenpost/cogran/blob/master/lib/methods/areal-weighting.js#L47:
sourceList = sourceFeatures;

Areal weighing testing might need some more cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions