[mapserver-dev] v6 beta 4 Cairo PDF and raster

Brent Fraser bfraser at geoanalytic.com
Wed Apr 13 11:34:37 EDT 2011


Thomas,

I'm using the test map file and data:

MAP

NAME TEST
STATUS ON
SIZE 400 300
EXTENT 0.5 0.5 399.5 299.5
IMAGECOLOR 255 255 255
SHAPEPATH "../gdal"
IMAGETYPE CAIRO_PDF

OUTPUTFORMAT
    NAME 'CAIRO_PDF'
    DRIVER CAIRO/PDF
    EXTENSION "pdf"
END

LAYER
   NAME grey
   TYPE raster
   STATUS default
#  OPACITY 50
   DATA data/grey.tif
END

END # of map file


When OPACITY is used, the raster data is not included in the PDF.  
Commenting out OPACITY results in a PDF with a raster.

Best Regards,
Brent Fraser


On 4/13/2011 9:24 AM, thomas bonfort wrote:
> Brent,
> I've just committed [1] two tests for raster data, and pdf supports
> opacity. We'll need more info...
> ps: don't be confused by the .png extensions, the .pdf.png file is really a pdf
>
> --
> thomas
>
> [1] http://trac.osgeo.org/mapserver/changeset/11555
>
>
>
> On Wed, Apr 13, 2011 at 16:49, Brent Fraser<bfraser at geoanalytic.com>  wrote:
>> Thanks to all involved in fixing the problem
>> (http://trac.osgeo.org/mapserver/ticket/3799).  Shp2img no longer crashes,
>> but the OPACITY doesn't seem to work.  Can someone confirm that?
>>
>> Thanks!
>>
>> Best Regards,
>> Brent Fraser
>>
>>
>> On 4/1/2011 9:46 PM, Brent Fraser wrote:
>>> shp2img crashes when rendering a tif into a pdf using:
>>>
>>> MAP
>>>   NAME 'topo'
>>>   # Map image size
>>>   SIZE  800 800
>>>   UNITS meters
>>>   EXTENT 285000 5435000 291000 5440000
>>>   PROJECTION
>>>     'proj=utm'
>>>     'zone=12'
>>>     'ellps=WGS84'
>>>     'datum=WGS84'
>>>     'units=m'
>>>     'no_defs'
>>>   END
>>>
>>>   # Background color for the map canvas -- change as desired
>>>   IMAGECOLOR 255 255 255
>>>   IMAGETYPE CAIRO_PDF
>>>
>>>   OUTPUTFORMAT
>>>    NAME 'CAIRO_PDF'
>>>    DRIVER CAIRO/PDF
>>>    EXTENSION "pdf"
>>>   END
>>>
>>>   LAYER
>>>     NAME '082h04'
>>>     TYPE RASTER
>>>     DATA 'C:\Inetpub\wwwroot\Topo\data\raster\SHADING\08H04.tif'
>>>     STATUS DEFAULT
>>>     OPACITY 50
>>>     PROJECTION
>>>     'proj=longlat'
>>>     'ellps=GRS80'
>>>     'datum=NAD83'
>>>     'no_defs'
>>>     END
>>>
>>>   END
>>>
>>> END
>>>
>>> I'll file a ticket...
>>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>



More information about the mapserver-dev mailing list