General Layer Operation
General Layer Operation
❖General Layer Operation(1) is a tool available in all our spatial products, it is found in the Tools tab(2) of the spatial pane:
❖This tool is used to perform a general transformation on a layer’s records one by one and create a new layer. You can transform the geometry and even the attributes as needed; for example calculate centroids or extrude by height of an attribute.
❖In this example I will perform a calculate centroids operation on my Sub Places layer(1) which consists of a set of polygons. What this will do is calculate the centroids of these polygons for me and then create a separate layer where these centroids will exist as points:
❖Before opening the tool make sure the correct layer is highlighted in your layer control(1). Then click the tool which will bring up the following dialogue(2):
❖Under Insert Calculation(1) there is a range of predefined calculations that you can choose. In this example I will insert the Centroid calculation. As you can see the calculation is then entered below(2). To check if this operation works I can use the Check button(3) which will tell me if it succeeded or not(4):
❖I can then click OK(1) and the operation will be done for me(2), I am prompted to set the properties for the new layer that will be made(3): My new layer is then added which contains just the centroids of my Sub Places polygons(4) along with all the other attribute data that was in the original layer, as can be seen by viewing the data grid(5):
❖Access Column(1) allows you to add a column in your data, to get values from, in doing an operation. For example I will divide the values in one column by those in another and then assign the result to a another column for which I will make use of Assign Column(2) as well, which allows me to assign values to columns:
❖I start by choosing the column in my data that I would like to assign values to(3)(4) , then within this expression I type in, as the value, the calculation, which requires accessing columns(5)(6)(7)(8):
❖Now that I have entered in my full expression I can go ahead and run this operation and then in the layer data grid of the new layer that was created you can see my Province column has been assigned the values of the calculation that I did(1):
Note: Each time a layer operation is done a new layer will be created with the result of that operation. In this example all the data in the original layer is in the new layer except with the layer operation result as well, which in this case is the quotients of my Total Volume and Store Count columns populated in my Province column.
❖If you only want to do the operation on selected geometries then you would have Selected Geometries(1) ticked on: