Re: [mapserver-users] Pyhton mapscript import error
Hi Thomas and Chris Thanks for the feedback. I tried with 'MIMETYPE image/png' in AGG output block. Its working now. I am able to get the png antialiase images using Tilecache. Thanks again. One more thing I would like to ask, is there any issue with AGG + PNG8 + transparent? Because when I set TRANSPARENT ON I get the black image. Enclosed are the both images. Thanks Gautam http://n2.nabble.com/file/n2407737/mapserv_transparent_off.png mapserv_transparent_off.png http://n2.nabble.com/file/n2407737/mapserv_transparent_on.png mapserv_transparent_on.png -- View this message in context: http://n2.nabble.com/Pyhton-mapscript-import-error-tp2341344p2407737.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Pyhton mapscript import error
mapserver version and your outputformat bloc please. -- thomas On Mon, Mar 2, 2009 at 07:19, gautamvs gauta...@gmail.com wrote: Hi Thomas and Chris Thanks for the feedback. I tried with 'MIMETYPE image/png' in AGG output block. Its working now. I am able to get the png antialiase images using Tilecache. Thanks again. One more thing I would like to ask, is there any issue with AGG + PNG8 + transparent? Because when I set TRANSPARENT ON I get the black image. Enclosed are the both images. Thanks Gautam http://n2.nabble.com/file/n2407737/mapserv_transparent_off.png mapserv_transparent_off.png http://n2.nabble.com/file/n2407737/mapserv_transparent_on.png mapserv_transparent_on.png -- View this message in context: http://n2.nabble.com/Pyhton-mapscript-import-error-tp2341344p2407737.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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
Re: [mapserver-users] Pyhton mapscript import error
sorry, saw you're using 5.2.1 in the first post. you must configure mapserver with --with-experimental-png for png8 to work with transparency -- thomas On Mon, Mar 2, 2009 at 07:23, thomas bonfort thomas.bonf...@gmail.com wrote: mapserver version and your outputformat bloc please. -- thomas On Mon, Mar 2, 2009 at 07:19, gautamvs gauta...@gmail.com wrote: Hi Thomas and Chris Thanks for the feedback. I tried with 'MIMETYPE image/png' in AGG output block. Its working now. I am able to get the png antialiase images using Tilecache. Thanks again. One more thing I would like to ask, is there any issue with AGG + PNG8 + transparent? Because when I set TRANSPARENT ON I get the black image. Enclosed are the both images. Thanks Gautam http://n2.nabble.com/file/n2407737/mapserv_transparent_off.png mapserv_transparent_off.png http://n2.nabble.com/file/n2407737/mapserv_transparent_on.png mapserv_transparent_on.png -- View this message in context: http://n2.nabble.com/Pyhton-mapscript-import-error-tp2341344p2407737.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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
Re: [mapserver-users] Pyhton mapscript import error
Hi As I checked the Tilecache code Mapserver.py. There is no option for image type format agg, as default is image/png. I tried agg/png that is not working in loadOWSparameters. How can I give AGG image type. Regards Gautam -- View this message in context: http://n2.nabble.com/Pyhton-mapscript-import-error-tp2341344p2400381.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Pyhton mapscript import error
On Sat, Feb 28, 2009 at 12:04:10PM +0100, thomas bonfort wrote: hi, you should get going by adding MIMETYPE image/png to your agg outputformat bloc, or by explicitely calling your agg outputformat by its name in your tilecache requests (ie. format=aggpng24) The former is the correct solution. THe latter won't work with the MapServer layer that is referenced. However, the MapServer Python bindings tend to leak like a sieve. If you ca, I'd recommend using a WMS layer instead, in which case i think thomas's suggestion would be acceptable as well, though I only ever use the former method. -- Chris thomas On Sat, Feb 28, 2009 at 11:48, gautamvs gauta...@gmail.com wrote: Hi As I checked the Tilecache code Mapserver.py. There is no option for image type format agg, as default is image/png. I tried agg/png that is not working in loadOWSparameters. How can I give AGG image type. Regards Gautam -- View this message in context: http://n2.nabble.com/Pyhton-mapscript-import-error-tp2341344p2400381.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ 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 -- Christopher Schmidt MetaCarta ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Pyhton mapscript import error
Thanks Guillaume I'll check it, with method given by you to install AGG. regards Gautam Guillaume Sueur-2 wrote: Hi, python mapscript + agg is a real pain I grabbed a howto file some months ago, on PerryGeo blog (http://www.perrygeo.net/wordpress/) find it here as attachment it works fine. I've just tested it again few minutes ago. Regards Guillaume gautamvs a écrit : I am getting error while importing mapscript in python snip import mapscript Traceback (most recent call last): File stdin, line 1, in ? File mapscript.py, line 7, in ? import _mapscript ImportError: /usr/local/lib/python2.4/site-packages/_mapscript.so: undefined symbol: _ZN3agg6gse5x7E /snip when i removed the AGG suport in Mapserver , i am able to import without any error. But my application requires AGG support (ie. with Tilecache) I am using Mapserver 5.2.1, AGG 2.5, Python 2.4 on CentOS. Thanks for any help. Gautam # agg #agg 2.4 # based on http://trac.osgeo.org/mapserver/ticket/2215 tar -xzvf agg2.4.tar.gz cd agg2.4 emacs src/Makefile # add to CXXFLAGS ... -fPIC CXXFLAGS= $(AGGCXXFLAGS) -I../include -L./ -fPIC # add to the end of file shared: $(OBJ) ../font_freetype/agg_font_freetype.o $(CXX) -shared -W1,-soname,libagg.2.4.so -o libagg.so \$(OBJ) ../font_freetype/agg_font_freetype.o -L/usr/local/lib -lfreetype make cd examples/X11 emacs Makefile #Change: #-I/usr/local/include/freetype2 \ #To: #`freetype-config --cflags` \ # add to both CXXFLAGS .. -fPIC ## CXXFLAGS= $(AGGCXXFLAGS) -I../../include \ -L../../src \ $(PIXFMT) -fPIC CXXFREETYPEFLAGS= $(AGGCXXFLAGS) -Wall \ -I../../include \ -I../../font_freetype \ `freetype-config --cflags` \ -L../../src \ $(PIXFMT) -fPIC ## make freetype cd ../../font_freetype/ ar r libaggfontfreetype.a agg_font_freetype.o cd ../src ln -s ../font_freetype/libaggfontfreetype.a cd .. make clean make cd src make shared sudo cp libagg.so /usr/local/lib sudo ldconfig # mapserver ./configure --without-tiff --with-jpeg --with-png --with-freetype \ --with-zlib --with-threads --with-proj \ --with-gdal=/usr/local/bin/gdal-config --with-wcs --with-ogr \ --with-wmsclient --with-wfsclient --with-wfs \ --without-pdf --with-geos --enable-debug --with-agg=/home/perry/src/agg-2.4 \ --with-postgis=/usr/bin/pg_config \ --with-curl-config=/usr/bin/curl-config --with-httpd=/usr/sbin/apache2 --with-gd=/usr/local \ --with-fastcgi make sudo cp mapserv /usr/lib/cgi-bin/ sudo cp shp2img shp2pdf shptree shptreetst shptreevis sortshp tile4ms scalebar legend msencrypt mapserv /usr/local/bin/ #mapscript cd mapscript/python # swig -python -shadow -modern -o mapscript_wrap.c ../mapscript.i swig -python -shadow -modern -templatereduce -fastdispatch -fvirtual -fastproxy \ -modernargs -castmode -dirvtable -fastinit -fastquery -noproxydel -nobuildnone \ -o mapscript_wrap.c ../mapscript.i python setup.py build cd tests/cases python runalltests.py -v # don't worry about the 4 test failures .. due to postgres database not being present cd ../.. sudo python setup.py install --force ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- View this message in context: http://n2.nabble.com/Pyhton-mapscript-import-error-tp2341344p2345804.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Pyhton mapscript import error
Hi, python mapscript + agg is a real pain I grabbed a howto file some months ago, on PerryGeo blog (http://www.perrygeo.net/wordpress/) find it here as attachment it works fine. I've just tested it again few minutes ago. Regards Guillaume gautamvs a écrit : I am getting error while importing mapscript in python snip import mapscript Traceback (most recent call last): File stdin, line 1, in ? File mapscript.py, line 7, in ? import _mapscript ImportError: /usr/local/lib/python2.4/site-packages/_mapscript.so: undefined symbol: _ZN3agg6gse5x7E /snip when i removed the AGG suport in Mapserver , i am able to import without any error. But my application requires AGG support (ie. with Tilecache) I am using Mapserver 5.2.1, AGG 2.5, Python 2.4 on CentOS. Thanks for any help. Gautam # agg #agg 2.4 # based on http://trac.osgeo.org/mapserver/ticket/2215 tar -xzvf agg2.4.tar.gz cd agg2.4 emacs src/Makefile # add to CXXFLAGS ... -fPIC CXXFLAGS= $(AGGCXXFLAGS) -I../include -L./ -fPIC # add to the end of file shared: $(OBJ) ../font_freetype/agg_font_freetype.o $(CXX) -shared -W1,-soname,libagg.2.4.so -o libagg.so \$(OBJ) ../font_freetype/agg_font_freetype.o -L/usr/local/lib -lfreetype make cd examples/X11 emacs Makefile #Change: #-I/usr/local/include/freetype2 \ #To: #`freetype-config --cflags` \ # add to both CXXFLAGS .. -fPIC ## CXXFLAGS= $(AGGCXXFLAGS) -I../../include \ -L../../src \ $(PIXFMT) -fPIC CXXFREETYPEFLAGS= $(AGGCXXFLAGS) -Wall \ -I../../include \ -I../../font_freetype \ `freetype-config --cflags` \ -L../../src \ $(PIXFMT) -fPIC ## make freetype cd ../../font_freetype/ ar r libaggfontfreetype.a agg_font_freetype.o cd ../src ln -s ../font_freetype/libaggfontfreetype.a cd .. make clean make cd src make shared sudo cp libagg.so /usr/local/lib sudo ldconfig # mapserver ./configure --without-tiff --with-jpeg --with-png --with-freetype \ --with-zlib --with-threads --with-proj \ --with-gdal=/usr/local/bin/gdal-config --with-wcs --with-ogr \ --with-wmsclient --with-wfsclient --with-wfs \ --without-pdf --with-geos --enable-debug --with-agg=/home/perry/src/agg-2.4 \ --with-postgis=/usr/bin/pg_config \ --with-curl-config=/usr/bin/curl-config --with-httpd=/usr/sbin/apache2 --with-gd=/usr/local \ --with-fastcgi make sudo cp mapserv /usr/lib/cgi-bin/ sudo cp shp2img shp2pdf shptree shptreetst shptreevis sortshp tile4ms scalebar legend msencrypt mapserv /usr/local/bin/ #mapscript cd mapscript/python # swig -python -shadow -modern -o mapscript_wrap.c ../mapscript.i swig -python -shadow -modern -templatereduce -fastdispatch -fvirtual -fastproxy \ -modernargs -castmode -dirvtable -fastinit -fastquery -noproxydel -nobuildnone \ -o mapscript_wrap.c ../mapscript.i python setup.py build cd tests/cases python runalltests.py -v # don't worry about the 4 test failures .. due to postgres database not being present cd ../.. sudo python setup.py install --force___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users