Frank Warmerdam wrote:
Rishikant Lal wrote:
Dear Friends,
I have a problem. I am trying to display nearly 10 Million Rows of Point feature on Map Server. I have imported the Data on Post GIS, Created GistIndex and even used Fast CGI. Features Display very quickly without Labels. Problem occurs if I try to label them in Layer definition. Is there a way I can Label Features in MapServer, without affecting the Map Display Speed.

Rishikant,

The literal answer is no, you can't do more work without some impact on
performance.

How many points are you trying to label?

My understanding is that label collision detection in MapServer can get
very expensive when a lot of of labels are candidates for display.  If
you attempt to display an area in which 10000 points appear, it will be
very expensive even if after label collision detection they are weeded
down to a much smaller number.

If this is the issue, then you need to consider ways of restricting the
labelling to more reasonable numbers of points.

Best regards,

Rishikant,

As Frank says label collision detection is very expensive and is close to an O(n*n) problem with respect to the number of candidates. So ideally you want to be able to tag some points that are more important than others or create another layer where you have clustered points in to some smaller number of of cluster points and display that when you are zoomed out and use that until you zoom in enough to spatially filter the points to the map viewport.

If all points have equal display value, then you might add a column and assign a random number between 1 and 10 to each row, then you can filter based on that. To get 10% of the points, "where number=1" or 30% of the points "where number<=3", etc. In index may or may not help.

-Steve W
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to