problem with MapServer WMS -T using polygon shapefiles

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Mon Mar 19 19:29:26 EDT 2007


Hi There,

  comments inline

Peter Shrock wrote:
> Hello, all:
> 
> I have been trying to get WMS time series working with MapServer. I used point
> shapefiles and it worked well. But I cannot get MapServer work with polygon
> shapefiles.
> 
>    LAYER
>   	NAME "timemap"
>   	TYPE POLYGON 
>   	STATUS ON
>   	METADATA
>         	"wms_title" "timemap"
>      		"wms_timeformat" "YYYYMMDD"
>   		"wms_timeextent" "20021130/20061130"
>         	"wms_timeitem" "TIMES"
>         	"wms_timedefault" "20021130"
>         	"wms_srs" "EPSG:4326"
>       	END
>       	TILEINDEX "index1.shp"
>       	TILEITEM  "Location"
> 
>     	CLASSITEM "color_code"
>     	CLASS
>     	NAME  "TYPE 1"
>       		EXPRESSION ([color_code]==1)
>       		COLOR      220 120 130
>         		OUTLINECOLOR 150 150 150
>     	END
> 
>     	CLASS
>     	NAME  "TYPE 2"
>       		EXPRESSION ([color_code]==2)
>       		COLOR      255 255 155
>         		OUTLINECOLOR 150 150 150
>     	END
> 
>     	CLASS
>     	NAME  "TYPE 3"
>       		EXPRESSION ([color_code]==0)
>       		COLOR      200 200 200
>         		OUTLINECOLOR 100 100 100
>     	END
>     END
> 
> 
> index1 polygon shapefile was created using tile4ms, its data is: 
> 
> Location        DATETIME
> times\year2002     20021130
> times\year2003     20031130
> times\year2004     20041130
> times\year2005     20051130
> times\year2006     20061130
> 
> error message: msDrawMap(): Image handling error. Failed to draw layer named
> 'timemap'. msDBFGetItemIndex(): DBASE file error. Item 'TIMES' not found.
> 
> It seems that MapServer tried to find the "TIMES" field from the yearly
> shapefiles. But TIMES field only exists in the tile index polygon shapefile. 
> 
The wms time value is converted and set on the FILTER parameter of the 
layer. In your case, the Filter is set on the tileindex layer 
(timestamp). From the description you gave, the value of the 
"wms_timeitem" would have to be "DATETIME". If set like this, the wms 
request time=20021130 would have the effect of selecting your 2002 
yearly file.

> Could anyone help me to make WMS time series working using polygon shapefile
> data with MapServer? or is this a MapServer Bug? 
> 

  Is your setting using points similar to what you have described here ? 
I am not sure how you wms/point layers are setup but in theory there 
should not be a difference between a point and polygon layers.


Later,

> I also tried seperating index layer and data layer, and it did not work either.
> 
> Thanks
> 
> Peter
> 
> 
> 
> 
>  
> ____________________________________________________________________________________
> Expecting? Get great news right away with email Auto-Check. 
> Try the Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list