How can I label a Point using different postgis table
Aaron Koning
aaronkoning at GMAIL.COM
Mon Jun 19 13:24:07 PDT 2006
I believe you have two options here:
1. Create a database view that joins the two tables and set your DATA
variable to that view.
OR
2. Modify the DATA variable to include a JOIN statement.
Aaron
On 6/19/06, Luis Treviño Huerta <ltrevino at gpobsi.com.mx> wrote:
>
> Hi list:
>
> I'm currenttly using a point layer that displays some GPS points that are
> stored on a postgis table called "loca". I'd like to label this points
> with
> data that comes from another table in the same postgis data base (this
> table
> is named "autos"), both tables share a common column named "idunit" and I
> would like to use autos.idunit as a label. How can I do this?. This is
> part
> of my map file:
>
> LAYER
> NAME gis
> STATUS ON
> TYPE POINT
> UNITS METERS
>
> DEBUG ON
> CONNECTION "user=XXX password=XXXXX dbname=bsiubica host=XXX.XXX.XXX.XX
> port=5432"
> CONNECTIONTYPE postgis
> DATA "posicion from loca as foo using unique cmpoid using srid=4326"
>
> PROJECTION
> "proj=longlat"
> "ellps=WGS84"
> "datum=WGS84"
> END
>
> FILTER 'idunit = %unid%'
>
> CLASS
> EXPRESSION ('[mo]' = '1')
> COLOR 255 255 26 #amarillo
> SYMBOL 7
> SIZE 13
> END
> END
>
> regards,
> Luis
>
--
+--------------------------------------------
| Aaron Koning
| Information Technologist
| Prince George, BC, Canada.
+--------------------------------------------
| http://datashare.gis.unbc.ca/fist/
| http://datashare.gis.unbc.ca/gctp-js/
+--------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060619/bbfe49fe/attachment.htm>
More information about the MapServer-users
mailing list