I've published a new version of apply_grid() http://cobalt.rmnet.it/~san/postgis/apply_grid/ This version reduces more points then the previous removing consecutive coincident segments. If you give it a try, please let me know your opinions. The package contains usage tips for mapserver. --strk;