Skip to content

Commit

Permalink
Add wms get map test for projection requiring epsg database
Browse files Browse the repository at this point in the history
  • Loading branch information
Tara Drwenski authored and tdrwenski committed Jan 22, 2024
1 parent 65b9065 commit d031899
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ public void testGetPng() {
TestOnLocalServer.withHttpPath("/wms/scanCdmUnitTests/conventions/cf/ipcc/tas_A1.nc?service=WMS&version=1.3.0"
+ "&request=GetMap&CRS=CRS:84&WIDTH=512&HEIGHT=512&LAYERS=tas&BBOX=0,-90,360,90&format="
+ ContentType.png.toString() + "&time=1850-01-16T12:00:00Z");
testGetPng(endpoint);
}

@Test
@Category(NeedsCdmUnitTest.class)
public void testGetPngInAnotherProjection() {
String endpoint =
TestOnLocalServer.withHttpPath("/wms/scanCdmUnitTests/conventions/cf/ipcc/tas_A1.nc?service=WMS&version=1.3.0"
+ "&request=GetMap&CRS=EPSG:3857&WIDTH=512&HEIGHT=512&LAYERS=tas&BBOX=0,-90,360,90&format="
+ ContentType.png.toString() + "&time=1850-01-16T12:00:00Z");
testGetPng(endpoint);
}

private static void testGetPng(String endpoint) {
byte[] result = TestOnLocalServer.getContent(endpoint, HttpServletResponse.SC_OK, ContentType.png.toString());
// make sure we get a png back
// first byte (unsigned) should equal 137 (decimal)
Expand Down

0 comments on commit d031899

Please sign in to comment.