Here, we’ll see how to sort features by area and how to remove duplicate features.
Sort features by area
Here is an example of layer I got. The representation is not convenient for printing as small features are partially or totally covered by bigger ones. So, I’d like small features to be on the top.
1-Automatically generate the schema of the shapefile
2-Configure the input shapefile componentIn the shema, choose the one you automatically generated.
3-Create an AREA column with the area of each feature
In the expression, type
GeometryOperation.GETAREA(row1.the_geom)
4-Sort features by areaChoose an ascendant order so that the biggest features will be in the indexed first
5-Generate the output shapefile
Here is an example of output result:
If you aggregate a workspace file with a base file without taking precautions, you could get a layer with duplicate features in it.
In this image we set transparency so as to enhance duplicate fatures.
You’d like to clean up this file, removing the duplicate features.
I’s very simple to accomplish in Talend SDI:
—
Here, we reviewed two very simple operations in Talend SDI, yet very easy to create.
They are very simple to accomplish on a PostgreSQL/PostGIS Database but not very handy on flat files like shapeFiles. In this case, Talend/SDI is very useful.
Here is the link if you wish to download the spatial ETL Talend/SDI:
http://www.spatialdataintegrator.com/