ArcGIS Data Interoperability Workshop

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

BGSP Workshop:

ArcGIS Data Interoperability

Hands-on Edition
ArcGIS Workshop
Table of Contents
Exercise 1 – Reprojection and Spatial Overlay with FME (15 Minutes) ................................ 2

Exercise 2 – Convert from Raster to Vector (15 Minutes)..................................................... 6

Exercise 3 – Convert Vector Data to Raster (15 Minutes) ...................................................11

Exercise 4 – Updating Databases: Using Change Detection to Set Operation Type (15
Minutes) ...............................................................................................................................17

Exercise 5 – Automating quick conversion tools with ModelBuilder and share as web tool (1
Hours) ..................................................................................................................................24

1
ArcGIS Workshop
Exercise 1 – Reprojection and Spatial Overlay with FME (15 Minutes)
Data comes in all kinds of projections or sometimes it is even missing a projection. This is
where the Reprojector transformer comes in. It transforms data from one coordinate system
to another. When your datasets are in the same coordinate system, they can be overlaid on
top of another. In this exercise, we will take two datasets, each with a different coordinate
system and reproject them into the same one (GDM2000 Peninsular Malaysia). Then write
the output to File Geodatabase.

1. Start ArcGIS Pro and create a new Map project with the following:
Name: Reprojection_date
Location: Leave as default

Once the new map project is created, notice that the default geodatabase is created
under databases on Catalog Pane. On the Catalog pane, expand Databases.

2. Make a folder connection with the data folder. At the Catalog Pane > Right Click
Folders > Add Folder Connection.

3. At the Analysis tab > Data Interoperability > click at Workbench to open a blank
workbench.

2
ArcGIS Workshop

4. Click Open to open the workbench. At the open window, navigate to the workbench
folder and click Open to open the Reprojection workbench.

5. The Reprojection workbench will open.

6. Click Run to run the workbench to create the File Geodatabase and find those license
information that overlay with the land parcel.

3
ArcGIS Workshop

7. Update the symbology to show the license status. Make sure the
BusinessLicenseData is active, click at the Feature Layer > Symbology > Unique
Values.

3
1

8. At Symbology Pane > Field 1: Status.

4
ArcGIS Workshop

5
ArcGIS Workshop
Exercise 2 – Convert from Raster to Vector (15 Minutes)
There are different methods of converting rasters to CAD formats using FME. The method
covered in this article will use the custom PotraceCaller transformer. Potrace is a tool that is
used for tracing bitmaps and creating vectors. In this tutorial, you will take a JPEG screenshot
of a neighbourhood and vectorize the buildings to output an Esri Geodatabase.

1. Start ArcGIS Pro and create a new Map project with the following:
Name: Con_Raster_to_Vector_date
Location: Leave as default

Once the new map project is created, notice that the default geodatabase is created
under databases on Catalog Pane. On the Catalog pane, expand Databases.

2. At the Analysis tab > Data Interoperability > click at Workbench to open a blank
workbench.

Figure 1 : Open Workbench

3. Click New and create a blank workspace.

4. Add a JPEG (Joint Photographic Experts Group) Reader to a blank canvas. Browse
to the osm.jpg dataset available for download from the File(s) section at the top-right
corner of this article.

6
ArcGIS Workshop

5. Inspect the data with the FME Data Inspector (or Visual Preview). Below screenshot of a map
section in Burnaby, BC taken from Open Street Map. You will create polygons from the
building shapes so you will need to determine the color range. Click on any section of any
of the grey building shapes, including the darker border. Looking at the Feature Information
pane, take note of Band 0 (RED8) values while clicking over the building polygons, this will
be the values for the RasterExpressionEvaluator.

6. Back in ArcGIS Data Interoperability, add a RasterExpressionEvaluator to the canvas


and connect it to the PNG feature type. In the parameters, set the Interpretation to
Red8, for the Expression, click the [...] to open the Arithmetic Editor - ‘Raster
Expression’. While inspecting the data we determined that the Value of Red is between
200 and 235 depending on where you put your mouse. But the Red Value of the area
surrounding the building is 240 and up. We need to create an expression that states if
Bands A[0-2] is greater than Red Value 200, but Less than 235, determine that it is a
building, which looks like:
if(A[0]>200&&A[0]<235&&A[1]>200&&A[1]<235&&A[2]>200&&A[2]<235,0,255)

