Itemizing Shapefiles (deprecated feature)
By Sandra Schloen, November 2014
A typical GIS strategy recommended to OCHRE projects is to set up the geospatial data so that each relevant OCHRE item knows how to draw itself. More specifically, this means that each Location has a geographic coordinate of some kind (e.g. latitude/longitude), each Object has a point reference or a polyline/polygon shape associated with it, etc. "Item-izing" the geospatial data, that is, assigning to each OCHRE item only the relevant shapes for that item, provides the ultimate flexibility. Items can be chosen via a query, for example, using any of the integrated data and any of the search criteria options available in OCHRE. If each of the items in the result set can draw itself, we can produce maps generated as a result of a query.
Often, however, we have shapefiles that represent a collection of items rather than one shapefile per item. OCHRE has a special link tool in its GIS toolkit that lets a user create a new shapefile from a current selection of shapes in a map view and link that new shapefile to the item which is currently selected in the Linked Items pane.
Here's an example of how this works. Consider this map showing roads and paths from the ancient world. We want to break up this map into sub-shapefiles, each representing a separate road/path, and link each one to an OCHRE item representing that road/path.
Start with the default View of the shapefile and select the layer in the table-of-contents (left-most Map panel) that contains the shapes of interest. Use any of the selection tools available to you (based on the content of the shapefile) to select a subset of shapes.
Selection tools in Map View
Here we've used the Line tool to select the collection of polylines that represent Road 1. In the Linked Items pane, navigate to and select the relevant item, Road 1.
Use the Link button to create a new shapefile that consists of just this selected set of polylines and to link this new shapefile to the item currently selected in the Linked Items pane (the Road 1 item).
OCHRE will do the following:
- Create a new shapefile comprised of just the currently selected set of shapes. This new shapefile will be given a name based on the name of the item to which these shapes are being assigned and written to the folder given by the Access/Path specification of the Resources Inbox.
- Create a matching OCHRE Resource item with a name derived from the name of the item (e.g., "Road 1, shapefile") and insert it into the Resources Inbox.
- Create a link between the currently selected item in the Linked Items pane and the new shapefile.
- Add the new shapefile as its own layer to the current map view. You can right-click on this layer to change its Properties. Here we've assigned a new color to this road.
Use the eraser tool on the map's selection toolbar to remove the current selection and repeat with other items as needed.
Here is the resulting Resources Inbox after itemizing two shapefiles. Once the itemization is completed, or periodically, you should move these shapefiles from the Inbox into a more permanent hierarchy. Note, too, that Road 1 now knows how to draw just itself.