Mapserver and SDE, one trivial question, one informational question

Farber, Saul (ENV) Saul.Farber at STATE.MA.US
Mon Mar 14 12:39:37 PST 2005


Hello Mapserver Gurus,

First off, thanks much for such a wonderful project.  You guys are truly
making some incredible software and it's exciting to know that this
level of experience is helping so many people.

Two questions.

1)  I have the following .map file:

MAP
        DEBUG ON
        CONFIG PROJ_LIB ../mapserver-bundle-4.4.1/proj-4.4.9/share/proj
        NAME test
        STATUS on
        UNITS meters
        EXTENT 221593.91942230912 882446.3536074255 253829.55453864884
914171.7844269598
        SIZE 800 600


        WEB
                IMAGEPATH "/tmp/"
                IMAGEURL "/tmp/"
                LOG "/tmp/mapserver.log"
        END

        LAYER   
                CONNECTIONTYPE sde
                CONNECTION "localhost,port:5151,xxx,xxx,xxx"
                DATA "MYLAYER_ARC,shape"
                DEBUG ON
                NAME roads
                FILTER "where ADMIN_TYPE is not NULL"
                STATUS on
                TYPE line
                CLASS   
                        DEBUG ON
                        NAME "Roads"
                        COLOR 10 10 10
                        SYMBOL 1
                END
        END
END


The point of this layer is to classify roads with an admin_type of 1
(hence the filter) into many different thematic classes.  Some in red,
some in blue, some in black, etc.

I have tried many different EXPRESSION lines in the CLASS section.  Here
are some examples:
EXPRESSION "[ADMIN_TYPE] = 1"
EXPRESSION "'[ADMIN_TYPE]' = 1"
EXPRESSION "'[ADMIN_TYPE]' = '1'"
EXPRESSION "'[ADMIN_TYPE]' eq 1"
EXPRESSION "'[ADMIN_TYPE]' eq '1'"
EXPRESSION "'[ADMIN_TYPE]' IN '1'"
EXPRESSION "'[ADMIN_TYPE]' LIKE '%1%'"

Etc.

I've tried all the combinations of attribute name and quotes/operators I
can think of.  I've tried the attribute name fully qualified, partially
qualified and unqualified (as above).

In all cases, I get a completely blank map, as though no features are
selected by the expression.  Any hints on what I should be putting in
for the expression?  Are Expressions supported in SDE layers?



2)  Completely unrelated to the first question: how does mapserver
handle Database connections (SDE in particular) with regards to
scalability?

Are new DB connections created every time that a map request is sent?
Are database connections pooled in any way?  Are the different layers in
a map request rendered sequentially, or in parallel?


Thanks once again for a great project.

--saul


GIS Web Services
MassGIS - Executive Office of Environmental Affairs

251 Causeway Street
5th Floor
Boston, MA  02114
617-626-1145 



More information about the MapServer-users mailing list