7
ArcGIS Workshop

7. To set NoData for the remainder of the pixels in the image, use the
RasterBandNodataSetter transformer. Set the Nodata Value to 255.

8. Download Potrace and unzip the download file. Then add the PotraceCaller custom
transformer. In the parameters, set the Potrace.exe Location to the location where you
downloaded Potrace, and select the Potrace.exe file. Set the Remove Speckles Up
To, to 500, this will remove the anti-aliasing that occurs in the JPEG to create a truer
vector line.

9. Inspecting the outlines created using the PotraceCaller, the lines are in the correct
area but are very pixelated. To smooth out this pixelization, add a Generalizer
transformer. In the parameters, the Algorithm is set to Douglas (Generalize) by default;
this algorithm removes vertices that cause a deviation of less than the Generalization
Tolerance, but the location of the remaining vertices stay the same. Set the
Generalization Tolerance (>=0) to 10. You can play around with this, the lower the
number the more of the shape is preserved, the higher the number the less of the
shape is preserved. Since most of the buildings are square, a generalization tolerance
of 10 will work, only a couple buildings in the upper right corner will lose their shape.

8
ArcGIS Workshop

10. Add a DWGStyler transformer, set the color to Red. Then enable Areas, and set the
Area Entity Type to MPolygon With Fill Pattern. For the Fill Pattern Name, select the
wide brick pattern, AR-B816.

9
ArcGIS Workshop

11. Add an Esri Geodatabase Writer to the canvas. Name the Dataset OSM.gdb, then in
the parameters, change the Layer Name to Buildings and update the Geometry to
geodb_polygon. Run the translation, view the output OSM.gdb file in ArcGIS Pro to
see the area fill pattern.

10
ArcGIS Workshop
Exercise 3 – Convert Vector Data to Raster (15 Minutes)
In this tutorial, you will learn how to convert vector data into raster using FME transformer. In
this scenario, we want to create a map that shows road closures for an upcoming parade.
We have a vector line dataset which contains the closed roads, and we have a raster
orthophoto of the area of interest.

1. Start ArcGIS Pro and create a new Map project with the following:
Name: Con_Vector_to_Raster_date
Location: Leave as default

Once the new map project is created, notice that the default geodatabase is created
under databases on Catalog Pane. On the Catalog pane, expand Databases.

2. At the Analysis tab > Data Interoperability > click at Workbench to open a blank
workbench.

3. Click Open to open the workbench. At the open window, navigate to the workbench
folder and click Open to open the VectorOnRasterOverlayer-complete workbench.

11
ArcGIS Workshop

This workspace already has the GeoTIFF orthophoto and the RoadClosure Shapefile.
The RoadClosure Shapefile is a vector line, which has been colored red using the
FeatureColorSetter. It also contains many road lines, one for each block, so they have
been combined into one line per StreetName using the LineCombiner transformer.
Finally, the road line is to thin, so it has been buffered to create a thicker line using the
Bufferer transformer. Labels have also been created for each of the closed roads using
the Labeller transformer.

4. Click to add writer to export output as GeoTiff.

5. Follow the below settings:


a. Format: GeoTIFF (Geo-referenced Tagged Image File Format)
b. Dataset: …\RasterToVector\RasterToVector\tiff (can be any name and must be
folder)
c. Raster File Definition: Manual
d. Click OK

12
ArcGIS Workshop

6. At the Feature Type Window, update the Raster File Name as VecToRas and click
OK.

7. Connect the VectorOnRasterOverlayer transformer with the VecToRas transformer.

13
ArcGIS Workshop

8. Once done, click Run to run for the entire workspace.

9. Once finish, go back to ArcGIS Pro and make folder connection with the folder, to
connect with the ….\ RasterToVector and click OK.

14
ArcGIS Workshop

10. Right Click at the tiff folder and select Refresh to refresh the tiff folder.

