Load Polygon & Multi Polygon data using Workflow
Overview
You may have data of mixed geometry that you wish to load into PostGreSQL so you need to determine the best Geometry Type in order for all the records to load or else split the dataset by Geometry Type. For example if you had mixed Polygon and Multi Polygon data you would choose to import the data as Multi Polygon. If you don't force the Geometry Type and OGR detects that this dataset holds Polygon data, then all of the Multi Polygon entries will fail to import. It is also a good idea, with mixed geometry datasets in particular, to know if certain records in a dataset have not loaded properly.Â
As iShare basically only supports a single Geometry Type for a Layer so, if you had imported multiple Geometry Types into PostGreSQL (e.g. geometrycollection), you would need to filter your Standard Layer by Geometry Type when adding the Layer in Studio.Â
Step-by-step guide
- In order to load the data you create a Workflow Spatial Data Transformation Task and under the Options there is the Force Geometry check box.Â
- This defaults to blank i.e. OGR checks the first record in the dataset and sets the Geometry Type accordingly. If this happens to be Polygon then all of the Multi Polygon entries will fail to import. If you tick the box you can then choose the best Geometry Type for your dataset, in this case Multi Polygon.
- If you want to receive email notification if records fail to load then you will need to untick the Skip Failures check box which is ticked by default.
- If you run the Job /Task and the data fails to load you can check the iShare logs where you will see something similar to:
Warning 1: Geometry to be inserted is of type Multi Polygon, whereas the layer geometry type is Polygon. Insertion is likely to fail
- If the Task is run as part of a Scheduled Workflow Job, and the data fails to load, an email will be sent to the email address configured under Workflow Notification Setup. Also If Tasks within a Scheduled Workflow Job are configured as dependent on each other then the Job would fail at the relevant Task.