Search in sources :

Example 1 with WMSEnvVarValues

use of com.sldeditor.filter.v2.envvar.WMSEnvVarValues in project sldeditor by robward-scisys.

the class EnvironmentVariableManagerTest method testSetWMSEnvVarValues.

/**
 * Test method for {@link
 * com.sldeditor.filter.v2.envvar.EnvironmentVariableManager#setWMSEnvVarValues(com.sldeditor.filter.v2.envvar.WMSEnvVarValues)}.
 */
@Test
public void testSetWMSEnvVarValues() {
    EnvironmentVariableManager.getInstance().setWMSEnvVarValues(null);
    WMSEnvVarValues wmsEnvVar = new WMSEnvVarValues();
    wmsEnvVar.setImageHeight(42);
    wmsEnvVar.setImageWidth(454);
    Envelope envelope = new Envelope(1.0, 2.0, 50.0, 51.1);
    ReferencedEnvelope mapBounds = ReferencedEnvelope.create(envelope, CoordManager.getInstance().getWGS84());
    wmsEnvVar.setMapBounds(mapBounds);
    EnvironmentVariableManager.getInstance().setWMSEnvVarValues(wmsEnvVar);
    // Update the values again
    WMSEnvVarValues wmsEnvVar2 = new WMSEnvVarValues();
    wmsEnvVar2.setImageHeight(69);
    wmsEnvVar2.setImageWidth(123);
    Envelope envelope2 = new Envelope(-1.0, -2.0, 50.0, 51.1);
    ReferencedEnvelope mapBounds2 = ReferencedEnvelope.create(envelope2, CoordManager.getInstance().getWGS84());
    wmsEnvVar2.setMapBounds(mapBounds2);
    EnvironmentVariableManager.getInstance().setWMSEnvVarValues(wmsEnvVar2);
}
Also used : ReferencedEnvelope(org.geotools.geometry.jts.ReferencedEnvelope) WMSEnvVarValues(com.sldeditor.filter.v2.envvar.WMSEnvVarValues) ReferencedEnvelope(org.geotools.geometry.jts.ReferencedEnvelope) Envelope(org.locationtech.jts.geom.Envelope) Test(org.junit.jupiter.api.Test)

Aggregations

WMSEnvVarValues (com.sldeditor.filter.v2.envvar.WMSEnvVarValues)1 ReferencedEnvelope (org.geotools.geometry.jts.ReferencedEnvelope)1 Test (org.junit.jupiter.api.Test)1 Envelope (org.locationtech.jts.geom.Envelope)1