Thanks Thomas,

you are correct - I was actually not specifying any symbol set at all :

For reasons I can't begin to work out, most of the map file is being written, 
but the symbol and font lines are failing :

  $blumap=new MapObj('',$mapserver_path);
        $blumap->set('debug','MS_ON');
        $blumap->setprojection('proj=latlong,ellps=WGS84,datum=WGS84',MS_TRUE);
        $blumap->set('units',MS_DD);
        $blumap->imagecolor->setRGB($sea_bgc[0],$sea_bgc[1],$sea_bgc[2]);
        $blumap->setExtent(110, -45, 160, -10);
        
$blumap->setSymbolSet('/usr/local/www/apache22/data/nahis/mapserver/symbols/standard.symbols');
        $blumap->setFontSet($mapserver_path.'fonts/standard.fonts');
        $blumap->outputformat->set('name', 'png');
        $blumap->outputformat->set('driver', 'agg/png');

…

is giving me :

MAP
  EXTENT 110 -45 160 -10
  IMAGECOLOR 230 252 255
  IMAGETYPE "png"
  NAME "MS"
  SIZE 600 600
  STATUS ON
  UNITS DD

  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "agg/png"



…


Why might the setsymbol and setfont lines be failing to produce mapfile output 
- but the rest are working fine? Noting that the path in the command is used in 
other static map files and is working when it is in the file.

If I copy and paste this path into the map file generated by PHP, I get my 
desired result… 

cheers

Ben



On 06/07/2012, at 7:42 PM, thomas bonfort wrote:

> c.f. 
> http://osgeo-org.1560.n6.nabble.com/msLoadMSRasterBufferFromFile-General-error-message-unable-to-open-file-tc4984932.html
> 
> --
> thomas
> 
> On Fri, Jul 6, 2012 at 10:33 AM, Ben Madin
> <li...@remoteinformation.com.au> wrote:
>> G'day all,
>> 
>> I'm not sure if this is two problems, or the second problem is a result of 
>> the first. The second problem is that I have a mapfile with multiple 
>> sections that look like :
>> 
>>   CLASS
>>      NAME "Sentinel Positive"
>>      EXPRESSION "SentPos"
>>      STYLE
>>        ANGLE 0
>>        COLOR 220 20 40
>>        OFFSET 0 0
>>        SIZE 8
>>        SYMBOL "circle"
>>      END # STYLE
>>    END # CLASS
>> 
>> 
>> where symbol is :
>> 
>> SYMBOL # 1
>>  NAME 'circle'
>>  TYPE ELLIPSE
>>  POINTS 1 1 END
>>  FILLED TRUE
>> END
>> 
>> 
>> and when I try to open it, I get :
>> 
>> # shp2img -m nampa4f2267cb1afaed507c167efa264946dBLU.map -o test.png
>> msDrawMap(): Image handling error. Failed to draw layer named 'BLU'. <br>
>> msLoadMSRasterBufferFromFile(): General error message. unable to open file 
>> /usr/local/www/apache22/data/system/mapserver/maps/tmpmapfiles/./circle for 
>> reading <br>
>> 
>> 
>> I know that SYMBOL can be a name (in the symbol file) or a filename, but 
>> clearly it is getting confused.
>> 
>> The first problem is that this file is one of several that is meant to be 
>> generated by a looping structure in php-mapscript, and I am getting :
>> 
>> [Fri Jul 06 18:08:13 2012] [notice] child pid 74615 exit signal Abort trap 
>> (6)
>> Assertion failed: (pixmap->type == MS_BUFFER_BYTE_RGBA), function 
>> agg2RenderPixmapSymbol, file mapagg.cpp, line 464.
>> [Fri Jul 06 18:08:57 2012] [notice] child pid 74300 exit signal Abort trap 
>> (6)
>> 
>> 
>> errors when I try to build the layers (this is the only one that builds). 
>> I'm a little short on ideas as to where to go next.
>> 
>> this is :
>> 
>> MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
>> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
>> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS 
>> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>> 
>> Server version: Apache/2.2.22 (FreeBSD)
>> 
>> PHP 5.4.4 (cli) (built: Jun 20 2012 07:13:50)
>> 
>> FreeBSD  FreeBSD 8.2-RELEASE-p4   amd64
>> 
>> 
>> cheers
>> 
>> Ben
>> 
>> 
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to