Re: [mapserver-users] Different SIZEUNITS for line width and label fontsize
Hi Thomas, Thanks for elaborating on that, I was under the false impression that MINSIZE worked similar to MINSCALE in that it defined minimum criteria for the class to be applied. Will try this now. Thanks again! Vladimir thomas bonfort wrote: Hi again, using: size 8 minsize 8 maxsize 8 is *exactly* the same as using only size 8 with pixel sizeunits i.e. this effectively prevents the labels scaling at all regards, thomas On Tue, Feb 3, 2009 at 12:41, Vladimir Cvejanovic vladi...@gessolutions.com wrote: Hi Thomas, Thanks for your reply. I have already plaid around with MINSIZE and MAXSIZE. They are a good way to avoid the labels being displayed when they are too small to read. Also coupled with MINSCALE and MAXSCALE class definitions I was able to set up three classes for large, medium and small text depending on the scale used. This isn't a bad solution at all but I wanted to see if there is away to prevent the labels scaling at all within the same layer definition as the scalable (real-world sized) lines. Thanks, Vladimir thomas bonfort wrote: hi, you can use minsize and maxsize in your label: these are always pixels: size 8 minszie 8 maxsize 8 regards, thomas On Tue, Feb 3, 2009 at 12:17, Vladimir Cvejanovic vladi...@gessolutions.com wrote: Hi All, In the Mapfile, Is it possible to have different SIZEUNTIS for line width and label font in the same layer? The example is below. I have managed to solve this by defining two layers one which only displays the line and one which only displays the labels however this seems like a hack and very inefficient from a processing / querying point of view. The context is a line layer containing road lines which have a width in meters but labels in pixels. This would make things scale nicely Can this be done? Does anyone have a better approach? Thanks, Vladimir LAYER NAME 'highway' TYPE LINE DATA 'highway.shp' STATUS DEFAULT TRANSPARENCY 30 LABELITEM NAME SIZEUNITS meters CLASS NAME 'highway' STYLE WIDTH 5 #WANT THESE TO BE METERS COLOR 55 55 55 END LABEL TYPE TRUETYPE FONT FreeSans SIZE 08 # WANT THESE TO BE PIXELS COLOR 0 0 0 OUTLINECOLOR 255 255 255 ANTIALIAS TRUE ANGLE AUTO MINFEATURESIZE AUTO FORCE true END END END ___ 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] Different SIZEUNITS for line width and label fontsize
Hi Thomas, Thanks for your reply. I have already plaid around with MINSIZE and MAXSIZE. They are a good way to avoid the labels being displayed when they are too small to read. Also coupled with MINSCALE and MAXSCALE class definitions I was able to set up three classes for large, medium and small text depending on the scale used. This isn't a bad solution at all but I wanted to see if there is away to prevent the labels scaling at all within the same layer definition as the scalable (real-world sized) lines. Thanks, Vladimir thomas bonfort wrote: hi, you can use minsize and maxsize in your label: these are always pixels: size 8 minszie 8 maxsize 8 regards, thomas On Tue, Feb 3, 2009 at 12:17, Vladimir Cvejanovic vladi...@gessolutions.com wrote: Hi All, In the Mapfile, Is it possible to have different SIZEUNTIS for line width and label font in the same layer? The example is below. I have managed to solve this by defining two layers one which only displays the line and one which only displays the labels however this seems like a hack and very inefficient from a processing / querying point of view. The context is a line layer containing road lines which have a width in meters but labels in pixels. This would make things scale nicely Can this be done? Does anyone have a better approach? Thanks, Vladimir LAYER NAME 'highway' TYPE LINE DATA 'highway.shp' STATUS DEFAULT TRANSPARENCY 30 LABELITEM NAME SIZEUNITS meters CLASS NAME 'highway' STYLE WIDTH 5 #WANT THESE TO BE METERS COLOR 55 55 55 END LABEL TYPE TRUETYPE FONT FreeSans SIZE 08 # WANT THESE TO BE PIXELS COLOR 0 0 0 OUTLINECOLOR 255 255 255 ANTIALIAS TRUE ANGLE AUTO MINFEATURESIZE AUTO FORCE true END END END ___ 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
[mapserver-users] P.MAPPER 4.0 overrides rendering setting in map file?
Hi Everyone, I've joined the list to see if anyone else has encountered the following issue and can shed some light on how to resolve it. I'm not getting any anti-aliasing in AGG rendered images when accessing the map through pmapper. The weird thing is that rendering the same mapfile using mapserver CGI does produce anti-aliased output: CGI Example: localhost/cgi-bin/mapserv?map=/var/www/pmapper-4.0-beta/config/default/example-proj.maplayer=polyshapemode=map My suspicion is that the output I'm seeing in pmapper isn't actually rendered using AGG as instructed by the mapfile but is defaulting to GD. I haven't been able to confirm this suspicion because even with debug cranked up to 5 I can't seem to generate any debug info regarding the rendering engine. My second suspicion is that I may be missing a crucial pmapper specific config param in either the mapfile or the pmapper config file (config_default.xml in 4.0-beta). I'm not able to find docs for v4. OS: Ubuntu Intrepid (ssame behaviour confirmed on Debian Lenny) PMAPPER v4.0-beta HTTPD: Apache2 Mapserver 5.0.3 Mapscript for php5 Mapfile - included below I would be very grateful for any help this list can offer! Regards, Vladimir MAP EXTENT -1.212047 -0.966758 0.610465 0.446515 UNITS dd SIZE 600 500 SHAPEPATH /var/www/example-proj IMAGETYPE agg_png RESOLUTION 96 DEBUG 5 CONFIG MS_ERRORFILE /var/log/php/ms-error.log # # Image formats for AGG # OUTPUTFORMAT ### 24 bit PNG NAME 'agg_png' DRIVER AGG/PNG IMAGEMODE RGB MIMETYPE image/png TRANSPARENT OFF EXTENSION png END # # Start of web interface definition # WEB TEMPLATE map.html IMAGEPATH /var/www/tmp/ IMAGEURL /tmp/ LOG /var/log/php/ms.log END # Web # # Start of Reference map definition # REFERENCE EXTENT -1.212047 -0.966758 0.610465 0.446515 IMAGE ../../images/reference.png SIZE 199 149 COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 END # Reference #== START OF LAYER SECTION =# LAYER NAME polyshape TYPE line DATA polyshape CLASS STYLE WIDTH 10 COLOR 255 155 155 END END # Class END # Layer END #Map Pmapper Ini pmapper ini pmapper pmTitlep.mapper - A MapServer PHP/MapScript Framework/pmTitle debugLevel3/debugLevel /pmapper config pm_config_locationdefault/pm_config_location pm_javascript_locationjavascript/pm_javascript_location pm_print_configfilecommon/print.xml/pm_print_configfile pm_search_configfileinline/pm_search_configfile /config map mapFileexample-proj.map/mapFile categories category name=cat_all grouppolyshape/group /category /categories allGroups grouppolyshape/group /allGroups defGroups grouppolyshape/group /defGroups layerAutoRefresh1/layerAutoRefresh imgFormatpng/imgFormat sliderMaxmax/sliderMax sliderMin10/sliderMin /map ui tocStyletree/tocStyle legendStyleattached/legendStyle useCategories0/useCategories catWithCheckbox0/catWithCheckbox scaleLayers1/scaleLayers icoW18/icoW icoH14/icoH /ui locale defaultLanguageen/defaultLanguage defaultCharsetUTF-8/defaultCharset map2unicode1/map2unicode /locale /ini /pmapper ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] P.MAPPER 4.0 overrides rendering setting in map file?
Hi Again, Just solved this. Yes, pmapper does override the mapfile imagetype directive using it's own imgFormat parameter in config_default.xml. This needs to be set to the desired outputformat name and everyhitng appears to work fine. Example: map ... imgFormatagg_png/imgFormat ... /map Cheers, Vladimir Vladimir Cvejanovic wrote: Hi Everyone, I've joined the list to see if anyone else has encountered the following issue and can shed some light on how to resolve it. I'm not getting any anti-aliasing in AGG rendered images when accessing the map through pmapper. The weird thing is that rendering the same mapfile using mapserver CGI does produce anti-aliased output: CGI Example: localhost/cgi-bin/mapserv?map=/var/www/pmapper-4.0-beta/config/default/example-proj.maplayer=polyshapemode=map My suspicion is that the output I'm seeing in pmapper isn't actually rendered using AGG as instructed by the mapfile but is defaulting to GD. I haven't been able to confirm this suspicion because even with debug cranked up to 5 I can't seem to generate any debug info regarding the rendering engine. My second suspicion is that I may be missing a crucial pmapper specific config param in either the mapfile or the pmapper config file (config_default.xml in 4.0-beta). I'm not able to find docs for v4. OS: Ubuntu Intrepid (ssame behaviour confirmed on Debian Lenny) PMAPPER v4.0-beta HTTPD: Apache2 Mapserver 5.0.3 Mapscript for php5 Mapfile - included below I would be very grateful for any help this list can offer! Regards, Vladimir MAP EXTENT -1.212047 -0.966758 0.610465 0.446515 UNITS dd SIZE 600 500 SHAPEPATH /var/www/example-proj IMAGETYPE agg_png RESOLUTION 96 DEBUG 5 CONFIG MS_ERRORFILE /var/log/php/ms-error.log # # Image formats for AGG # OUTPUTFORMAT ### 24 bit PNG NAME 'agg_png' DRIVER AGG/PNG IMAGEMODE RGB MIMETYPE image/png TRANSPARENT OFF EXTENSION png END # # Start of web interface definition # WEB TEMPLATE map.html IMAGEPATH /var/www/tmp/ IMAGEURL /tmp/ LOG /var/log/php/ms.log END # Web # # Start of Reference map definition # REFERENCE EXTENT -1.212047 -0.966758 0.610465 0.446515 IMAGE ../../images/reference.png SIZE 199 149 COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 END # Reference #== START OF LAYER SECTION =# LAYER NAME polyshape TYPE line DATA polyshape CLASS STYLE WIDTH 10 COLOR 255 155 155 END END # Class END # Layer END #Map Pmapper Ini pmapper ini pmapper pmTitlep.mapper - A MapServer PHP/MapScript Framework/pmTitle debugLevel3/debugLevel /pmapper config pm_config_locationdefault/pm_config_location pm_javascript_locationjavascript/pm_javascript_location pm_print_configfilecommon/print.xml/pm_print_configfile pm_search_configfileinline/pm_search_configfile /config map mapFileexample-proj.map/mapFile categories category name=cat_all grouppolyshape/group /category /categories allGroups grouppolyshape/group /allGroups defGroups grouppolyshape/group /defGroups layerAutoRefresh1/layerAutoRefresh imgFormatpng/imgFormat sliderMaxmax/sliderMax sliderMin10/sliderMin /map ui tocStyletree/tocStyle legendStyleattached/legendStyle useCategories0/useCategories catWithCheckbox0/catWithCheckbox scaleLayers1/scaleLayers icoW18/icoW icoH14/icoH /ui locale defaultLanguageen/defaultLanguage defaultCharsetUTF-8/defaultCharset map2unicode1/map2unicode /locale /ini /pmapper ___ 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