postgis

Rodrigo Martín LÓPEZ GREGORIO rodrigomartin at LOPEZGREGORIO.COM.AR
Thu Jun 14 14:50:33 EDT 2007


Hi Giuseppe. About the EXPRESSION in CLASS element problem I just try
several alternatives. I give you the ones that actually works ;)


   - EXPRESSION (([ID_specie_att] = 1) or ([ID_specie_att] = 2))

you can make more complex combinations of conditions using logical
connectors (and, or, not) and parenthesis


   - EXPRESSION ([ID_specie_att] in "2,3,5,8")

in this case you must enumerate the values of ID_specie_att that must be
included in the CLASS. If the ID_specie_att is numeric then this is the way
to use this expression... however if ID_specie_att is a string you must use
EXPRESSION ('[ID_specie_att]' in "String 1,another string").


   - EXPRESSION (([ID_specie_att] > 20) and ([ID_specie_att] < 80))

if you have a range of posible values and want to make it simpler you can
use something like that. Actually this is not much different than the first
example but I put it here anyway.

About the problem with the overlapped points you can force the label to be
displayed in map using the FORCE TRUE expression in LABEL element. However
the two labels will overlap and maybe you'll not be able to read anything. I
have made some tests but could not be able to get the labels not overlaped.
Sorry about that.

Rodrigo.

On 6/14/07, Giuseppe Molinario <g.molinario at gmail.com> wrote:
>
> Erensto thanks for the reply,
>
> I am using postgresql 8.2.3.1, and Postgis 1.2.1.1
>
> whereas my app was working fine before, i needed to try and see how
> mapserver would deal with two "identical" points in the database.... well it
> pretty much stops working when that layer is on now.
>
> about the classes.
>
> i simply need a postgis layer to have two classes, these need to contain
> more that one expression value - not dynamically. example
>
> layer x
>
> class 1
> EXPRESSION ([ID_specie_att]=2) and also EXPRESSION ([ID_specie_att]=3) and
> EXPRESSION ([ID_specie_att]=4)
>
> class 2
> EXPRESSION ([ID_specie_att]=5)EXPRESSION ([ID_specie_att]=6)EXPRESSION
> ([ID_specie_att]=7)
>
> i cant seem to get my head around a syntax to tell the EXPRESSION that it
> is actually a list of values.
>
>
> Thanks for the help,
>
> Giuseppe
>
> On 6/14/07, Ernesto Vega <ernesvega at gmail.com> wrote:
> >
> > Giuseppe :
> >
> > I´ve never been into the situation of having 2 points overlapped.
> >
> > For a better idea is useful to send which versions of postgresql and
> > postgis your are using.
> >
> > For the class question:
> >
> > Are you planning to dynamically change your parameter ?
> >
> > If so, you must read the chapter dedicated on how to use parameters on
> > mapserver site, otherwise you may have no choice because of what you
> > want to alter within a class
> >
> > hope this helps.
> >
> > Ernesto Vega
> >
> > On 6/14/07, Giuseppe Molinario <g.molinario at gmail.com> wrote:
> > > Hi everyone,
> > >
> > > I am working with a postgis point table that needs to be displayed in
> > a
> > > mapserver application (pmapper).
> > >
> > > my problems:
> > >
> > > 1. what happens when two points are in the same exact location? ( the
> > rows
> > > in my table can sometimes have the identical lat long coordinates and
> > > therefore geometry column.)
> > >
> > > how can i set the mapfile to show me both points and labels? is this
> > ever
> > > possible? I realize this is a bit of werid question, but i am not
> > asking
> > > about topology...just nuts and bolt postgis/mapfile....
> > > the query tool does not respond anymore. seems like having two
> > identical
> > > points prevents the query tool from working
> > > this all worked prior to me having "overlapping" points2. different
> > > question. Layer>class in mapfile: I have an EXPRESSION object that
> > goes like
> > > this  EXPRESSION ([ID_specie_att]=2) now how do i get the SAME class
> > to
> > > display both points that have value 2,3,4,5,6? Do i really have to
> > make 5
> > > different classes? I would rather not because i don't want them in my
> > > legend.
> > >
> > >
> > > thanks very much for any help.
> > >
> > > Giuseppe
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070614/2e2378ce/attachment.html


More information about the mapserver-users mailing list