[Mapserver-users] JOIN problem
Rebecca Colwell
colwell at geog.umn.edu
Wed Jul 14 12:33:01 PDT 2004
Hello all,
I appreciate all the input I've received on my problem. I've been
looking into everyone's suggestions, and tried an experiment...
To see if the issue has something to do with the expression or field
name/case, I joined my .dbf to my shapefile, switched the DATA source
under LAYER to the new shapefile and the expression worked like I want
it to. The .dbf is going to be changing over time though, so this work
around is not my favored option.
Any other thoughts on this?
Thanks for all the help,
~Becky
David Fawcett wrote:
> If that doesn't work, you may want to try your field name in all caps.
> e.g. [DISFCHMT_R]
>
> This may have been dealt with many versions ago, but I seem to remember
> that MapServer sometimes wanted field names in all caps.
>
> David.
>
>
>
>
> David J. Fawcett
> MN Office of Environmental Assistance
>
>
>>>>Dylan Keon <keon at nacse.org> 7/14/2004 1:19:34 PM >>>
>
> There is a good explanation of EXPRESSION at
> http://mapserver.gis.umn.edu/doc42/mapfile-reference.html#class
>
> Make sure your attribute name is *exactly* as it appears in the DBF
> file, as they are case sensitive.
>
> Also, it should probably be
> EXPRESSION ([Disfchmt_R] <= .021)
> instead of
> EXPRESSION ('[Disfchmt_R]' <= .021)
> (remove the single quotation marks).
>
> --Dylan
>
>
>
> On 07/14/2004 10:50 AM, Randy James wrote:
>
>>Hi Rebecca
>>
>>I know a bit about regex but there are people on the list
>>that know way more than me so i am forwarding your email to
>>the list. Its a good idea to reply to the list rather than
>>the person who is try to give a bit of advice; that way the
>>whole list can give feedback.
>>
>>Randy
>>
>>--- Rebecca Colwell <colwell at geog.umn.edu> wrote:
>>
>>
>>>Hey Randy,
>>>
>>>I'm struggling to understand how to make things work that
>>>I didn't come
>>>across in the tutorial. Would you mind breaking down the
>>>terms regex
>>>and filter a bit for me, and maybe give me an example of
>>>what you mean?
>>> I'm experiencing that newbie/lost feeling (I've been
>>>trying to figure
>>>this out on my own for the last few days).
>>>
>>>Thanks,
>>>
>>>~Becky
>>>
>>>PS Should I continue sending this dialog to the whole
>>>list or just you?
>>> I'm new with listserv etiquette too.
>>>
>>>Randy James wrote:
>>>
>>>
>>>
>>>>Hi
>>>>
>>>>That it is not a join problem but maybe a regex problem
>>>
>>>or
>>>
>>>
>>>>something else with the filter.
>>>>
>>>>Randy
>>>>
>>>>--- Rebecca Colwell <colwell at geog.umn.edu> wrote: > Hey
>>>>Randy,
>>>>
>>>>
>>>>
>>>>>Yes, it displays my US shapefile when I comment out
>>>
>>>that
>>>
>>>
>>>>>line. What
>>>>>does this tell you?
>>>>>
>>>>>Thanks!
>>>>>
>>>>>~Becky
>>>>>
>>>>>Randy James wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Hi
>>>>>>
>>>>>>Will it work if you do not filter it by 'Disfchmt_R' ?
>>>>>>
>>>>>>Randy
>>>>>>--- Rebecca Colwell <colwell at geog.umn.edu> wrote: >
>>>
>>>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
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list