[MS4W-Users] Problem using a feature attribute from an OGR file

Gillis, Allan Allan.Gillis at drdc-rddc.gc.ca
Fri Mar 17 06:37:38 EDT 2017


Hi Lars,

               Thanks for the example… unfortunately it still isn’t working for me, but it appears that using an expression for TEXT might be a problem.  Every time I try that I get an internal server error.

-Allan

From: lars.schylberg at blixtmail.se [mailto:lars.schylberg at blixtmail.se]
Sent: March 16, 2017 4:05 PM
To: ms4w-users at lists.ms4w.com
Cc: Gillis, Allan
Subject: Re: [MS4W-Users] Problem using a feature attribute from an OGR file

Hi,

Here is my way to do it.  This example only show two classes.  I usally have many more depending of chart level.
The example also shows two ways to write the DATA statement.  With filter or sql.
It is usually very important when reading S57 to only select the geometry that You are dispayinig in the class.

Have fun /

Lars Schylberg
----

    CONNECTIONTYPE OGR
    CONNECTION "{DATA_PATH}"
    ## DATA "SELECT VALDCO FROM DEPCNT WHERE OGR_GEOMETRY='LINESTRING'"
    DATA DEPCNT
    PROCESSING "NATIVE_FILTER=PRIM=2" #  Select only linestrings
    PROCESSING "CLOSE_CONNECTION=DEFER"
    PROCESSING "LABEL_NO_CLIP=ON"
    CLASS
        NAME "Depth Contour"
        EXPRESSION ([VALDCO] = 10)
        STYLE
            COLOR "#525A5C""
            WIDTH 1.0
        END
        LABEL
            COLOR "#070707"
            TYPE TRUETYPE
            FONT sc
            SIZE 7
            POSITION CC
            PARTIALS FALSE
            MINDISTANCE 50
            ANGLE FOLLOW
            TEXT (round([VALDCO], 0.1))
       END
    END
    CLASS
        EXPRESSION ([VALDCO] = 20)
        STYLE
            COLOR "#525A5C"
            WIDTH 0.8
        END
        LABEL
            COLOR "#070707"
            TYPE TRUETYPE
            FONT sc
            SIZE 7
            POSITION CC
            PARTIALS FALSE
            MINDISTANCE 50
            ANGLE FOLLOW
            TEXT (round([VALDCO], 0.1))
       END



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/mailman/private/ms4w-users/attachments/20170317/24996ba2/attachment.html>


More information about the MS4W-Users mailing list