
**Summary:** Applies a labeling to feature according to user-defined rules.

**Module:** [aspose.gis.rendering.labelings](/psd/python-net/aspose.gis.rendering.labelings/)

**Full Name:** aspose.gis.rendering.labelings.RuleBasedLabeling

**Inheritance:** Labeling

**Aspose.PSD Version:** 25.9.0

## **Constructors**
| **Name** | **Description** |
| :- | :- |
| [RuleBasedLabeling()](#RuleBasedLabeling__1) | Initializes a new instance of the RuleBasedLabeling class |
## **Properties**
| **Name** | **Type** | **Access** | **Description** |
| :- | :- | :- | :- |
| null [static] | [NullLabeling](/psd/python-net/aspose.gis.rendering.labelings/nulllabeling) | r | Gets an instance of [NullLabeling](/psd/python-net/aspose.gis.rendering.labelings/nulllabeling/). |
## **Methods**
| **Name** | **Description** |
| :- | :- |
| [add(rule)](#add_rule_1) | Adds a rule. |
| [add_else_rule(labeling)](#add_else_rule_labeling_2) | Adds a labeling that will be applied to features that don't match any filtering rule. |


### Constructor: RuleBasedLabeling() {#RuleBasedLabeling__1}


```
 RuleBasedLabeling() 
```

Initializes a new instance of the RuleBasedLabeling class

### Method: add(rule) {#add_rule_1}


```
 add(rule) 
```

Adds a rule.

**Parameters:**

| Parameter | Type | Description |
| :- | :- | :- |
| rule | [LabelingRule](/psd/python-net/aspose.gis.rendering.labelings/labelingrule) | Rule to add. |

### Method: add_else_rule(labeling) {#add_else_rule_labeling_2}


```
 add_else_rule(labeling) 
```

Adds a labeling that will be applied to features that don't match any filtering rule.

**Parameters:**

| Parameter | Type | Description |
| :- | :- | :- |
| labeling | [Labeling](/psd/python-net/aspose.gis.rendering.labelings/labeling) | A labeling. |

