[mapserver-users] text size from field but with an expression

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Sun Oct 7 15:11:12 PDT 2012


Hi,

This works for sure for me:

DATA "select geometry,osm_id,amenity,aeroway, name from osm_polygon where amenity is not null or aeroway='apron'"

Perhaps you do not need anything else than

DATA "select id,the_geom,field1+10 as field1, field2 from mytable"

-Jukka Rahkonen-

________________________________
Andrea Peri wrote:

> Hi,
> unfortunately using the spatialite DB the sintax you suggest is not allowed.

> It allow

> DATA 'mytable'

> but don't allow

 > DATA "the_geom from (select id,the_geom,field1+10 as field1, field2
from mytable) as foo using unique id using srid=xxx"

> I don't know if this miss is a lack of feature or a bug.

Andrea.


2012/10/4 Andrea Peri <aperi2007 at gmail.com<mailto:aperi2007 at gmail.com>>
ok, thx.

Infact I'm using spatialite db.
So I hope to have success to support this sintax.

Now I'm try.

Thx.





2012/10/4 thomas bonfort <thomas.bonfort at gmail.com<mailto:thomas.bonfort at gmail.com>>
On Thu, Oct 4, 2012 at 10:04 AM, Andrea Peri <aperi2007 at gmail.com<mailto:aperi2007 at gmail.com>> wrote:
> Hi,
> I have a label with the size from a field of attributes.
> But I need to change this size adding always a costant factor.
>
> I need someting like:
>
> LABEL
>   ...
>   SIZE expression([field1]+10)
>   ANGLE [field2]
> END
>
> This seem don't allowed.
>
> Is this right ?
correct. if you are using a db backend, you can let the db do this for you:

DATA "the_geom from (select id,the_geom,field1+10 as field1, field2
from mytable) as foo using unique id using srid=xxx"

>
> Thx,
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------




--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------



More information about the mapserver-users mailing list