This article will help you expand your first project with attribute based geometry styles, filters and the possibility to export data to different data formats.
- Latest version of Professional or Ultimate edition of the desktop product
- Configured location of the project store to save your project file
- File based data sources (GeoPackage and ESRI Shapefile)
Download the sample project and data
- Completed the first article, creating your first project
Step 1: Configuring the geometry style based on an attribute
We already gave the E_MV_Map_Cables a solid black colour style, but you can also style objects based on their attributes by adding a classification.
The classification choices depend on the field types as configured in the business collection.
The values in the records are automatically calculated and grouped accordingly when you press ‘calculate’.
Lookup Groups can be configured and styled, with additional groups and values if needed. Additional classifications can also be built upon each other to create a hierarchy style in the style configuration.
After we styled the municipalities with a transparent color, we have an overview of the map, looking at the municipality “Zwolle” where the cables are located. Some cables are located outside of Zwolle though.
Step 2: Adding data filters
In order to see the amount of cables that are located in the municipality of Zwolle, we can do a statistics check. Afterwards we can add some filters and expression in the business collection to modify our data if needed.
The collection statistics will show that 93,5% of the cables is located in the municipality of Zwolle.
If you want to further analyse this selection, and not all cables from the data source, you will need to filter it in the business collection.
In the municipality lookup table, a filter is set on ‘Gemeentena’= ’Zwolle’. Only 1 record will be found in the municipality dataset with that value.
In the business collection table, a filter is set on Municipality with the operator ‘Has A Value’.
Now only cables which have the attribute ‘Zwolle’ in their ‘municipality’ table field will be looked up and selected in the business collection.
Filtering in Business Collections
Any filters or expressions set in the business collection are only applicable for that specific business collection. The source data is never actually changed.
When you browse the collection, you will only see the objects that are passed by the filter.
On the map, only cables interacting with the municipality Zwolle will be displayed now. Likewise, the filters in the business collection can be set to get the opposite selection of cables (only cables outside the municipality ‘Zwolle’)
Instead of the builder mode, which is suited for quick lookup selections, the editor mode is shown above. The editor mode allows you to make more advanced filters and calculations. You can also first use the builder mode, and then switch to editor mode to see how the builder is translated in editor mode.
You can add or edit fields using the editor mode. If you right click on the business collection and use “Add field using Expression”, the editor mode opens.
Suggestions and additional expressions will be shown automatically when you start typing, so you don’t need to know exactly what to type in the editor.
For now, we will add a buffer of 1 meter to the cables, which is a multi polygon type; the field type is decided automatically, based on the output type of the expression. You can also use these newly created polygons for further (spatial) analysis in the business collection.
Step 3: Exporting your data
There are multiple ways of exporting your data, either from the result list, or from the the export option in the menu.
If you browse a collection, you can immediately export the results, as either the whole result list or only the selection (which is 1, selected in blue, in the example above).
The available formats to export to are shown in the drop-down menu. The choices depend on your business collection and source collections that are added in the project file.
For example, a business collecton without any geometry, cannot be exported to a shapefile. And you can only export to a SQL Server database, when there is a SQL connection available as feature source.
You can choose to export the entire business collection, or only the data shown on the current map extent. More dialog options will appear to further specify the export options.
See the video tutorial: