Search in sources :

Example 1 with NewPolygonSLD

use of com.sldeditor.create.sld.NewPolygonSLD in project sldeditor by robward-scisys.

the class NewPolygonSLDTest method testNewPolygonSLD.

/**
 * Test new polygon sld.
 */
@Test
public void testNewPolygonSLD() {
    NewPolygonSLD newData = new NewPolygonSLD();
    StyledLayerDescriptor sld = newData.create();
    assertTrue(sld.layers().size() == 1);
    StyledLayer styledLayer = sld.layers().get(0);
    NamedLayer namedLayer = (NamedLayer) styledLayer;
    Symbolizer symbolizer = namedLayer.styles().get(0).featureTypeStyles().get(0).rules().get(0).symbolizers().get(0);
    assertTrue(symbolizer instanceof PolygonSymbolizer);
}
Also used : StyledLayerDescriptor(org.geotools.styling.StyledLayerDescriptor) NewPolygonSLD(com.sldeditor.create.sld.NewPolygonSLD) StyledLayer(org.geotools.styling.StyledLayer) PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) NamedLayer(org.geotools.styling.NamedLayer) Symbolizer(org.geotools.styling.Symbolizer) PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) Test(org.junit.jupiter.api.Test)

Example 2 with NewPolygonSLD

use of com.sldeditor.create.sld.NewPolygonSLD in project sldeditor by robward-scisys.

the class NewSLDFactory method populateAvailableList.

/**
 * Populate available list of SLDs.
 *
 * @return the list
 */
private static List<NewSLDInterface> populateAvailableList() {
    List<NewSLDInterface> list = new ArrayList<>();
    list.add(new NewPointSLD());
    list.add(new NewLineSLD());
    list.add(new NewPolygonSLD());
    list.add(new NewRasterSLD());
    return list;
}
Also used : NewPointSLD(com.sldeditor.create.sld.NewPointSLD) NewRasterSLD(com.sldeditor.create.sld.NewRasterSLD) NewSLDInterface(com.sldeditor.create.sld.NewSLDInterface) NewPolygonSLD(com.sldeditor.create.sld.NewPolygonSLD) ArrayList(java.util.ArrayList) NewLineSLD(com.sldeditor.create.sld.NewLineSLD)

Aggregations

NewPolygonSLD (com.sldeditor.create.sld.NewPolygonSLD)2 NewLineSLD (com.sldeditor.create.sld.NewLineSLD)1 NewPointSLD (com.sldeditor.create.sld.NewPointSLD)1 NewRasterSLD (com.sldeditor.create.sld.NewRasterSLD)1 NewSLDInterface (com.sldeditor.create.sld.NewSLDInterface)1 ArrayList (java.util.ArrayList)1 NamedLayer (org.geotools.styling.NamedLayer)1 PolygonSymbolizer (org.geotools.styling.PolygonSymbolizer)1 StyledLayer (org.geotools.styling.StyledLayer)1 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)1 Symbolizer (org.geotools.styling.Symbolizer)1 Test (org.junit.jupiter.api.Test)1