11. Expand the tiff folder and drag the VecToRas.tiff into Map.

12. Click Yes for the Calculate statistics for VecToRas.tiff.

15
ArcGIS Workshop

13. You may zoom in to inspect the road name to check if update ac expected.

16
ArcGIS Workshop
Exercise 4 – Updating Databases: Using Change Detection to Set
Operation Type (15 Minutes)
In this tutorial, you will learn how to use Change detection transformer to identify differences
between a set of input features. It can also identify features that have not undergone changes
or are unchanged. Change detection is useful when comparing datasets or databases to see
what changes have been implemented in a revised edition.

1. Start ArcGIS Pro and create a new Map project with the following:
Name: Change_Detection_date
Location: Leave as default

Once the new map project is created, notice that the default geodatabase is created
under databases on Catalog Pane. On the Catalog pane, expand Databases.

2. At the Analysis tab > Data Interoperability > click at Workbench to open a blank
workbench.

3. Click New and create a blank workspace.

4. Click to add Esri File Geodatabase reader to the canvas and browse to the
Parks.gdb dataset. Click OK to add the reader to the canvas.

17
ArcGIS Workshop

5. Next, add a MapInfo TAB (MITAB) reader to the canvas and browse to the
ParkUpdates.tab dataset. Click OK to add the reader to the canvas.

There should now be two readers, the public.DowntownParks is the original dataset,
and the ParkUpdates is the updated dataset.

6. Add a ChangeDetector to the canvas and connect the Original input port to the
public.DowntownParks reader feature type and the Revised input port to the
ParksUpdates reader feature type. We will use the ChangeDetector transformer to
determine the changes between the two datasets. The ChangeDetector creates an
attribute called fme_db_operation and based on the output port assigns it a value of

18
ArcGIS Workshop
either UPDATE, INSERT, DELETE or if the feature is unchanged, no attribute is
created.

7. In the parameters, set the Update Detection Key Attributes to parkid. Then set the
Selected Attributes to visitorcount and treecount. Finally, expand Check Geometry and
set Match Geometry to 2D. For this example, the vistorcount and treecount numbers
have been increased.

8. Add a Esri File Geodatabase writer to the canvas and set the connection to
FMETraining. Set the Table Definition to Copy from Reader.

19
ArcGIS Workshop

9. In the Select Feature Type dialog, select public.DowntownParks[Parks


[GEODATABASE_FILE] – 1] as the reader to copy from. Since we are writing to the same
table we are reading from, this method works. If you were writing to a different table that was
not already in the workspace, use the Import from Dataset Table Definition when adding the
reader.

10. Connect the public.DowntownParks writer feature type to the Updated, Inserted, and Deleted
output ports on the ChangeDetector. Do not connect it to the Unchanged output port,
otherwise, duplicate features will be added into the database.

20
ArcGIS Workshop
11. Open the public.DowntownParks writer feature type parameters. Set the Feature
Operation to fme_db_operation and ensure that Table Handling is set to Use Existing.
Set parkid as the Match Column, then click OK.

12. Before running the workspace, inspect the current contents of the DowntownParks
table. Make a note of the visitorcount and treecount fields for several records. This will
ensure that we can compare the results to prove that the update process was
successful.

21
ArcGIS Workshop

14. Once done, click Run to run for the entire workspace.

15. Once finish, go back to ArcGIS Pro and make folder connection with the folder, to
connect with the ….\ ChangeDetection and click OK.

22
ArcGIS Workshop

13. Right Click at the Parks.gdb and select Refresh to refresh the Parks Geodatabase.

14. Expand the Parks Geodatabase and drag the public.DowntownParks feature class
into Map.

16. You may zoom in to inspect the road name to check if update ac expected.

Figure 2 : Final Output

23
ArcGIS Workshop
Exercise 5 – Automating quick conversion tools with ModelBuilder and
share as web tool (1 Hours)
The Data Interoperability quick conversion tools can be used in ModelBuilder and connected
to other geoprocessing tools to automate conversion workflows. You can also share the
ModelBuilder as web tool.

1. Start ArcGIS Pro.

2. Make folder connection with the folder, to connect with the ….\ zoning and click OK.

