Timeout with REQUIRES

Abe Gillespie agillesp at VT.EDU
Tue Dec 28 10:52:41 PST 2004


Sure thing.  I've include the mapfile below; I'll do some debugging
soon.

Thanks.
-Abe

MAP
  NAME "Ashe"
  STATUS on
  EXTENT 1190000 913200 1340000 1045550
  SIZE 100 100
  SHAPEPATH "../data/"
  IMAGETYPE png
  IMAGECOLOR 255 255 255
  FONTSET "../../ms_data/fonts/fonts.txt"
  SYMBOLSET "./symbols.sym"
  UNITS feet

  WEB
   IMAGEPATH "../ms_data/images/"
   IMAGEURL "/ms_data/images/"
        METADATA
     id_layers "Buildings,Parcels,Roads"
        always_id_layers "Voting Districts,Fire Zones,Townships"
     addr_layer "Buildings"
     parcel_layer "Parcels"
   END
  END

  QUERYMAP
   STYLE HILITE
   COLOR 219 196 0
  END

  # This layer protects our custom yellow items from changing color.
  LAYER
   NAME "measure_hilite_color"
   STATUS DEFAULT
   TYPE point
   TRANSFORM false
   FEATURE
    POINTS
     1 1
    END
   END
   CLASS
    COLOR 219 196 0
   END
  END

  LAYER
   NAME "annotation"
   STATUS ON
   TRANSFORM false
   TYPE ANNOTATION
   POSTLABELCACHE true
   CLASS
    LABEL
     TYPE TRUETYPE
     FONT arial
     SIZE 10
     POSITION cr
     COLOR 0 0 0
     OUTLINECOLOR 255 255 255
    END
   END
  END

  LAYER
   NAME "custom_solid_line"
   STATUS ON
   TYPE LINE
   POSTLABELCACHE true
   CLASS
        SYMBOL "solid"
     COLOR 219 196 0
        SIZE 2
   END
  END

  LAYER
   NAME "custom_dashed_line"
   STATUS ON
   TYPE LINE
   POSTLABELCACHE true
   CLASS
        SYMBOL "dashed"
     COLOR 219 196 0
        SIZE 2
   END
  END

  SCALEBAR
   STATUS embed
   STYLE 1
   INTERVALS 2
   SIZE 100 5
   COLOR 0 0 0
   BACKGROUNDCOLOR 255 255 255
   OUTLINECOLOR 0 0 0
   UNITS miles
   POSITION lr
   TRANSPARENT false
   STYLE 0
   LABEL
    SIZE tiny
    COLOR 0 0 0
   END
   POSTLABELCACHE true
  END

  LEGEND
   KEYSIZE 18 12
   STATUS ON
   IMAGECOLOR 255 255 255
   LABEL
    TYPE bitmap
    SIZE medium
    COLOR 0 0 89
   END
  END

  REFERENCE
   IMAGE "../images/keymap.gif"
   EXTENT 1190000 913200 1340000 1045550
   STATUS ON
   COLOR -1 -1 -1
   OUTLINECOLOR 255 255 0
   SIZE 100 80
  END

  LAYER
   NAME "County"
   STATUS ON
   DATA "ashecl"
   TYPE POLYGON
   CLASS
    NAME "parcels off"
    COLOR 126 143 155
    OUTLINECOLOR 102 102 102
    MINSCALE 20000
   END
   CLASS
    NAME "parcels on"
    COLOR 255 255 255
    OUTLINECOLOR 102 102 102
    MAXSCALE 20000
   END
   GROUP "Overlays"
  END

  LAYER
   NAME "Fire Zones"
   STATUS OFF
   DATA "firezon"
   TYPE polygon
   TOLERANCE 3
        CLASSITEM "NAME"
        CLASS
    COLOR 255 36 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Pond Mtn"
   END
        CLASS
    COLOR 255 72 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Creston"
   END
        CLASS
    COLOR 255 96 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Todd"
   END
        CLASS
    COLOR 255 114 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Deep Gap"
   END
        CLASS
    COLOR 255 132 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Glendale Springs"
   END
        CLASS
    COLOR 255 150 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Fleetwood"
   END
        CLASS
    COLOR 255 180 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Glendale Springs"
   END
        CLASS
    COLOR 255 198 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Warrensville"
   END
        CLASS
    COLOR 255 216 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "All"
   END
        CLASS
    COLOR 255 240 0
    OUTLINECOLOR 151 21 0
    EXPRESSION "Lansing"
   END
        CLASS
    COLOR 249 255 83
    OUTLINECOLOR 151 21 0
    EXPRESSION "Lansing"
   END
        CLASS
    COLOR 234 247 203
    OUTLINECOLOR 151 21 0
    EXPRESSION "Lansing"
   END
        CLASS
    COLOR 227 240 250
    OUTLINECOLOR 151 21 0
    EXPRESSION "Lansing"
   END
   GROUP "Overlays"
   TEMPLATE "x"
   TOLERANCE 3
   METADATA
    id_fields "NAME"
    id_aliases ""
   END
  END

  LAYER
   NAME "Townships"
   STATUS off
   DATA "ashets"
   TYPE polygon
   TOLERANCE 3
   CLASSITEM "TWNSHIP_NO"
   CLASS
    COLOR 40 141 190
    EXPRESSION "2"
   END
   CLASS
    COLOR 33 172 223
    EXPRESSION "3"
   END
   CLASS
    COLOR 131 210 241
    EXPRESSION "4"
   END
        CLASS
    COLOR 28 146 171
    EXPRESSION "5"
   END
        CLASS
    COLOR 72 158 186
    EXPRESSION "6"
   END
        CLASS
    COLOR 81 178 228
    EXPRESSION "7"
   END
        CLASS
    COLOR 69 204 252
    EXPRESSION "8"
   END
        CLASS
    COLOR 132 190 236
    EXPRESSION "9"
   END
        CLASS
    COLOR 58 186 215
    EXPRESSION "10"
   END
        CLASS
    COLOR 93 156 190
    EXPRESSION "11"
   END
        CLASS
    COLOR 96 208 234
    EXPRESSION "12"
   END
        CLASS
    COLOR 94 181 213
    EXPRESSION "13"
   END
        CLASS
    COLOR 30 156 193
    EXPRESSION "14"
   END
        CLASS
    COLOR 31 168 186
    EXPRESSION "15"
   END
        CLASS
    COLOR 78 180 203
    EXPRESSION "16"
   END
        CLASS
    COLOR 112 161 203
    EXPRESSION "17"
   END
        CLASS
    COLOR 80 151 199
    EXPRESSION "18"
   END
        CLASS
    COLOR 109 203 249
    EXPRESSION "19"
   END
        CLASS
    COLOR 55 203 217
    EXPRESSION "20"
   END
   GROUP "Overlays"
   TEMPLATE "x"
   METADATA
    id_fields "TWNSHIP_NA"
    id_aliases ""
   END
  END

  LAYER
   NAME "Voting Districts"
   STATUS off
   DATA "voting districtsd"
   TYPE polygon
   TOLERANCE 3
   CLASSITEM "TWNSHIP_NO"
   CLASS
    COLOR 125 162 197
    EXPRESSION "0"
   END
   CLASS
    COLOR 130 146 178
    EXPRESSION "2"
   END
   CLASS
    COLOR 128 153 180
    EXPRESSION "3"
   END
        CLASS
    COLOR 255 178 178
    EXPRESSION "4"
   END
        CLASS
    COLOR 125 162 197
    EXPRESSION "5"
   END
        CLASS
    COLOR 165 192 227
    EXPRESSION "6"
   END
        CLASS
    COLOR 166 206 229
    EXPRESSION "7"
   END
        CLASS
    COLOR 170 175 188
    EXPRESSION "8"
   END
        CLASS
    COLOR 174 194 204
    EXPRESSION "9"
   END
        CLASS
    COLOR 146 189 225
    EXPRESSION "10"
   END
        CLASS
    COLOR 128 153 180
    EXPRESSION "11"
   END
        CLASS
    COLOR 131 157 211
    EXPRESSION "12"
   END
        CLASS
    COLOR 173 192 215
    EXPRESSION "13"
   END
        CLASS
    COLOR 135 164 205
    EXPRESSION "14"
   END
        CLASS
    COLOR 155 185 202
    EXPRESSION "15"
   END
        CLASS
    COLOR 197 208 216
    EXPRESSION "16"
   END
        CLASS
    COLOR 154 170 196
    EXPRESSION "17"
   END
        CLASS
    COLOR 132 177 204
    EXPRESSION "19"
   END
   GROUP "Overlays"
   TEMPLATE "x"
   TOLERANCE 3
   METADATA
    id_fields "TWNSHIP_NA"
    id_aliases ""
   END
  END

  LAYER
   NAME "City Limits"
   STATUS ON
   DATA "citylimits"
   TYPE polygon
        MAXSCALE 200000
   UNITS FEET
   CLASS
    COLOR 170 203 179
    OUTLINECOLOR 68 171 95
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Farm Preservation"
   STATUS on
   DATA "farmpres"
   TYPE polygon
   MAXSCALE 200000
   UNITS FEET
   CLASS
    COLOR 126 199 0
    BACKGROUNDCOLOR 126 199 0
    OUTLINECOLOR 62 98 0
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Flood Zone"
   STATUS ON
   DATA "flood_zo"
   TYPE polygon
   MAXSCALE 300000
   UNITS FEET
   CLASS
    COLOR 68 126 171
    OUTLINECOLOR 11 57 92
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Flood Way"
   STATUS ON
   DATA "floodwy"
   TYPE polygon
   MAXSCALE 300000
   UNITS FEET
   CLASS
    COLOR 132 174 147
    BACKGROUNDCOLOR 132 174 147
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Flood Elevation"
   STATUS ON
   DATA "flood_el"
   TYPE line
   UNITS FEET
   MAXSCALE 20000
   CLASS
    COLOR 68 155 255
    TEXT ([ELEVATION]')
    LABEL
     TYPE TRUETYPE
     FONT arial
     SIZE 8
     POSITION cc
     COLOR 0 0 0
     ANGLE auto
     MINFEATURESIZE 1
    END
   END
   REQUIRES "([Flood Zone] = 1)"
  END

  LAYER
   NAME "Parcels"
   STATUS ON
   DATA "parcels"
   TYPE POLYGON
   MAXSCALE 20000
   CLASS
    OUTLINECOLOR 33 201 18
    LABEL
     COLOR 0 0 0
     OUTLINECOLOR 255 255 255
     TYPE TRUETYPE
     FONT arial
     SIZE 9
     ANTIALIAS true
     POSITION cc
     PARTIALS false
     MINDISTANCE 300
     BUFFER 4
    END
   END
   TEMPLATE "x"
   TOLERANCE 3
   METADATA
    owner_field "OWNERS_NAM"
    parcel_id_field "ACAD_TEXT"
    id_fields
"OWNERS_NAM,ADDRESS_2,CITY,STATE,ZIP,ACAD_TEXT,LOTS_ACRES,DEED_ACRES,BLD
G_VAL,LAND_VAL,DEED_BOOK,DEED_PAGE,PLAT_BOOK,PLAT_PAGE,GPIN,TRANSFER_D"
    id_aliases "Owner,Address,City,State,Zip,Parcel ID,Lots Acres,Deed
Acres,Bldg Value,Total Value,Deed Book,Deed Page,Plat Book,Plat
Page,Gpin,Xfer Date"
    search_fields "ACAD_TEXT,OWNERS_NAM,ADDRESS_2,CITY,STATE,ZIP"
    search_aliases "Parcel ID,Owner,Address,City,State,Zip"
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Water"
   STATUS ON
   DATA "water"
   TYPE LINE
        MAXSCALE 300000
   CLASS
    NAME "main"
    COLOR 56 166 186
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Roado"
   STATUS ON
   DATA "roado"
   TYPE LINE
        MAXSCALE 18000
   UNITS FEET
   CLASS
    COLOR 255 10 0
   END
   REQUIRES "([Roads] = 1)"
  END

  LAYER
   NAME "Roads"
   STATUS ON
   DATA "roads"
   TYPE LINE
   MAXSCALE 100000
   UNITS FEET
   LABELITEM "NAME"
   LABELMAXSCALE 20000
   CLASS
    COLOR 168 7 0
    OUTLINECOLOR 102 102 102
    LABEL
     MINDISTANCE 200
     MINFEATURESIZE auto
     TYPE truetype
     FONT arial
     ANTIALIAS true
     MINSIZE 8
     MAXSIZE 9
     ANGLE auto
     POSITION auto
     COLOR 0 0 0
     OUTLINECOLOR 255 255 255
     BUFFER 3
    END
   END
   TEMPLATE "x"
   TOLERANCE 3
   METADATA
    search_fields "NAME"
    search_aliases ""
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Buildings"
   STATUS ON
   DATA "bldg1"
   TYPE polygon
   MAXSCALE 15000
   UNITS FEET
   LABELITEM "ADDRESS"
   LABELCACHE on
   LABELMAXSCALE 6000
   CLASS
    COLOR 220 149 146
    OUTLINECOLOR 190 95 96
    LABEL
     MINFEATURESIZE 12
     TYPE truetype
     FONT arial
     ANTIALIAS true
     ANGLE auto
     POSITION cc
     COLOR 0 0 0
        OUTLINECOLOR 255 255 255
     BUFFER 3
     SIZE 8
    END
   END
   TOLERANCE 3
   TEMPLATE "x"
   METADATA
    search_field "FULLADDR"
    search_fields "FULLADDR"
    search_aliases "Address"
   END
   GROUP "Layers"
  END

  LAYER
   NAME "Buildings 0"
   STATUS ON
   DATA "bldg0"
   TYPE polygon
   MAXSCALE 15000
   UNITS FEET
   CLASS
    COLOR 168 168 168
    OUTLINECOLOR 97 97 97
   END
   REQUIRES "([Buildings] = 1)"
  END

  LAYER
   NAME "Taxgrid"
   STATUS ON
   DATA "Taxgrid"
   TYPE polygon
   UNITS FEET
        MINSCALE 6000
   CLASS
    OUTLINECOLOR 158 167 120
   END
   GROUP "Layers"
  END
END

On Dec 27, 2004, at 8:06 PM, Steve Lime wrote:

> Oh, also post the entire mapfile if you would...
>
>>>> Abe Gillespie <agillesp at VT.EDU> 12/27/04 4:41 PM >>>
> Uh, no, that shouldn't be a problem.  If it was, the whole map file
> wouldn't parse correctly.  That single quote just adds a "feet"
> designation to the elevation measurement.  In fact, if I remove the
> "Buildings 0" layer completely, everything runs fine.
>
> -Abe
>
> On Dec 27, 2004, at 5:05 PM, Ethan Alpert wrote:
>
>> Look at the TEXT label for the Flood Elevation layer.
>>
>> TEXT ([ELEVATION]')
>>
>> You're missing a '
>>
>> I've had all kinds of problems before when I miss a " or '
>>
>> -e
>>
>> -----Original Message-----
>> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
>> On
>> Behalf Of Abe Gillespie
>> Sent: Monday, December 27, 2004 3:22 PM
>> To: MAPSERVER-USERS at LISTS.UMN.EDU
>> Subject: [UMN_MAPSERVER-USERS] Timeout with REQUIRES
>>
>>
>> I have two layers that look like this:
>>
>>   LAYER
>>    NAME "Flood Zone"
>>    STATUS ON
>>    DATA "flood_zo"
>>    TYPE polygon
>>    MAXSCALE 300000
>>    UNITS FEET
>>    CLASS
>>     COLOR 68 126 171
>>     OUTLINECOLOR 11 57 92
>>    END
>>    GROUP "Layers"
>>   END
>>
>>   LAYER
>>    NAME "Flood Elevation"
>>    STATUS ON
>>    DATA "flood_el"
>>    TYPE line
>>    UNITS FEET
>>    MAXSCALE 20000
>>    CLASS
>>     COLOR 68 155 255
>>     TEXT ([ELEVATION]')
>>     LABEL
>>      TYPE TRUETYPE
>>      FONT arial
>>      SIZE 8
>>      POSITION cc
>>      COLOR 0 0 0
>>      ANGLE auto
>>      MINFEATURESIZE 1
>>     END
>>    END
>>    REQUIRES "([Flood Zone] = 1)"
>>   END
>>
>> Notice the "REQUIRES" tag.  These two layers cause no problems.
>> However,
>> I also have these two layers further in the map file:
>>
>>   LAYER
>>    NAME "Buildings"
>>    STATUS ON
>>    DATA "bldg1"
>>    TYPE polygon
>>    MAXSCALE 15000
>>    UNITS FEET
>>    LABELITEM "ADDRESS"
>>    LABELCACHE on
>>    LABELMAXSCALE 6000
>>    CLASS
>>     COLOR 220 149 146
>>     OUTLINECOLOR 190 95 96
>>     LABEL
>>      MINFEATURESIZE 12
>>      TYPE truetype
>>      FONT arial
>>      ANTIALIAS true
>>      ANGLE auto
>>      POSITION cc
>>      COLOR 0 0 0
>>         OUTLINECOLOR 255 255 255
>>      BUFFER 3
>>      SIZE 8
>>     END
>>    END
>>    TOLERANCE 3
>>    TEMPLATE "x"
>>    METADATA
>>     search_field "FULLADDR"
>>     search_fields "FULLADDR"
>>     search_aliases "Address"
>>    END
>>    GROUP "Layers"
>>   END
>>
>>   LAYER
>>    NAME "Buildings 0"
>>    STATUS ON
>>    DATA "bldg0"
>>    TYPE polygon
>>    MAXSCALE 15000
>>    UNITS FEET
>>    CLASS
>>     COLOR 168 168 168
>>     OUTLINECOLOR 97 97 97
>>    END
>>    REQUIRES "([Buildings] = 1)"
>>   END
>>
>> With the "Buildings 0" layer, if I include the "REQUIRES" tag
> MapServer
>> will timeout.  If I remove the "REQUIRES" tag everything runs
> smoothly.
>>   I'm using PHP Mapscript 4.4.1.  Before I upgraded (I think it was
>> Mapscript 4.0) this worked fine.  So something has changed between
> then
>> and now with the "REQUIRES" algorithm.
>>
>> Any ideas?
>>
>> Thanks.
>> -Abe
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 13718 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041228/8cc0e65c/attachment.bin>


More information about the MapServer-users mailing list