[Mapserver-users] JOIN problem

Rebecca Colwell colwell at geog.umn.edu
Wed Jul 14 11:40:02 EDT 2004


Hi,

I'm trying to work through building one of my first .map files, and have 
hit a wall.  I can't seem to figure out how to do a one-to-one join.  I 
keep getting the error messages:

msDrawMap(): Image handling error. Failed to draw layer named 'states'.
msDBFGetItemIndex(): DBASE file error. Item 'Disfchmt_R' not found.

I triple checked the .dbf I'm trying to join, and that is the name of 
the attribute field I want to access.

Below is my short bit of code so far.  I would be so thankful if anyone 
could guide me in the right direction on how to get it to work.

~Becky


MAP
   IMAGETYPE      PNG24
   EXTENT         -2153561.581984760 4847233.565621579 2641846.236294404 
-6178805.564371807
   SIZE           800 500
   SHAPEPATH      "data"
   IMAGECOLOR     203 201 226

   PROJECTION
     "proj=laea"
     "ellps=clrk66"
     "lat_0=45"
     "lon_0=-100"
   END

   # Start of LAYER DEFINITIONS 
---------------------------------------------
   LAYER # States polygon layer begins here
     NAME         states
     DATA         STATES
     STATUS       DEFAULT
     TYPE         POLYGON

     PROJECTION
       "init=epsg:4326"
     END

     JOIN
     	NAME 	"Felon Ethnicity"
	TABLE	"data/FelonEthnicity.dbf"
	FROM 	"STATE_NAME"
	TO 	"STATE"
     	TYPE 	single
     END #Join

     CLASS
	NAME "<21%"
	EXPRESSION ('[Disfchmt_R]' <= .021)
	COLOR 242 240 247
	OUTLINECOLOR 200 200 200
       COLOR        232 232 232
       OUTLINECOLOR 32 32 32
     END

   END # States polygon layer ends here
   # End of LAYER DEFINITIONS -------------------------------

END # end of map file/object





More information about the mapserver-users mailing list