Skip to content

Commit

Permalink
removes unneeded index.d.ts and fixes wording
Browse files Browse the repository at this point in the history
Co-authored-by: jansule <[email protected]>
  • Loading branch information
Kai Volland and jansule committed Oct 18, 2022
1 parent 34165ac commit 7de79cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
1 change: 0 additions & 1 deletion index.d.ts

This file was deleted.

36 changes: 18 additions & 18 deletions src/SldStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,16 @@ export class SldStyleParser implements StyleParser<string> {
/**
* The readStyle implementation of the geostyler-style StyleParser interface.
* It reads a SLD as a string and returns a Promise.
* The Promise itself resolves with a geostyler-style.
* The Promise itself resolves with an object containing the geostyler-style.
*
* @param sldString A SLD as a string.
* @return The Promise resolving with the geostyler-style
* @return The Promise resolving with an object containing the geostyler-style.
*/
readStyle(sldString: string): Promise<ReadStyleResult> {
return new Promise<ReadStyleResult>((resolve) => {
try {
const output = this.parser.parse(sldString);
const geoStylerStyle: Style = this.sldObjectToGeoStylerStyle(output);
const sldObject = this.parser.parse(sldString);
const geoStylerStyle: Style = this.sldObjectToGeoStylerStyle(sldObject);
resolve({
output: geoStylerStyle
});
Expand Down Expand Up @@ -1138,7 +1138,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style
*
* @param geoStylerStyle A geostyler-style.
* @return The object representation of a SLD Style (readable with fast-xml-parser)
Expand Down Expand Up @@ -1198,7 +1198,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style Rule.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style Rule.
*
* @param rules An array of geostyler-style Rules.
* @return The object representation of a SLD Rule (readable with fast-xml-parser)
Expand Down Expand Up @@ -1268,7 +1268,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style ComparisonFilter.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style ComparisonFilter.
*
* @param comparisonFilter A geostyler-style ComparisonFilter.
* @return The object representation of a SLD Filter Expression with a
Expand Down Expand Up @@ -1358,7 +1358,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style Filter.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style Filter.
*
* @param filter A geostyler-style Filter.
* @return The object representation of a SLD Filter Expression (readable with fast-xml-parser)
Expand Down Expand Up @@ -1439,7 +1439,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style MarkSymbolizer.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style MarkSymbolizer.
*
* @param markSymbolizer A geostyler-style MarkSymbolizer.
* @return The object representation of a SLD PointSymbolizer with a Mark
Expand Down Expand Up @@ -1581,7 +1581,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style IconSymbolizer.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style IconSymbolizer.
*
* @param iconSymbolizer A geostyler-style IconSymbolizer.
* @return The object representation of a SLD PointSymbolizer with
Expand Down Expand Up @@ -1653,7 +1653,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style TextSymbolizer.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style TextSymbolizer.
*
* @param textSymbolizer A geostyler-style TextSymbolizer.
* @return The object representation of a SLD TextSymbolizer (readable with fast-xml-parser)
Expand Down Expand Up @@ -1893,7 +1893,7 @@ export class SldStyleParser implements StyleParser<string> {
};

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style LineSymbolizer.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style LineSymbolizer.
*
* @param lineSymbolizer A geostyler-style LineSymbolizer.
* @return The object representation of a SLD LineSymbolizer (readable with fast-xml-parser)
Expand Down Expand Up @@ -2014,7 +2014,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style FillSymbolizer.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style FillSymbolizer.
*
* @param fillSymbolizer A geostyler-style FillSymbolizer.
* @return The object representation of a SLD PolygonSymbolizer (readable with fast-xml-parser)
Expand Down Expand Up @@ -2126,7 +2126,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style RasterSymbolizer.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style RasterSymbolizer.
*
* @param rasterSymbolizer A geostyler-style RasterSymbolizer.
* @return The object representation of a SLD RasterSymbolizer (readable with fast-xml-parser)
Expand Down Expand Up @@ -2173,7 +2173,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style ColorMap.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style ColorMap.
*
* @param colorMap A geostyler-style ColorMap.
* @return The object representation of a SLD ColorMap (readable with fast-xml-parser)
Expand Down Expand Up @@ -2223,7 +2223,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style ChannelSelection.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style ChannelSelection.
*
* @param channelSelection A geostyler-style ChannelSelection.
* @return The object representation of a SLD ChannelSelection (readable with fast-xml-parser)
Expand Down Expand Up @@ -2267,7 +2267,7 @@ export class SldStyleParser implements StyleParser<string> {
}

/**
* Get the SLD Object (readable with fast-xml-parser) from an geostyler-style ContrastEnhancement.
* Get the SLD Object (readable with fast-xml-parser) from a geostyler-style ContrastEnhancement.
*
* @param contrastEnhancement A geostyler-style ContrastEnhancement.
* @return The object representation of a SLD ContrastEnhancement (readable with fast-xml-parser)
Expand Down Expand Up @@ -2301,7 +2301,7 @@ export class SldStyleParser implements StyleParser<string> {
const capitalizeFirstLetter = (a: string) => a[0].toUpperCase() + a.slice(1);
const unsupportedProperties: UnsupportedProperties = {};
geoStylerStyle.rules.forEach(rule => {
// ScaleDenominator and Filters are completly supported so we just check for symbolizers
// ScaleDenominator and Filters are completely supported so we just check for symbolizers
rule.symbolizers.forEach(symbolizer => {
const key = capitalizeFirstLetter(`${symbolizer.kind}Symbolizer`);
const value = this.unsupportedProperties?.Symbolizer?.[key];
Expand Down

0 comments on commit 7de79cb

Please sign in to comment.