MapServer / MapServer-import

3 stars 2 forks source link

Scale computation has changed from 4.10 to 5.0 #2193

Closed tbonfort closed 12 years ago

tbonfort commented 12 years ago

Reporter: woodbri Date: 2007/08/02 - 15:21 I have found a problem with the MAXSCALE computation in mapserver. This showed up while looking at the AGG code, but might not have anything to do with that per say.

The layer (see below) has the MAXSCALE 4000100.0 but when I request a map at scale=4000000 the cities do not show up.

http://imaptools.com/cgi-bin/mapserv-4.99?mode=map&layers=all&scale=4000000&map=/u/data/maps/google-agg.map&mapxy=-87.65+41.85&map_size=450+350 http://imaptools.com/cgi-bin/mapserv-4.99?mode=map&layers=all&scale=3997555&map=/u/data/maps/google-agg.map&mapxy=-87.65+41.85&map_size=450+350

this one finally works:

http://imaptools.com/cgi-bin/mapserv-4.99?mode=map&layers=all&scale=3997554&map=/u/data/maps/google-agg.map&mapxy=-87.65+41.85&map_size=450+350

This mapfile works fine in 4.10, here is a comparison of 4.10 and trunk with AGG.

http://imaptools.com/maps/compare-maps2.php?loc=2&ll=41.85+-87.65&address=&city=boston&state=ma&zipcode=&country=&asrv=1&amf=%2Fu%2Fdata%2Fmaps%2Fgoogle-aa2.map&msa=mapserv-4.10&bsrv=1&bmf=%2Fu%2Fdata%2Fmaps%2Fgoogle-agg.map&msb=mapserv-4.99&submit=Show

Here is the layer in question:

  LAYER
    NAME "US_Places"
    STATUS DEFAULT
    DATA "us/placenames2"
    TYPE ANNOTATION
    FILTER ([POP] >= 5000)
    MAXSCALE 4000100.0
    CLASSITEM "POP"
    LABELITEM "NAME"
    CLASS
      NAME "Mega Cities"
      EXPRESSION ([POP] > 100000)
      SYMBOL "target-1"
      COLOR 0 0 0
      LABEL
        TYPE TRUETYPE
        FONT "arial-bold"
        SIZE 9
        POSITION AUTO
        BUFFER 5
        COLOR 0 0 0
        OUTLINECOLOR 245 245 231
        #ANTIALIAS TRUE
        PARTIALS FALSE
      END
    END
    CLASS
      NAME "Major Cities"
      EXPRESSION ([POP] >= 25000 && [POP] < 99999)
      SYMBOL "target-2"
      COLOR 0 0 0
      LABEL
        TYPE TRUETYPE
        FONT "arial-bold"
        SIZE 8
        POSITION AUTO
        BUFFER 5
        COLOR 0 0 0
        OUTLINECOLOR 245 245 231
        #ANTIALIAS TRUE
        PARTIALS FALSE
      END
    END
    CLASS
      NAME "Cities"
      EXPRESSION ([POP] >= 5000 && [POP] < 24999)
      SYMBOL "circle"
      COLOR 255 255 255
      OUTLINECOLOR 0 0 0
      SIZE 5
      LABEL
        TYPE TRUETYPE
        FONT "arial-bold"
        SIZE 7
        POSITION AUTO
        BUFFER 5
        COLOR 0 0 0
        OUTLINECOLOR 245 245 231
        #ANTIALIAS TRUE
        PARTIALS FALSE
      END
    END
  END 
tbonfort commented 12 years ago

Author: sdlime Date: 2007/08/08 - 08:06 Steve is this a duplicate of bug 2166? Note that there has been some subtle changes in how mapserver extents are interpreted that could lead to small scale computation changes. If you happened to be right at a certain threshold you might notice. The behavior would be identical for AGG and GD rendering.

Steve

tbonfort commented 12 years ago

Author: woodbri Date: 2007/08/08 - 15:31 I have cc: myself on #2166, but the behavior above is VERY problematic. If you set MINSCALE/MAXSCALE in the mapfile and then request a map at a given scale it MUST render the layers the match that scale and it is NOT doing that.

This will be a major problem for everyone creating mapfiles and especially those that are doing fixed scales like google. I you specify scale it should use that scale the extents can float where ever they want.

tbonfort commented 12 years ago

Author: sdlime Date: 2007/08/08 - 16:35 Duplicate of #2166...