Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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.

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

No branches or pull requests

1 participant