Files
Introduction
To create an empty Esri shapefile that has no date but the schema is set up, you only need a Creator transformer and an Esri Shapefile writer. This method can also be used for other single geometry type formats.
For formats that use template files such as Esri geodatabase or AutoCAD. For information regarding a Geodatabase template file, please see Esri Geodatabase Writer Parameters and Converting to Geodatabase Format. For AutoCAD template files, information can be found in Autodesk Writer Parameters.
Step-By-Step Instructions
1. Add a Creator Transformer
In a blank FME Workbench canvas, add a Creator transformer. Open up the Creator and ensure that the Geometry Object is set to Null. If you are using an older version of FME and the Null option is not available, set the Geometry Object to a different geometry type than what you want the shapefile to contain. For example, you are creating polylines, you would set the Creator to points.
2. Add an Esri Shapefile Writer
Next, add an Esri Shapefile writer to the canvas. Select where you want the file to be saved and then change the Shapefile Definition to Manual. Click OK to add the writer.
In the Feature Type dialog that appears, set the Shapefile Name to what you want to name the file and then change the Geometry to what you want the geometry output type to be.
3. Set Schema
Still in the Feature Type dialog, change to the User Attributes tab. Double-check that the Attribute Definition is set to Manual. Then under Name, create the attribute schema you wish to write out to the shapefile. In this example, we created the attributes: Name, Date, and Area. You can also set up the Type for the attributes. In this example, the attribute types are char, date, and long, respectively.
4. Connect Writer and Run the Workspace
Once the attribute schema is set up, click OK to close the dialog and then connect the writer to the Creator.
Run the workspace and view the output to confirm that the schema was created correctly.
Comments
0 comments
Please sign in to leave a comment.