This Study Group discusses importing inventory maps from GIS into an Assisi inventory. Topics are:
1. Exporting from QGIS
2. Importing Into Assisi
3. Update Polygons in Other Yearly Inventories
Step 1. Exporting From QGIS
QGIS is a popular open source GIS program: https://qgis.org/. QGIS can do quite a lot and is well supported by the user community. It is available for Windows, Mac and Linux. This is how I export layers to KML through QGIS.
Exporting a Stands Layer from QGIS
Required Layer Attributes
The critical piece of the KML file is that its attributes contain the primary key fields for the layer type being exported. In the case of exporting a stands layer, the attributes needed are UNIT and STAND. If trees are exported, the attributes would be UNIT, STAND, CRUISE, PLOT and TREE. Attribute names are case insensitive.
UNIT is Optional
The UNIT attribute is not required, because it can be set during import. However, if you are importing GIS features for many units, then including a UNIT attribute allows you to set the unit name in the GIS rather than after stands have been imported.
CRUISE is Optional
The CRUISE attribute is also optional because you can set cruise names during import as well. However, if your cruise names are specific to each cruise as they might be if they reflect the cruise year, then you may want to include CRUISE as well. Or you can edit the cruise names after import.
Matching Inventory Stands to GIS Stands
Many times a layer will use a different concept for stand names. It is common to use township, range, section and number (TRSN) inside forest inventories, but these might be cumbersome to maintain in a GIS and often times only a stand number is used.
Assisi allows GIS Layer polygons to be matched to existing inventory stands using any of the attribute fields. If an entire stand name is not available in GIS but another field can be uniquely matched to inventory stands, then that field can be used for matching. For example, a stand number.
Stand Name Attribute
When a layer is imported, the stand name will be taken from one of the attributes. The stand name attribute can be different than the stand matching attribute but, stands must be unique within a unit. Whatever attribute is used for stand name, it must be unique within each unit and unique within the stand layer. If the stand layer contains more than one unit, the UNIT attribute should be exported and the stand name attribute be unique within each unit.
The best approach is to use a single attribute called STAND in the GIS and set its values to the same values used in the Assisi inventory. Keep the two synchronized. Yes, this means using TRSN in the GIS if that is what you use in Assisi, but it will go a long way to making updates from GIS and mapping between the two easy.
Exported KML Filenames Must be Stands, Plots, Trees or Sites .kml
Assisi looks for kml files with the names: Stands.kml, Plots.kml, Trees.kml or Sites.kml. Therefore save your exported kml layers using one of these names.
Step 2. Importing Into Assisi
Assisi uses the same Import Tool to import from GIS as for other formats. Open the Import Tool and select "Maps" as the import format.
Importing a Stands KML to Assisi
Content Determines Type of Layer Being Imported
Next set the "Content" that is being imported. Content is the type of layer: stands, plots, trees or sites. It is Content that tells Assisi to look for a certain filename and interpret the kml file as polygons for stand and site layers or as points for plot and tree layers.
Next click Open and select the directory where the kml files are. The layer will be loaded and should show up in the map area. Click Refresh and the list of layer features should show up in the grid.
Validating Layers
At this point the map and its feature attributes have been opened. Next the data must be checked for required values and matched to existing stands if present. Click Validate to check the incoming features for errors.
Defaults for Missing Values
It is likely there will be missing values for attributes such as UNIT and CRUISE. If so, validate will indicate this and defaults must be assigned. Set defaults using the Defaults tab. Here you can select and existing unit to import into and a default cruise name. Click 'Update Where Null' to set values for attributes that are currently not set or click 'Update All' to overwrite all current UNIT and/or CRUISE values. Then click Validate again. Missing UNIT and/CRUISE should be gone, but there may still be other missing values.
Import or Update?
Click Import to import the layer items. Import creates new rows and sets the geometry fields: Area, Latitude, Longitude & Geometry. The Geometry field holds the WKT representation of the layer feature: polygon or point.
If the Assisi database already contains a row that matches the layer attributes, then the 'In?' column will have a check mark. This indicates that the row has been found in the database and wont be imported. These rows can be updated however, meaning Area, Lat/Lon and Geometry values will be overwritten to new values. Click Import to import new rows. Click Update to update Assisi with new values.
The Stands.Area field is the field Assisi uses for reporting and calculation. Import/Update sets the Stands.GISArea field, not the Stands.Area field. To update Stands.Area with new Stands.GISArea values run SQL such as:
UPDATE Stands
SET Area=GISArea
WHERE Unit='Name of Just Updated Unit'
Then recompile and/or grow to see the new area values in reports.
Step 3. Copying Polygons Across Yearly Inventories
If your Assisi inventory is by year, then you may want to update the geometries of stands where they appear in past inventories as well. Rather than importing the same kml file to every unit, just match on stand name and update the other inventories with SQL such as:
UPDATE Stands AS Source
INNER JOIN Stands ON Source.Stand = Stands.Stand
SET
Stands.Geometry = [Source].[Geometry],
Stands.Latitude = [Source].[Latitude],
Stands.Longitude = [Source].[Longitude],
Stands.GISArea = [Source].[GISArea]
WHERE Source.Unit='Name of Just Updated Unit'
When uploading a KML to Assis you state there needs to be an attribute in the layers attribute table named Name. I have created this attribute field and the import still does not recognize a connecting pathway to upload the polygons from that KML to Assisi. I have also tried naming the attribute stands, stand, stand name and names with no succus. can you provide more detail on the how to make a connection pathway from the argis kml layer to assis map feature.