[mapserver-users] Using OGL rendering instead of AGG

Schepers, Benjamin schepers at rvr-online.de
Mon Aug 28 00:56:59 PDT 2017


Hi Ram,

the DEM-service we provide, uses the classic mechanism  with pixel value and expression. The response-times with nearly fullscreen WMS (Format PNG8 or JPEG) are < 1s; there are also some image manipulations done which cost some additional time (BILINEAR-Resampling, COMPOSITE-Features for combination with hillshade, etc.). So in summary mapserver performs generally very well with such raster-data...

MAPFILE-Snippet (Classification from 0 - 500m) :

CLASSITEM "pixel"

CLASS
	EXPRESSION ([pixel] >= 0 AND [pixel] < 100)
	STYLE
		COLORRANGE 108 163 99   165 186 111
		DATARANGE 0 100
		RANGEITEM "pixel"
	END
END

CLASS
	EXPRESSION ([pixel] >= 100 AND [pixel] < 200)
	STYLE
		COLORRANGE 165 186 111   231 213 122
		DATARANGE 100 200
		RANGEITEM "pixel"
	END
END

CLASS
	EXPRESSION ([pixel] >= 200 AND [pixel] < 300)
	STYLE
		COLORRANGE 231 213 122   199 167 92
		DATARANGE 200 300
		RANGEITEM "pixel"
	END
END

CLASS
	EXPRESSION ([pixel] >= 300 AND [pixel] < 400)
	STYLE
		COLORRANGE 199 167 92   176 120 58
		DATARANGE 300 400
		RANGEITEM "pixel"
	END
END

CLASS
	EXPRESSION ([pixel] >= 400 AND [pixel] < 500)
	STYLE
		COLORRANGE 176 120 58   215 127 63
		DATARANGE 400 500
		RANGEITEM "pixel"
	END
END


Maybe your data could be optimized, if you are not satisfied with response-times?
If I remember right, I used 32-bit grayscale GeoTIFF  for DEM and Hillshade (both with DEFLATE-Compression and internal TILING) and I also calculated Overviews with gdaladdo for faster presentation in smaller scales...


Ben



-----Ursprüngliche Nachricht-----
Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von ramchandra
Gesendet: Dienstag, 25. Juli 2017 13:14
An: mapserver-users at lists.osgeo.org
Betreff: [mapserver-users] Using OGL rendering instead of AGG

Hi All,
     I am trying to color classify a DEM by adding multiple styles to the layer entry in the map file using the PIXEL value as the EXPRESSION. I am trying to speedup the rendering of the styled layer. I tried using the Hardware accelerated rendering through OpenGL. I have added the cmake flags so that OpenGL binaries are loaded when building Mapserver. 
I also made changes in the source code to enable the OGL Rendering by setting the MACRO #USE_OGL to 1. I have also changed my OUTPUTFORMAT as follows to trigger opengl rendering.
OUTPUTFORMAT
    NAME "OGL_PNG24"
    DRIVER "OGL/PNG"
    IMAGEMODE RGB
  END # OUTPUTFORMAT
In-spite of doing all these when i am sending the request it appends a new OUTPUTFORMAT object with AGG Driver as follows.
OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END # OUTPUTFORMAT

It also changes my OGL OUTPUTFORMAT by adding the additional fields MIMETYPE and EXTENSION.
  OUTPUTFORMAT
    NAME "OGL_PNG24"
    MIMETYPE "image/png; mode=24bit"
    DRIVER "OGL/PNG"
    EXTENSION "png"
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END # OUTPUTFORMAT

When I debug the code I see an error when the OGL output format block is parsed.
The error says "OGL_PNG24 driver is not configured". 
Can anyone point out what might me causing this error or how to enable OpenGL based rendering.

Regards,
Ram



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-OGL-rendering-instead-of-AGG-tp5329120.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the MapServer-users mailing list