3. Right-click the zoning folder and click New > Toolbox.

24
ArcGIS Workshop
4. Right-click the toolbox, click Rename, then name it zoning.

5. Right-click the zoning toolbox and click New > Model. ModelBuilder opens. By default,
the model is named Model. You can rename it by right-clicking it in the Catalog window
and clicking Rename from the shortcut menu.

6. Find the Quick Import tool from the Geoprocessing pane and drag it onto the
ModelBuilder canvas.

25
ArcGIS Workshop

7. Double-click Quick Import.

8. Click the Input Dataset browse button.

9. The Specify Data Source dialog box opens.

10. Click the Format browse button. The FME Reader Gallery dialog box opens.

11. Type gml in the Search text box.

12. Click the row listing Geography Markup Language (GML) and click OK. The FME
Reader Gallery dialog box closes.

13. Click the Dataset browse button. The Select File dialog box opens. Navigate to the
zoning folder.

26
ArcGIS Workshop
14. Click the zoning.gml dataset and click Open.

15. The Dataset text box is populated with the path and file name.

16. Click OK. The Specify Data Source dialog box closes.

17. Click OK. The Quick Import dialog box closes and displays the tool in a ready-to-run
state.

18. Use the Select Data tool to select the zoning feature class contained in the
zoning2.gdb geodatabase. Find the Select Data (ModelBuilder) tool from Utilities.

19. Click the Connect button to collect zoning2.gdb with Select Data, then click Input Data
Element on the shortcut menu. The output geodatabase zoning2.gdb is connected as
input to the Select Data tool.

27
ArcGIS Workshop

20. Double-click Select Data and confirm that the Child Data Element text box is set to
zoning. The child data element is the feature class contained in the zoning2.gdb output
geodatabase that will be used as input to the Dissolve tool. Click OK. This will closes
the Select Data dialog box.

21. Find the Dissolve tool from the Geoprocessing pane and drag it onto the ModelBuilder
canvas. Click the Connect button on the toolbar. Click Child data element, click
Dissolve, then click Input Features from the shortcut menu. The output data element
is connected as input to the Dissolve tool.

22. Double-click Dissolve to open the dialog box. Click the Output Feature Class browse
button. The Output Feature Class dialog box opens.

28
ArcGIS Workshop
23. Navigate to the …\zoning folder, type zoning_dissolve in the Name text box, then click
Save. The Output Feature Class dialog box closes and the Output Feature Class text
box is populated with the path and file name. By default, the tool adds the (.shp) file
extension. Click OK. The Dissolve dialog box closes

24. Click Model > Save.

25. Click the Run button. All the tools in a ready-to-run state are executed. Click Close on
the status message when the model finishes executing.

26. On the ModelBuilder canvas, right-click zoning_dissolve.shp and click Add To Display
from the shortcut menu. The results of the tool are displayed in ArcGIS Pro.

29
ArcGIS Workshop

30
ArcGIS Workshop
27. Right click at the Quick Import > Create Variable > From Parameter > Input Dataset.

1 2 3

28. Right at the Input Dataset and select Parameter to set as Parameter.

29. Right at the Output Dataset and select Parameter to set as Parameter.

30. Click Save to save the model.

31. At the Catalog Pane, double click at the Model tool to open the tool.

31
ArcGIS Workshop

32. Click Run to run the tool.

33. At the Analysis tab, click History to open the History pane.

34. Right click at the Model tool, select Share As > Share web tool.

32
ArcGIS Workshop
35. Update the Item Detail to provide information about Name, Summary, Tag, Portal
Folder.

36. At the Configuration tab, check Upload for the Capabilities.

33
ArcGIS Workshop

37. At the Content tab, click at the edit button to update the tool properties.

38. Provide the description to the model, Input Dataset and Output Dataset.

34
ArcGIS Workshop

39. Once done, click Analyze to see if error occur.

35
ArcGIS Workshop

40. If no error, then click Publish to publish the tool.

41. Make sure tool successfully publish.

36
ArcGIS Workshop
42. After the web tool publishes, open the Catalog pane at the portal contents and run
your tool.

37

You might also like