/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/classification.py
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/Thuban/Model/classification.py

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2734 - (view) (annotate) - [select for diffs]
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
File length: 26440 byte(s)
Diff to previous 2688
made a copy

Revision 2688 - (view) (annotate) - [select for diffs]
Modified Fri Jun 30 12:27:20 2006 UTC (18 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 26440 byte(s)
Diff to previous 2657
New Classification "Pattern": Classify text attributes by regexp.

Revision 2657 - (view) (annotate) - [select for diffs]
Modified Wed Jul 27 21:49:25 2005 UTC (19 years, 7 months ago) by jan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23951 byte(s)
Diff to previous 2374
(Classification.TreeItem.build_info): Added output of size.


Revision 2374 - (view) (annotate) - [select for diffs]
Modified Sun Oct 3 21:01:31 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23679 byte(s)
Diff to previous 1912
Removed some trailing whitespaces.
(ClassGroupProperties.__init__): Set default size.
(ClassGroupProperties.SetProperties): Set the size.
(ClassGroupProperties.GetSize): New. Return the size.
(ClassGroupProperties.SetSize): New. Set the size.
(ClassGroupProperties__eq__): Compare also size.
(ClassGroupProperties__repr__): Print also size.


Revision 1912 - (view) (annotate) - [select for diffs]
Modified Mon Nov 3 13:55:41 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23073 byte(s)
Diff to previous 1909
(Classification.__getattr__)
(Classification._compile_classification)
(Classification._clear_compiled_classification): New. Methods to
manage a 'compiled' representation of the classification groups
which is created on demand
(Classification.InsertGroup, Classification.RemoveGroup)
(Classification.ReplaceGroup): reset the compiled representation
(Classification.FindGroup): Use the compiled representation to
find the matching group
(ClassGroupRange.GetRangeTuple): New. Return the range as a tuple


Revision 1909 - (view) (annotate) - [select for diffs]
Modified Fri Oct 31 18:16:34 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 19732 byte(s)
Diff to previous 1426
(Classification.SetDefaultGroup):
Send a CLASS_CHANGED message
(Classification.RemoveGroup): Send a CLASS_CHANGED message and do
not return the removed group since it wasn't used.


Revision 1426 - (view) (annotate) - [select for diffs]
Modified Wed Jul 16 13:22:20 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 19605 byte(s)
Diff to previous 1353
Use new CLASS_CHANGED message.
(Classification): Inherit from Publisher.
(Classification.__init__): Remove the layer parameter.
        Classifications no longer need to have a parent layer.
(Classification.GetField, Classification.GetFieldType,
        Classification.SetFieldInfo): Removed. The field name is stored
        in the layer, and the type can be retreived by calling
        Layer.GetFieldType().
(Classification._set_layer, Classification.GetLayer): Removed.
        Classifications no longer have a parent layer.


Revision 1353 - (view) (annotate) - [select for diffs]
Modified Wed Jul 2 09:36:54 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24088 byte(s)
Diff to previous 1351
(ClassGroupRange.__init__):
        Consolidate the min/max parameters into a single _range which
        can either be a tuple or a Range object.
(ClassGroupRange.SetRange): Consolidate the min/max parameters
        into a single _range which can either be a tuple or a Range object.


Revision 1351 - (view) (annotate) - [select for diffs]
Modified Tue Jul 1 16:17:02 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24139 byte(s)
Diff to previous 1336
(Classificatio.__init__): Remove unused lock variable.


Revision 1336 - (view) (annotate) - [select for diffs]
Modified Tue Jul 1 16:09:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24176 byte(s)
Diff to previous 1249
 Fixes RTbug #1973, 1971.
(Classification.SetField, Classification.SetFieldType):
        Replaced with SetFieldInfo.
(Classification.SetFieldInfo): New. Does a better job of
        what SetField and SetFieldType used to do by combining
        their function since they should really always be done
        at the same time.
(Classification.SetLayer): Renamed to _set_layer.
(Classification._set_layer): Should only be called from
        Layer's SetClassification. This does not cause a recursive
        call as SetLayer did because we know that Layer knows about
        the classification.


Revision 1249 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 09:27:19 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24595 byte(s)
Diff to previous 1176
Remove "from __future__"
        import statement since python 2.2 is the earliest supported
        version.


Revision 1176 - (view) (annotate) - [select for diffs]
Modified Thu Jun 12 15:46:22 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24674 byte(s)
Diff to previous 960
Removed assert statements that tested if the variable was an instance of Color.


Revision 960 - (view) (annotate) - [select for diffs]
Modified Wed May 21 17:23:11 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24832 byte(s)
Diff to previous 873
(ClassGroupRange.SetRange): Use new Range ___init__ to pass floats.


Revision 873 - (view) (annotate) - [select for diffs]
Modified Fri May 9 16:30:54 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24905 byte(s)
Diff to previous 689
Explicit imports.
(ClassGroupRange): Use the Range class to store the underlying
        range information. The interface remains the same, except for
        GetRange(), and you can also supply a Range object as the min
        parameter to SetRange or __init__.


Revision 689 - (view) (annotate) - [select for diffs]
Modified Wed Apr 16 13:47:07 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24215 byte(s)
Diff to previous 681
Use repr() around values in the ClassGroup*.__repr__() methods so it is
clearer when a value is a string and when it is a number.


Revision 681 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 21:54:32 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24208 byte(s)
Diff to previous 679
Implemented __repr__ for the ClassGroup* classes to make debugging a bit easier.
(ClassGroup.SetLabel): Check that the string is an instance
        of StringTypes not StringType. Accounts for Unicode strings.


Revision 679 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 19:46:37 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23649 byte(s)
Diff to previous 678
fix missed renaming


Revision 678 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 19:21:26 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23647 byte(s)
Diff to previous 643
(ClassGroupProperties): Make instance variables private and optimize comparison
        operator by first checking if the color references are the same.
(ClassGroupSingleton): Make instance variables private.
(ClassGroupRange): Make instance variables private.


Revision 643 - (view) (annotate) - [select for diffs]
Modified Thu Apr 10 17:55:57 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23343 byte(s)
Diff to previous 637
(ClassGroupRange.__init__): Should pass group to ClassGroup constructor.


Revision 637 - (view) (annotate) - [select for diffs]
Modified Thu Apr 10 14:35:03 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23342 byte(s)
Diff to previous 627
(ClassGroup): Move all the common
        methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
        here. Implement SetVisible(), IsVisible().
(ClassGroup.__init__): Add group parameter which acts as a copy
        constructor.


Revision 627 - (view) (annotate) - [select for diffs]
Modified Wed Apr 9 10:08:47 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24491 byte(s)
Diff to previous 613
(Classification.__deepcopy__): Need to copy over field and fieldType attributes.


Revision 613 - (view) (annotate) - [select for diffs]
Modified Mon Apr 7 08:55:55 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 24389 byte(s)
Diff to previous 609
(Classification.AppendGroup,
        Classification.InsertGroup, Classification.ReplaceGroup,
        Classification.RemoveGroup, Classification.GetGroup): Do as the
        names imply.
(Classification.FindGroup): This was called GetGroup, but GetGroup
        takes an index, while FindGroup takes a value.
(Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
        REFERENCE. Currently there is a cyclic reference between the layer
        and its classification. If the classification doesn't need to know
        its owning layer we can change this, since it may make sense to be
        able to use the same classification with different layers.


Revision 609 - (view) (annotate) - [select for diffs]
Modified Fri Apr 4 13:55:59 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 22976 byte(s)
Diff to previous 602
Rename Color.None to
        Color.Transparent.
(ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
        Don't bother copying the color, since Colors are immutable.


Revision 602 - (view) (annotate) - [select for diffs]
Modified Fri Apr 4 12:12:18 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 23102 byte(s)
Diff to previous 544
Fix assert calls.
    (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
    Copy the color parameter rather than hold onto a reference.


Revision 544 - (view) (annotate) - [select for diffs]
Modified Thu Mar 20 09:43:48 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 22901 byte(s)
Diff to previous 528
(ClassGroup.GetDisplayText): New.  Returns a string which is appropriately
describes the group.


Revision 528 - (view) (annotate) - [select for diffs]
Modified Wed Mar 12 19:55:13 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 22147 byte(s)
Diff to previous 491
This comment is really for layer.py, but the motive was the same for
classification.py:

	Handle the cyclic references between
        a layer and its classification better, and be sure to disconnect
        the classification from the layer when the layer is destroyed
        so that we don't maintain a cyclic reference that may not be
        garbage collected.


Revision 491 - (view) (annotate) - [select for diffs]
Modified Mon Mar 10 10:44:42 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 22029 byte(s)
Diff to previous 484
(Classification): Don't use
        layer's message function directly, use the ClassChanged() method
        when then classification changes. SetField/SetFieldType/SetLayer
        must keep the information about field name and field type in
        sync when an owning layer is set or removed.


Revision 484 - (view) (annotate) - [select for diffs]
Modified Fri Mar 7 18:20:10 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 21237 byte(s)
Diff to previous 479
Implemented __copy__ and __deepcopy__ for ClassGroup* and ClassGroupProperites
so they can easily be copied by the classifier dialog.
(ClassGroupProperites.__init__): The default line color should
        have been Color.Black.


Revision 479 - (view) (annotate) - [select for diffs]
Modified Thu Mar 6 16:46:07 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 20487 byte(s)
Diff to previous 462
Minor documentation changes, Addition of __eq__ and __ne__ methods.
(Classification.SetLayer): prevent recursion between this method
        and Layer.SetClassification().


Revision 462 - (view) (annotate) - [select for diffs]
Modified Wed Mar 5 18:17:17 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 18133 byte(s)
Diff to previous 453
Class documentation. Renaming of methods with Stroke to Line.
Groups are stored in a single list with the default as the first element.
Groups are searched in the order they appear in the list.


Revision 453 - (view) (annotate) - [select for diffs]
Modified Tue Mar 4 11:31:39 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 12339 byte(s)
Diff to previous 449
Remove unnecessary wxPython import


Revision 449 - (view) (annotate) - [select for diffs]
Modified Tue Mar 4 10:33:08 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 12359 byte(s)
Diff to previous 436
(ClassGroupRange.GetProperties): Parameter 'value' should default to None.


Revision 436 - (view) (annotate) - [select for diffs]
Modified Thu Feb 27 15:53:03 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 12356 byte(s)
Diff to previous 428
 Changed the class hierarchy
        so that a Classification consists of Groups which return
        Properties when a value matches a Group.


Revision 428 - (view) (annotate) - [select for diffs]
Modified Mon Feb 24 18:46:35 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 10436 byte(s)
Diff to previous 410
(Classification): Renamed
        GetProperties() to GetClassData(). Used the new iterator
        in TreeInfo().
(ClassIterator): Iterator implementation to iterate over the
        ClassData objects in a classification object.


Revision 410 - (view) (annotate) - [select for diffs]
Modified Wed Feb 19 16:51:12 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 8995 byte(s)
Diff to previous 397
(Classification):
        Uses the new ClassData* classes. Modification messages are
        passed up to the parent layer (if it exists).
(ClassData): New class to encapsulate the common data in each
        classification property.
(ClassDataDefault): Represents the Default class. data.
(ClassDataPoint): Represents a single class. data point
(ClassDataRange): Represents a class. range
(ClassDataMap): Represents a class. map (unused).


Revision 397 - (view) (annotate) - [select for diffs]
Modified Tue Feb 11 14:23:32 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 6601 byte(s)
Diff to previous 388
* Thuban/Model/classification.py: Added import line to fix
        feature conflicts between running on python2.2 and python2.1.


Revision 388 - (view) (annotate) - [select for diffs]
Modified Mon Feb 10 15:25:05 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 6530 byte(s)
Diff to previous 385
* Thuban/Model/classification.py (Classificaton): Added set and
        get methods for the default data. The class also takes a layer
        reference so that modification messages can be sent. Fixed the
        methods to use the new ClassData class.
        (ClassData): New class to encapsulate the classification data


Revision 385 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 11:43:56 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 5012 byte(s)
Diff to previous 381
Added getNull() to return the NullData reference


Revision 381 - (view) (annotate) - [select for diffs]
Modified Tue Jan 28 18:37:05 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 4959 byte(s)
Diff to previous 378
New function TreeInfo to add information about the classification
into the tree view.


Revision 378 - (view) (annotate) - [select for diffs]
Modified Tue Jan 28 12:13:28 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 3405 byte(s)
Diff to previous 374
fixed merging conflict


Revision 374 - (view) (annotate) - [select for diffs]
Modified Mon Jan 27 14:20:02 2003 UTC (22 years, 1 month ago) by jan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 3418 byte(s)
Diff to previous 371
Replace user string by _() for i18n.


Revision 371 - (view) (annotate) - [select for diffs]
Added Mon Jan 27 13:49:39 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/Model/classification.py
File length: 3393 byte(s)
Encapsulates classification information for a layer


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26