MCPcopy Index your code
hub / github.com/MapServer/MapServer / msDrawRasterLayerLow

Function msDrawRasterLayerLow

mapraster.c:324–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322/************************************************************************/
323
324int msDrawRasterLayerLow(mapObj *map, layerObj *layer, imageObj *image,
325 rasterBufferObj *rb )
326{
327/* -------------------------------------------------------------------- */
328/* As of MapServer 6.0 GDAL is required for rendering raster */
329/* imagery. */
330/* -------------------------------------------------------------------- */
331#if !defined(USE_GDAL)
332 msSetError(MS_MISCERR,
333 "Attempt to render a RASTER (or WMS) layer but without\n"
334 "GDAL support enabled. Raster rendering requires GDAL.",
335 "msDrawRasterLayerLow()" );
336 return MS_FAILURE;
337
338#else /* defined(USE_GDAL) */
339 int status, i, done;
340 char *filename=NULL, tilename[MS_MAXPATHLEN];
341
342 layerObj *tlp=NULL; /* pointer to the tile layer either real or temporary */
343 int tileitemindex=-1, tilelayerindex=-1;
344 shapeObj tshp;
345
346 char szPath[MS_MAXPATHLEN];
347 char *decrypted_path;
348 int final_status = MS_SUCCESS;
349
350 rectObj searchrect;
351 char *pszTmp = NULL;
352 char tiAbsFilePath[MS_MAXPATHLEN];
353 char *tiAbsDirPath = NULL;
354 GDALDatasetH hDS;
355 double adfGeoTransform[6];
356 const char *close_connection;
357
358 msGDALInitialize();
359
360 if(layer->debug > 0 || map->debug > 1)
361 msDebug( "msDrawRasterLayerLow(%s): entering.\n", layer->name );
362
363 if(!layer->data && !layer->tileindex) {
364 if(layer->debug == MS_TRUE)
365 msDebug( "msDrawRasterLayerLow(%s): layer data and tileindex NULL ... doing nothing.", layer->name );
366 return(0);
367 }
368
369 if((layer->status != MS_ON) && (layer->status != MS_DEFAULT)) {
370 if(layer->debug == MS_TRUE)
371 msDebug( "msDrawRasterLayerLow(%s): not status ON or DEFAULT, doing nothing.", layer->name );
372 return(0);
373 }
374
375 if(map->scaledenom > 0) {
376 if((layer->maxscaledenom > 0) && (map->scaledenom > layer->maxscaledenom)) {
377 if(layer->debug == MS_TRUE)
378 msDebug( "msDrawRasterLayerLow(%s): skipping, map scale %.2g > MAXSCALEDENOM=%g\n",
379 layer->name, map->scaledenom, layer->maxscaledenom );
380 return(0);
381 }

Callers 4

msDrawRasterLayerPluginFunction · 0.85
msDrawRasterLayerFunction · 0.85
msWCSGetCoverageFunction · 0.85
msWCSGetCoverage20Function · 0.85

Calls 15

msSetErrorFunction · 0.85
msGDALInitializeFunction · 0.85
msDebugFunction · 0.85
msInitShapeFunction · 0.85
msGetLayerIndexFunction · 0.85
initLayerFunction · 0.85
msStrdupFunction · 0.85
msSmallMallocFunction · 0.85
msLoadExpressionStringFunction · 0.85
msCheckParentPointerFunction · 0.85
msLayerOpenFunction · 0.85
msLayerWhichItemsFunction · 0.85

Tested by

no test coverage detected