mutually exclusive layers in shp2img?

Webb Sprague webb.sprague at GMAIL.COM
Wed Oct 17 22:32:08 PDT 2007


Could someone tell me why I can't get both triangles airports AND my
"random polys" to display in the same map?  If I want to see my
random_polys I have to leave out the "-l airports_nearby" in the
command.

I can send pictures if necessary, but will hold off for now.

Thx

Command:

shp2img -m or_mapfile.map -l counties -l random_polys -l
airports_nearby  -o random_polys.jpg -e $SMALL_AREA_EXTENT

Mapfile:

MAP

        NAME ORCounties
        SIZE 1200 1200
        IMAGECOLOR 180 180 250
        IMAGETYPE PNG
        UNITS FEET

        EXTENT 183000 88000    2346000 1676000  # Derived from bbox of
collect of all the counties
        #POLYGON((464233.4375 1145386.125,
        #               464233.4375 1481634,1014976.6875
1481634,1014976.6875 1145386.125,464233.4375 1145386.125))
        #EXTENT 460000 1140000      1016000 1483000   # 4 Portland
counties bbox plus

        FONTSET "./fonts.list"

        WEB
                IMAGEPATH "/tmp/"
                IMAGEURL "/tmp/"
        END

        SYMBOL
          NAME "triangle"
          TYPE vector
          POINTS
                0 4
                2 0
                4 4
                0 4
          END
        END

        LAYER
                NAME "counties"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from counties"  #Note - a space before
the end quote messes everything up
                STATUS DEFAULT
                TYPE POLYGON
                TRANSPARENCY 25
                LABELITEM "county_nam"
                CLASS
                        OUTLINECOLOR 1 1 1
                        COLOR 205 92 82
                        LABEL
                                COLOR 1 1 1
                                TYPE TRUETYPE
                                SIZE 10
                                FONT "arial3"
                        END
                END
        END


        LAYER
                NAME "collected_counties"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from collected_counties"  #Note - a
space before the end quote messes everything up
                TYPE POLYGON
                TRANSPARENCY 50
                CLASS
                        OUTLINECOLOR 0 0 0
                        COLOR 205 205 205
                END
        END


    LAYER
                NAME "random_polys"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from random_polys"
                TYPE POLYGON
                TRANSPARENCY 50
                CLASS
                        OUTLINECOLOR 1 1 1
                        COLOR 205 205 205
                END #end class
        END # end layer


        LAYER
                NAME "airports"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from airports_view"
                TYPE POINT
                LABELITEM "name"
                LABELCACHE ON
                CLASS
                        NAME "LocationSymbol"
                        SYMBOL "triangle"
                        COLOR 20 20 20

                   LABEL
                                COLOR 1 1 1
                                TYPE TRUETYPE
                                SIZE 8
                                FONT "arial3"
                                POSITION cc
                                ANGLE AUTO
                                PARTIALS FALSE
                        END #end label
                END #end class
        END # end layer

        LAYER
                NAME "airports_nearby"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from airports_nearby"
                TYPE POINT
                LABELITEM "name"
                LABELCACHE ON
                CLASS
                        NAME "LocationSymbol"
                        SYMBOL "triangle"
                        COLOR 20 90 80
                   LABEL
                                COLOR 1 1 1
                                TYPE TRUETYPE
                                SIZE 8
                                FONT "arial3"
                                #POSITION cc
                                #ANGLE AUTO
                                #PARTIALS FALSE
                        END #end label
                END #end class
        END # end layer


        LAYER
                NAME "hwys"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from hwys2006"
                TYPE LINE
                CLASS
                        COLOR 100 100 82
                        MINSIZE 4
                END
        END

        LAYER
                NAME "shiptracks"
                CONNECTIONTYPE postgis
                CONNECTION "user=wsprague dbname=or_gis host=localhost"
                DATA "the_geom from shiptracks"
                TYPE LINE
                CLASS
                        COLOR 100 100 82
                        MINSIZE 4
                END
        END



More information about the MapServer-users mailing list