[Thuban-list] [Patch] Custom+automatic classifiers

Moritz Lennert mlennert at club.worldonline.be
Mon Feb 23 10:00:07 CET 2004


Daniel Calvelo Aros said:
> Hi.
>
> And last but not least, the custom breaks classifier. This one needs
> support
> files contained in the tar.gz archive, and this patch should be applied
> *after* the previous two.
>

actually it seems to be incompatible with the two other patches (or with
the current (23/2/04) CVS).

After applying the discont patch (on a clean cvs), I get:

patch -p0 < class-custom+auto.patch
patching file thuban/Thuban/Model/classgen.py
Hunk #1 succeeded at 335 (offset -1 lines).
Hunk #2 succeeded at 509 with fuzz 1 (offset -1 lines).
patching file thuban/Thuban/UI/classgen.py
Hunk #1 succeeded at 18 (offset -1 lines).
Hunk #2 FAILED at 27.
Hunk #3 succeeded at 48 (offset -2 lines).
Hunk #4 succeeded at 106 (offset -2 lines).
Hunk #5 succeeded at 234 (offset -2 lines).
Hunk #6 succeeded at 299 (offset -2 lines).
Hunk #7 succeeded at 325 (offset -2 lines).
Hunk #8 succeeded at 971 (offset -2 lines).
Hunk #9 succeeded at 1209 (offset -2 lines).
1 out of 9 hunks FAILED -- saving rejects to file
thuban/Thuban/UI/classgen.py.rej

and thuban/Thuban/UI/classgen.py.rej:

***************
*** 27,38 ****
  from Thuban.Model.range import Range
  from Thuban.UI.common import ThubanBeginBusyCursor, ThubanEndBusyCursor

  import classifier, resource

  from Thuban.Model.color import interpolate_rgb, interpolate_hsv
! from Thuban.Model.classgen import \
!     generate_uniform_distribution, generate_singletons,
generate_quantiles, \
!     generate_ranges_from_list, classify_discont, \
      CustomRamp, grey_ramp, red_ramp, green_ramp, blue_ramp,
green_to_red_ramp, \
      HotToColdRamp, FixedRamp

--- 27,42 ----
  from Thuban.Model.range import Range
  from Thuban.UI.common import ThubanBeginBusyCursor, ThubanEndBusyCursor

+ from Thuban.Model.histogram import bincount, histcount
+ from Thuban.UI.graph import BinHistogram, PointDensityGram
+ from Thuban.UI.sliders import Sliders
+
  import classifier, resource

  from Thuban.Model.color import interpolate_rgb, interpolate_hsv
! from Thuban.Model.classgen import generate_ranges_from_list,\
!     generate_uniform_distribution, generate_singletons,
generate_quantiles,\
!     classify_discont, classify_kmeans, classify_annealing, \
      CustomRamp, grey_ramp, red_ramp, green_ramp, blue_ramp,
green_to_red_ramp, \
      HotToColdRamp, FixedRamp


And after applying the hsv-v2 patch (on a clean cvs):

patch -p0 < class-custom+auto.patch
patching file thuban/Thuban/Model/classgen.py
Hunk #1 FAILED at 336.
Hunk #2 succeeded at 312 with fuzz 2 (offset -198 lines).
1 out of 2 hunks FAILED -- saving rejects to file
thuban/Thuban/Model/classgen.py.rej
patching file thuban/Thuban/UI/classgen.py
Hunk #2 FAILED at 28.
Hunk #3 FAILED at 50.
Hunk #4 FAILED at 108.
Hunk #5 FAILED at 236.
Hunk #6 FAILED at 301.
Hunk #7 FAILED at 327.
Hunk #8 FAILED at 973.
Hunk #9 succeeded at 1068 with fuzz 2 (offset -143 lines).
7 out of 9 hunks FAILED -- saving rejects to file
thuban/Thuban/UI/classgen.py.rej

with thuban/Thuban/Model/classgen.py.rej (just an empty line too much):

***************
*** 336,341 ****
                  [(q, (q - minIndex+1) / float(numValues)) \
                   for q in quantiles])

  # TODO: implement Jenks & Caspall completely.

  if not  __builtins__.has_key("sum"): # Python < 2.3
--- 336,342 ----
                  [(q, (q - minIndex+1) / float(numValues)) \
                   for q in quantiles])

+
  # TODO: implement Jenks & Caspall completely.

  if not  __builtins__.has_key("sum"): # Python < 2.3

and thuban/Thuban/UI/classgen.py.rej attached.

Moritz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: classgen.py.rej
Type: application/octet-stream
Size: 11312 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-list/attachments/20040223/f5969a0c/classgen.py.rej


More information about the Thuban-list mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)