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

Areal weighing test completed with buggy code #35

Open
fnorf opened this issue Nov 25, 2016 · 0 comments
Open

Areal weighing test completed with buggy code #35

fnorf opened this issue Nov 25, 2016 · 0 comments

Comments

@fnorf
Copy link
Contributor

fnorf commented Nov 25, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant