Skip to content

Commit

Permalink
#6933: Enhance IconSymbolizer and Contrast enhancement (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuren1 authored Aug 19, 2021
1 parent c3275e2 commit d139b75
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
35 changes: 35 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,30 @@
},
"gammaValue": {
"type": "number"
},
"vendorOption": {
"$ref": "http://geostyler/geostyler-style.json#/definitions/ContrastEnhancementVendorOption",
"description": "A ContrastEnhancementVendorOption defines the algorithm to apply for Normalize contrast enhancement."
}
},
"type": "object"
},
"ContrastEnhancementVendorOption": {
"description": "A ContrastEnhancementVendorOption defines the algorithm to apply for Normalize contrast enhancement.",
"properties": {
"algorithm": {
"enum": [
"ClipToMinimumMaximum",
"ClipToZero",
"StretchToMinimumMaximum"
],
"type": "string"
},
"maxValue": {
"type": "number"
},
"minValue": {
"type": "number"
}
},
"type": "object"
Expand Down Expand Up @@ -300,6 +324,17 @@
"description": "A color defined as a hex-color string.",
"type": "string"
},
"format": {
"description": "The format (MIME type) of the image provided.",
"enum": [
"image/gif",
"image/jpeg",
"image/jpg",
"image/png",
"image/svg+xml"
],
"type": "string"
},
"haloBlur": {
"description": "The halo's fadeout distance towards the outside.",
"type": "number"
Expand Down
14 changes: 14 additions & 0 deletions style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ export interface IconSymbolizer extends BasePointSymbolizer {
* A path/URL to the icon image file.
*/
image?: string;
/**
* The format (MIME type) of the image provided.
*/
format?: `image/${'png' | 'jpg' | 'jpeg' | 'gif' | 'svg+xml'}`;
/**
* If true, the icon will be kept upright.
*/
Expand Down Expand Up @@ -549,12 +553,22 @@ export interface ColorMap {
extended?: boolean;
}

/**
* A ContrastEnhancementVendorOption defines the algorithm to apply for Normalize contrast enhancement.
*/
export interface ContrastEnhancementVendorOption {
algorithm: 'StretchToMinimumMaximum' | 'ClipToMinimumMaximum' | 'ClipToZero';
minValue?: number;
maxValue?: number;
}

/**
* A ContrastEnhancement defines how the contrast of image data should be enhanced.
*/
export interface ContrastEnhancement {
enhancementType?: 'normalize' | 'histogram';
gammaValue?: number;
vendorOption?: ContrastEnhancementVendorOption;
}

/**
Expand Down

0 comments on commit d139b75

Please sign in to comment.