[mapserver-dev] CONNECTIONTYPE UNION with STYLEITEM AUTO still not working in 6.0.0-rc2 (and possible solution)

Jana Golinowski jgolinowski at codematix.de
Tue May 10 03:47:46 EDT 2011


> Could you provide the mapfile which doesn't work for you?

The source layers are styled with values from database (icon, heading, length). 
They are displaying correctly. Looking into MS_ERRORFILE I can see MapServer 
requesting the items for styling and labeling. But the union layer appears to be 
empty because those items are not requested.

After changing 'SYMBOL [icon]' to 'SYMBOL 
"symbol/ais/ship_no_heading_black_3.png"' (for example in layer 
"ais_notmoving_noheading") the union layer isn't "empty" anymore. But that's not 
what I need here.

I just tested this with the current trunk (rev 11665) with the same result. But 
as I said before I may have misunderstood something.

Greetings, Jana.


---

MS_ERRORFILE extract when displaying a source layer:
...
msPostGISBuildSQLItems: 2 items requested.
...
msPostGISLayerNextShape called.
msPostGISReadShape called.
msPostGISReadShape: PQgetlength = 38
msPostGISReadShape: [icon] "symbol/ais/ship_no_heading_black_3.png"
msPostGISReadShape: PQgetlength = 9
msPostGISReadShape: [feature_of_interest_id] "211215680"
msPostGISReadShape: Setting shape->index = 3433260
msPostGISReadShape: Setting shape->resultindex = 1
msPostGISReadShape: [index] 3433260
msPostGISReadShape: [shape] POINT (8.9474133333333334 52.3004283333333362)
...
MS_ERRORFILE extract when displaying a source layer:
...
msPostGISBuildSQLItems: 0 items requested.
...
msPostGISLayerNextShape called.
msPostGISReadShape called.
msPostGISReadShape: Setting shape->index = 3433260
msPostGISReadShape: Setting shape->resultindex = 1
msPostGISReadShape: [index] 3433260
msPostGISReadShape: [shape] POINT (8.9474133333333334 52.3004283333333362)
...

---

The extract from the mapfile:

   LAYER
     NAME "ais_notmoving_union"
     STATUS ON
     CLASS
     END
     # hidden block DATASOURCE
     TYPE POINT
     CONNECTION "ais_notmoving_noheading,ais_notmoving_shape"
     CONNECTIONTYPE UNION
     # end hidden block
     TOLERANCE 0
     DEBUG 5
     GROUP "AIS_union"
     PROJECTION
       "init=epsg:4326"
     END
     PROCESSING 
"ITEMS=feature_of_interest_id,feature_of_interest_name,outline,icon,length,heading,sog,cog"
     STYLEITEM "AUTO"
   END
   LAYER
     NAME "ais_notmoving_noheading"
     STATUS OFF
     CLASS
       STYLE
         SYMBOL [icon]
         SIZE 20
       END
       LABEL
         SIZE SMALL
         TYPE BITMAP
         COLOR 0 0 0
       END
       NAME "ais_notmoving_noheading"
       TEXT "Test: not moving, no heading [feature_of_interest_id]"
     END
     # hidden block DATASOURCE
     DATA "geom from ais_sos.wfs_view"
     TYPE POINT
     CONNECTION "dbname=jweb_ais_dev user=postgres host=localhost port=5432"
     CONNECTIONTYPE POSTGIS
     # end hidden block
     PROJECTION
       "init=epsg:4326"
     END
     FILTER "(geom_velocity is null or sog is null or sog <= 0) and astext(geom) 
!= 'GEOMETRYCOLLECTION EMPTY' and heading is null"
     DEBUG 5
     GROUP "AIS_union_source_notmoving"
   END
   LAYER
     NAME "ais_notmoving_shape"
     STATUS OFF
     CLASS
       STYLE
         SYMBOL [icon]
         SIZE [length]
         ANGLE [heading]
       END
       LABEL
         SIZE SMALL
         TYPE BITMAP
         COLOR 0 0 0
       END
       NAME "ais_notmoving_shape"
       TEXT "Test: not moving, shape [feature_of_interest_id]"
     END
     # hidden block DATASOURCE
     DATA "geom from ais_sos.wfs_view"
     TYPE POINT
     CONNECTION "dbname=jweb_ais_dev user=postgres host=localhost port=5432"
     CONNECTIONTYPE POSTGIS
     # end hidden block
     DEBUG 5
     FILTER "(geom_velocity is null or sog is null or sog <= 0) and astext(geom) 
!= 'GEOMETRYCOLLECTION EMPTY' and heading is not null and length is not null and 
length > 0"
     PROJECTION
       "init=epsg:4326"
     END
     GROUP "AIS_union_source_notmoving"
     SYMBOLSCALEDENOM 3000
   END



More information about the mapserver-dev mailing list