[MapServer-users] cluster points

Jaques Tati jaques.tati at gmx.net
Tue Jun 25 22:34:04 PDT 2024


Good morning Jörg,

in a project where i work together with WhereGroup we got a problem with 
CLUSTER styles and MapServer 8.01:

https://github.com/gisinternals/buildsystem/issues/223

Since you're using also PostGIS as a datasource, maybe its worth a look, 
- and the solution mentioned there.

best regards
Stefan H.

Am 25.06.2024 um 15:53 schrieb Jörg Thomsen (WhereGroup) via 
MapServer-users:
> Dear list,
>
> I have a problem with clustering of some points (layer at the end of 
> this mail).
>
> As soon as I insert the block
> CLUSTER
>    MAXDISTANCE 50
>    REGION 'ellipse'
> END
>
> the capabilities-document [1] of the wms ends abrupt with
>>     <sld:GetLegendGraphic>
>>       <Format>image/png</Format>
>>       <Format>im
>
> so I cannot load it to a client.
> getmap/browse-mode [2] works fine.
>
> I don't see the reason, does anyone else do and can tell me?
>
> [1]
> view-source:https://schulung.foss.academy/cgi-bin/mapserv?map=/foss-academy/MSII/cluster_loesung.map&SERVICE=WMS&REQUEST=GetCapabilities 
>
>
> [2]
> https://schulung.foss.academy/cgi-bin/mapserv?map=/foss-academy/MSII/cluster_loesung.map&mode=browse&layer=all&template=OpenLayers 
>
>
> Regards, Jörg
>
>
>
>
>   LAYER
>     NAME 'bushaltestellen'
>     TYPE POINT
>
>     CONNECTIONTYPE postgis
>     CONNECTION "user= password= dbname= host=127.0.0.1 port=5432"
>     DATA "geom from transport_p"
>
>     METADATA
>       'ows_title' 'Bushaltestelen mit Clustering'
>     END
>
>
>     PROJECTION
>      'init=epsg:4326'
>     END
>
>     LABELITEM 'Cluster_FeatureCount'
>     CLASSITEM 'Cluster_FeatureCount'
>
>     CLUSTER
>         MAXDISTANCE 50
>         REGION 'ellipse'
>     END
>
>     CLASS
>        NAME 'einzeln'
>        EXPRESSION ("[Cluster_FeatureCount]" = "1")
>        STYLE
>           SIZE 10
>           SYMBOL "circle"
>           COLOR 150 150 150
>        END
>     END
>
>     CLASS
>        NAME 'cluster'
>        EXPRESSION ("[Cluster_FeatureCount]" != "1")
>        STYLE
>           SIZE 20
>           SYMBOL "circle"
>           COLOR 0 0 255
>        END
>        LABEL
>             FONT 'arial'
>             COLOR 255 255 255
>             TYPE truetype
>             SIZE 9
>        END
>     END
>
>    END
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list