New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAXSCALEDENOM & MAXSCALEDENOM throw an error if in LABEL #4781

Merged
merged 1 commit into from Oct 4, 2013

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Oct 4, 2013

In the last trunk.
If add a MINSCALEDENOM and MAXSCALEDENOM inside a LABEL . Mapserver crash but without give any message log.

I tested it with this:

LAYER
    NAME "test1"
    TYPE LINE
    STATUS OFF
    EXTENT  1660351.00 4458445.22 1866743.13 4960849.91
    FEATURE
    WKT "LINESTRING(1662120.546188 4858603.677291, 1662738.746295 4858875.082216, 1663854.522097 4858618.755342, 1664779.309249 4858638.85941)"
    END #FEATURE
    METADATA
      "wms_title" "Test"
      "ows_enable_request" "*"
    END
    LABELCACHE on
    MINSCALEDENOM 1
    MAXSCALEDENOM 4000000
    CLASS
      STYLE
        COLOR 200 0 0
        OUTLINECOLOR 0 255 0
      END
    LABEL
     TEXT 'BLAH BLAH'
        COLOR 0 85 255
        OUTLINECOLOR 212 0 0
        OUTLINEWIDTH 2
        MINSCALEDENOM 1
        MAXSCALEDENOM 40000
        FONT "LiberationSans-Regular"
        TYPE truetype
        SIZE 9
        ANGLE FOLLOW
        OFFSET 15 99
        POSITION auto
        PRIORITY 10
        MAXOVERLAPANGLE 180.0
        BUFFER 1
        FORCE OFF
        PARTIALS FALSE
        MINDISTANCE 200
    END
    END #CLASS
  END 

@tbonfort

This comment has been minimized.

Member

tbonfort commented Oct 4, 2013

can you edit the summary to include the whole mapfile, and a failing mapserv or shp2img call on it please ?

@ghost ghost assigned tbonfort Oct 4, 2013

@aperi2007

This comment has been minimized.

aperi2007 commented Oct 4, 2013

shp2img -m test.map -l "test1" -o test.png -i png

The result is a "Segmentation fault (core dumped)".

This is the full mapfile.

MAP 
  #
  NAME      "test"  #name to give your map service
  EXTENT 1554750.74 4678325.52 1771722.76 4924791.90
  SIZE      800 600
  MAXSIZE   4096
  UNITS meters
  ANGLE       0
  CONFIG "PROJ_LIB" "/usr/local/share/proj/"
  FONTSET "/home/archivio/tomcat/server/mapserver_maps/fonts/fonts.list"
  PROJECTION
    "+init=epsg:3003 +towgs84=0,0,0,0,0,0,0"
  END
  DEFRESOLUTION 91
  RESOLUTION 91
  IMAGECOLOR 255 255 255
  IMAGETYPE PNG8
  OUTPUTFORMAT
    NAME "AGGA"
    DRIVER AGG/PNG
    MIMETYPE "image/png"
    IMAGEMODE RGBA    
    EXTENSION "png"
    FORMATOPTION "GAMMA=0.75"
    FORMATOPTION "INTERLACE=true"
    FORMATOPTION "QUANTIZE_DITHER=OFF"
    FORMATOPTION "COMPRESSION=6"  
    FORMATOPTION "QUANTIZE_FORCE=ON"
    FORMATOPTION "QUANTIZE_COLORS=256"
    TRANSPARENT ON
  END
  WEB
    MINSCALEDENOM 1
    MAXSCALEDENOM 4000000
    METADATA
      "wms_title" "wmstest"
      "ows_onlineresource" "http://localhost/wmsraster/com.rt.wms.RTmap/wms?map=wmstest"
      "wms_enable_request" "*"
    END
  END 
  # End Web
LAYER
    NAME "test1"
    TYPE LINE
    STATUS OFF
    EXTENT  1660351.00 4458445.22 1866743.13 4960849.91
    FEATURE
    WKT "LINESTRING(1662120.546188 4858603.677291, 1662738.746295 4858875.082216, 1663854.522097 4858618.755342, 1664779.309249 4858638.85941)"
    END #FEATURE
    METADATA
      "wms_title" "Test"
      "ows_enable_request" "*"
    END
    LABELCACHE on
#    MINSCALEDENOM 1
#    MAXSCALEDENOM 4000000
    CLASS
      name "aaa"
      STYLE
        COLOR 200 0 0
        OUTLINECOLOR 0 255 0
      END
    LABEL
     TEXT 'BLAH BLAH'
        COLOR 0 85 255
        OUTLINECOLOR 212 0 0
        OUTLINEWIDTH 2
        MINSCALEDENOM 1
        MAXSCALEDENOM 40000
        FONT "LiberationSans-Regular"
        #FONT "Calibri"
        TYPE truetype
        SIZE 9
        ANGLE FOLLOW
        OFFSET 15 99
        POSITION auto
        PRIORITY 10
        MAXOVERLAPANGLE 180.0
        BUFFER 1
        FORCE OFF
        PARTIALS FALSE
        MINDISTANCE 200
    END
    END #CLASS
  END 
#-----
#======
  # End of LAYER DEFINITIONS -------------------------------
  # INCLUDE "layers.inc.map"
END # Map File

@tbonfort tbonfort merged commit 8250fdf into mapserver:master Oct 4, 2013

1 check passed

default The Travis CI build passed
Details
@tbonfort

This comment has been minimized.

Member

tbonfort commented Oct 4, 2013

thanks @aperi2007 . On a side note, all the testing you're doing on the master branch is very helpful, please keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment