The attached pdf gives examples of how to use the somewhat hidden recfunctions module which is buried in the depths of NumPy. To make a long story short... it facilitates working with tabular data: This includes adding and removing fields etc etc.
When combined with:
NumPy , you have an incredible set of tools to perform operations and calculations on geometry and attribute data.
The example in the attached document outlines the process of converting a shapefile's table to a structured array. From there, two new fields are added to contain the results of a radial sort of points about a determined center point within the point data set. The other field contains the results of the distance to the center point from each individual point.
What could this be used for? Well, in conjunction with numpy array functions...a lot. Here are some of the things I have dabbled with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.