2

enter image description hereIn my mapfile there is a WMS definition, which shows a circle buffer and it's radius in meters. I offer UTM-Systems and Googles Pseudo Mercator. In UTM and SIZEUNIT meters it works fine. Please, could someone give an advice which fits the best for Pseudo Mercator Projection?

SYMBOLSCALEDENOM 24000
SIZEUNITS meters

CLASS
    NAME 'Test'

    STYLE               
        OUTLINECOLOR 0 0 0
        PATTERN 40 10 END
        WIDTH 1
    END

    STYLE
        GEOMTRANSFORM "centroid"
            COLOR 0 0 0
            SYMBOL "vertline"
            SIZE [radius]
            WIDTH 3
            ANGLE 60
        END         
    END
END

I've tried an Approximation in my POSTGIS SQL-Request: radius / (2*PI()/10) AS r_google this would be enough for me.

How can I tell MAPSERVER which radius to use, when the projection system changes? Is there a Switch-Statement for this?

1

My final solution is a workaround with POSTGIS.

LAYER
    NAME        Radius
    TYPE        LINE
    STATUS      ON
    METADATA
...
    END

    CONNECTIONTYPE PostGIS
    CONNECTION ...

    DATA "geom FROM (SELECT ST_MakeLine(ST_Centroid(geom), ST_PointN(ST_ExteriorRing(geom), 1)) FROM myview) AS foo USING UNIQUE id USING srid=4326"

    SYMBOLSCALEDENOM 24000
    SIZEUNITS meters

    CLASS
        NAME 'Radius'
        MAXSCALEDENOM 24000               

        STYLE               
            OUTLINECOLOR 0 0 0
            PATTERN 40 10 END
            WIDTH 1
        END                     
    END
END

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.