Skip to content
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

Tolerance is not working as expected #5173

Closed
murdav opened this issue Oct 1, 2015 · 1 comment
Closed

Tolerance is not working as expected #5173

murdav opened this issue Oct 1, 2015 · 1 comment

Comments

@murdav
Copy link

murdav commented Oct 1, 2015

My question is linked to #5120.
Briefly I have some troubles with TOLERANCE and MAXSCALEDENOM for a point layer.

Part of the Mapfile:

EXTENT -20026376.39 -20048966.10 20026376.39 20048966.10  # https://epsg.io/3857
UNITS meters
SIZE 400 300
FONTSET "fonts/msfontset.txt"
RESOLUTION 72
DEFRESOLUTION 72
MAXSIZE 6144

PROJECTION
    "init=epsg:3857"
END

**
*

LAYER
    NAME "Layer1"
    METADATA
        "wms_title" ""
        "wms_abstract" ""
        "wms_group_title" "Static"
        "wms_bbox_extended" "true"
    END
    GROUP "Static"
    TYPE point
    DATA data_layer  #(.shp)
    PROJECTION
        "init=epsg:4326"
    END
    PROCESSING "LABEL_NO_CLIP=True"
    STATUS off
    TEMPLATE void
    LABELITEM "NAME"
    LABELCACHE off
    SYMBOLSCALEDENOM 10000000
    TOLERANCE 0.5
    TOLERANCEUNITS pixels
    CLASSITEM "TYPE"
    CLASS
        NAME "Lake"
        EXPRESSION ('[TYPE]'='lake')
        STYLE
            COLOR 0 51 153
            OUTLINECOLOR 0 0 153
            OUTLINEWIDTH 2
            SYMBOL 'lake'
            MINSIZE 10
            SIZE 14
            MAXSIZE 19
            MINWIDTH 1
            MAXWIDTH 2
        END
        LABEL
            MAXSCALEDENOM 10000000
            POSITION auto
            COLOR 0 51 153
            OUTLINECOLOR 255 255 255
            OUTLINEWIDTH 2
            FONT verdana
            TYPE truetype
            MINSIZE 6
            SIZE 8
            MAXSIZE 10
            # ANTIALIAS true
            BUFFER 8
            MINDISTANCE 20  # Minimum distance between duplicate labels. Given in pixels.
            PARTIALS false
        END
    END
    CLASS
        NAME "Reservoir"
        EXPRESSION ('[TYPE]'='reservoir')
        STYLE
            COLOR 0 153 255
            OUTLINECOLOR 51 102 204
            OUTLINEWIDTH 1
            SYMBOL 'reservoir'
            MINSIZE 10
            SIZE 14
            MAXSIZE 19
            MINWIDTH 1
            MAXWIDTH 2
        END
        LABEL
            MAXSCALEDENOM 10000000
            POSITION auto
            COLOR 0 153 255
            OUTLINECOLOR 255 255 255
            OUTLINEWIDTH 2
            FONT verdana
            TYPE truetype
            MINSIZE 5
            SIZE 8
            MAXSIZE 12
            # ANTIALIAS true
            BUFFER 8
            MINDISTANCE 20  # Minimum distance between duplicate labels. Given in pixels.
            PARTIALS false
        END
    END
END

If I use:

TOLERANCE 0
TOLERANCEUNITS pixels

queryByPoint never returns MS_SUCCESS.

If I use:

TOLERANCE 0.5
TOLERANCEUNITS pixels

I have more than 500 kilometers of tolerance (distance around the selected point) and queryByPoint returns always True.

If I use the default:

# TOLERANCE 0.5
# TOLERANCEUNITS pixels

I have more than 1000 kilometers of tolerance.

Any idea?

D

@jratike80
Copy link

Closing without trying to re-produce. I am sure that tolerance works as expected for some users with maxscaledenom. Refresh the ticket with a re-producible test case for MS 7.x or 8.x if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants