STYLEITEM with postgis datasource (via OGR)

Lionel Bargeot l.bargeot at EDUCAGRI.FR
Wed Feb 9 11:56:49 EST 2005


Hi all,

I would like to use STYLITEM with a PostGIS datasource. As explained in
documentation, I have to use an OGR CONNECTIONTYPE, and I have to define
my CONNECTION with right PG ogr driver parameters. The DATA definition
is little different but it works well and I don't see any difference.

I would like to use a field in my database to define object's style on
the map, or to build this field on the fly.

My map file looks like something like this :

LAYER
        CONNECTIONTYPE OGR
        NAME "villes"
        CONNECTION "PG:dbname=form user=... password=... host=127.0.0.1
port=5432"
        DATA "select oid,
lower(nom_comm) as nom,
'BRUSH(fc:\#ff0000,id:mapinfo-sym-35)' as Style,
buffer(the_geom,2500) as the_geom from ville
where population > 5"
       STYLEITEM "style"  # AUTO looks for Style
       .....
END

I inspire myself with an ogrinfo output on a TAB file to produce the
line with the BRUSH definition. The query works well with the usual psql
interpreter. I added symbolset definition to my own symbol file to be
sure to have those symbol definitions in my symbolset.

But all the results I obtain are blank maps with labels :-(

Do you know if there is a possibility (or not) about this idea to work a
day ?

Regards,

Lionel



More information about the mapserver-users mailing list