join with dbf file

Fischer, Brian bfischer at HOUSTONENGINEERINGINC.COM
Sun May 13 21:21:42 EDT 2007


Hi Rich,

Thanks for the reply.  Everything is working fine for the "Parcel
Selected" class.  The problem I am having is in the "Multi-Interest
Parcel" class.  The parcels represent properties like condos where there
are multiple owners associated with one polygon.  I have a table that
relates to those polygons and would like to display all the owners in
the query template using a one-to-many join.  When I do an nquery on one
of those multi-owner polygons, it returns attributes from the data
source in the layer, but nothing from the join .dbf file.  

Just wondering if any one else has tried to only use the one-to-many
join where you only want it to join for one class in your layer.  Maybe
this is not possible and I should try to separate these two classes into
separate layers?

Thanks,
Brian

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Richard Greenwood
Sent: Sunday, May 13, 2007 4:57 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] join with dbf file

I don't totally follow what you are doing. Do you want a map with
multiple parcels highlited? If so, try putting the
"multi_parcel_selected.html" template in the  HEADER instead of the
TEMPLATE. This will group all parcels into one map, as opposed to
using the TEMPLATE, which will return a separate map for each parcel.

Rich

On 5/8/07, Fischer, Brian <bfischer at houstonengineeringinc.com> wrote:
>
>
> I am trying to do a one-to-many join to a .dbf file and am not getting
the
> results I want.  I was wondering if anyone has had a similar problem.
I
> keep getting back one record with the my join table field not being
> replaced.  If I remove the template from the class object I don't get
any
> features returned.  Do I have the join defined incorrectly?  Here is
what my
> layer definition looks like and my HTML template.
>
> LAYER # Dummy Parcels Polygon Layer to Highlight it yellow
>     NAME parcel_query
>     DATA parcels
>     MAXSCALE 50000
>     MINSCALE 500
>     STATUS DEFAULT
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     JOIN
>         FROM "PIN"
>         NAME "MULTI"
>         TABLE
> "E:\mapdata\douglas_mn\LUT_MULTI_INTEREST.DBF"
>         TEMPLATE "multi_parcel_selected.html"
>         TO "MI_PIN"
>         TYPE ONE-TO-MANY
>     END
>     TYPE POLYGON
>     CLASSITEM 'CODE'
>     CLASS
>         NAME "Parcel Selected"
>         EXPRESSION "1"
>         TEMPLATE "parcel_selected.html"
>         SYMBOL 'plainline'
>         COLOR -1 -1 -1
>         OUTLINECOLOR 255 255 0
>         SIZE 4
>     END
>     CLASS
>           NAME "Multi-Interest Parcel"
>           EXPRESSION "3"
>           TEMPLATE "multi_parcel_selected.html"
>           SYMBOL 'plainline'
>           COLOR -1 -1 -1
>           OUTLINECOLOR 255 255 0
>           SIZE 4
>     END
>   END
>
>
> HTML Query Template:
> <tr>
> <td colspan="2">This is a multi interest property.</td>
> </tr>
> <tr>
> <td>PIN:</td>
> <td><a
>
href='javascript:openwin("parceldetail","../parcelform.php?pin=[MULTI_PI
N]")'>[MULTI_PIN]</a></td>
> </tr>
> <td colspan="2"><hr></td>
>
> Thanks,
> Brian
>
> Brian Fischer, CFM
> GIS Project Manager
> Houston Engineering, Inc. | Leave Nothing to ChanceTM
> 6901 East Fish Lake Road, Suite 140
> Maple Grove, MN 55369
> Phone:  763.493.4522 / Fax:  763.493.5572
> Email:  bfischer at houstonengineeringinc.com
> Website: www.houstonengineeringinc.com
>


-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the mapserver-users mailing list