One way is to implement a matrix filtering algorithm that takes all the adjacent sites to a central site. A specific logic must be applied, such as averaging. If the sites are expressed as (x, y, z), where {x, y} denotes 2-D location, and {z} some fundamental and unique property measured at a site, then the logic acts on {z}. This is the basis of image reduction (filtering). Thus, a higher definition image can be reduced in size by trading-off quality. Octave (which is a Matlab clone, and 100% free) is pretty good at image manipulation. I suggest that you represent your 50000 sites as the vector array {x, y, z} and then apply a specific filter algorithm. The array of vectors becomes a matrix. The result will also be a vector array (a new matrix) of your arbitrary size e.g. 5000.