Fwd: Re: [Mapserver-users] Fw: help on mygis

Lowell Filak lfilak at MEDINACO.ORG
Fri Aug 6 05:32:21 PDT 2004


The following message was sent by "pablo" <pablo_schmitt_ at hotmail.com>
on Thu, 5 Aug 2004 19:35:15 -0300.

> So, we have done a couple of interesting things using only mapserver
> functionality, but our DATA SQL statement has remained simple. ppose that
> the name of the road is stored in another table (for whatever reason)
and we
> need to do a join to get it and label our roads.
>
> LAYER
>
> CONNECTION "user=theuser password=thepass dbname=thedb host=theserver"
>
> DATA "the_geom FROM (SELECT roads.oid AS oid, roads.the_geom AS the_geom,
> road_names.name as name
>
> FROM roads LEFT JOIN road_names ON roads.road_name_id =
> road_names.road_name_id) AS named_roads
>
> USING UNIQUE oid USING SRID=-1"
>
> MAXSCALE 20000
>
> STATUS ON
>
> TYPE ANNOTATION
>
> LABELITEM name
>
> CLASS
>
> LABEL
>
> ANGLE auto
>
> SIZE 8
>
> COLOR 0 192 0
>
> TYPE truetype
>
> FONT arial
>
> END
>
> END
>
> END
>
> HOW TO MAKE IN MYGIS ?
>
> ----- Original Message -----
> From: "Lowell Filak" <lfilak at medinaco.org>
> To: "pablo" <pablo_schmitt_ at hotmail.com>
> Sent: Monday, August 02, 2004 10:36 AM
> Subject: Re: [Mapserver-users] Fw: help on mygis
>
>
> > Unfortunately the new list server doesn't appear to be working, however
> > you need to submit this to the list. I only have limited knowledge of
> > what your trying to accomplish. My original suggestion was to combine
> > all your attributes into a single MySQL table so you could work on the
> > labelling issues without the added complexity of relating two tables in
> > MySQL.
> >
> > HTH
> >
> > Lowell
> >
> > The following message was sent by "pablo" <pablo_schmitt_ at hotmail.com>
> > on Fri, 30 Jul 2004 18:00:33 -0300.
> >
> > > Hello again,
> > >
> > > This is a piece of my MAP FILE :
> > >
> > > LAYER
> > >     NAME "grupos2002"
> > >     STATUS ON
> > >     CONNECTIONTYPE mygis
> > >     CONECTION "localhost:gisusr:gis:gisdb:bin:"
> > >     DATA "geometry from grupos2002 feature, grupos2002_bin geometry"
> > >
> > >     CLASS
> > >         NAME "Zona Geo"
> > >         OUTLINECOLOR 60 60 60
> > >         COLOR 255 255 0
> > >         SYMBOL 0
> > >     END
> > > END
> > >
> > > LAYER
> > >     STATUS ON
> > >     CONNECTIONTYPE mygis
> > >     CONECTION "localhost:gisusr:gis:gisdb:bin:"
> > >     DATA ????????????????????????????????
> > >     TYPE ANNOTATION
> > >     LABELITEM ??????????????????????
> > >     CLASS
> > >         ANGLE AUTO
> > >         SIZE 8
> > >         COLOR 0 192 0
> > >         TYPE TRUETYPE
> > >         FONT ARIAL
> > >     END
> > > END
> > >
> > > I have a table zonas with the following fields:
> > > 1- f_Zona ( olso located in grupos2002 )
> > > 2- Description
> > > 3- Atributos
> > >
> > > Questions :
> > >
> > > - What do I have to do to link the f_zona field (Zonas Table) to
f_zona
> > > (Grupos2002 table)?. I need to use Description field (Zonas table) as
> > label
> > > of the LAYER ANNOTATION.
> > >
> > > - I don't know how to make the query that map server needs to link or
> join
> > > the data of  my zona table with the data of the map.
> > >
> > > - How should i write this query ?
> > >
> > > - Could I use a custom query to get the geometric data of  grupos2002,
> > > grupos2002.bin?
> > >     DATA "geometry from grupos2002 feature, grupos2002_bin
> > geometry"---- >>>
> > > Is it posible to write this in ANSI query( select xxx from xxx where
> > > ..etc.) ? Example please!!!
> > >
> > > - Do I need more extra fields in the zonas table to get this work
well?
> > >
> > > thank you very much!!!
> > > Pablo
> > >
> > >
> > > ----- Original Message -----
> > > From: "Lowell Filak" <lfilak at medinaco.org>
> > > To: "pablo_schmitt_" <pablo_schmitt_ at hotmail.com>;
> > > <mapserver-users at lists.gis.umn.edu>
> > > Sent: Thursday, July 29, 2004 11:09 AM
> > > Subject: Re: [Mapserver-users] Fw: help on mygis
> > >
> > >
> > > > I don't know mygis but as a quick fix you could join all the
> attributes
> > > > into the first layer so there is no relate required to do the
> > labelling.?
> > > >
> > > > Lowell
> > > >
> > > > The following message was sent by "pablo_schmitt_"
> > > > <pablo_schmitt_ at hotmail.com> on Thu, 29 Jul 2004 09:47:43 -0300.
> > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: pablo_schmitt_
> > > > > To: mapserver-users at lists.gis.umn.edu
> > > > > Sent: Wednesday, July 28, 2004 6:59 PM
> > > > > Subject: help on mygis
> > > > >
> > > > >
> > > > > hello friends
> > > > > i need some help from you
> > > > >
> > > > > this is a brief description of my problem:
> > > > >
> > > > > i have a grupos2002.shp file uploaded into mysql using the
> > > > shp2mysql.lp, > and it is working properly
> > > > >
> > > > > this script generated the following tables geometry_columns,
> > > > grupos2002, > grupos2002_bin, grupos2002_num
> > > > > , spatial_ref_sys
> > > > >
> > > > > in the map file i have this definition for the connection and
data:
> > > > > CONNECTION "localhost:gisusr:gis:gisdb:bin:"
> > > > > DATA "geometry from grupos2002 feature, grupos2002_bin geometry"
> > > > > and it is working fine
> > > > >
> > > > > my problem is:
> > > > > i have a table zonas with the following fields:
> > > > > 1- f_Zona ( olso located in grupos2002 )
> > > > > 2- Description
> > > > > 3- Atributos
> > > > >
> > > > > so, i need to use the field number 2 ( Description) as Label
in the
> > > > map > and i need to apply some filters using the field number
> > > > > 3 (Atributos).
> > > > >
> > > > > THE BIG CUESTION IS: how should i contruct my DATA definition
in the
> > > > map > file ????
> > > > >
> > > > > i hope you could understand me
> > > > >
> > > > > thank you very much
> > > > > by
> > > > >
> > > > > pablo schmitt
> > > > > municipalidad de malvinas argentinas
> > > > > dep. informática
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> >
> >



More information about the MapServer-users mailing list