ClueTrust GIS Products


Macintosh GIS

Try Cartographica, the Macintosh GIS today. Explore, analyze, and present geospatial data and maps on your Macintosh.

Get CartoMobile, our field data entry and viewing tool for iOS.

Updates
Blog Index
The journal that this archive was targeting has been deleted. Please update your configuration.
Navigation
Friday
Nov162012

Introducing Cartographica 1.4: Cluster Analysis 

Cartographica 1.4 now has the ability to perform Cluster Analysis. Cluster Analysis involves choosing and setting a number of parameters that are used to identify "hot spot" locations of point level data. Clusters are areas that have high concentrations of a particular incident. Knowing where high concentrations of certain things are located can be a very valuable tool for analysts conducting spatial analysis. 

The two main parameters used to identify clusters are Minimum Count and Distance. Minimum Count allows you to determine how many points are needed to identify a cluster. For example, if the minimum count is set to 5 then no cluster that is identified will have fewer than five points. The Distance parameter is used to determine a search distance between points to identify nearby neighbors that are a part of clusters. Only points that meet the criteria in the parameters are used for the Cluster Analysis. The image below shows the  default setting for the Cluster Analysis window.

The Distance parameter has several options available.The Fixed Distance method will only identify point clusters that fit the Minimum Count criteria and are within a specified 'fixed' distance to other points. This is useful for comparing different types of points using the same criteria. For example, you might want to compare hot spots of Assaults and Robberies. However, the disadvantage of the Fixed Distance method is that the distance is arbitrary and is up to the user to decide. The Average Nearest Neighbor method identifies point clusters that meet the Minimum Count criteria and that have an average distance between neighbors that is greater than a threshold distance. The threshold distance is based on a K-order distance distribution. Where K is the number of nearest neighbors used to construct the distance distribution. A higher K-order will result in a distance distribution with a higher average distance between points, which will result in an output with a larger hot spot area. The Expected Mean Distance identifies points that fit the Minimum Count criteria and are within a randomly defined threshold distance. The confidence interval is used to set a probability that a pair of any two points are within the threshold distance. A confidence interval of 50% means that 50% of point pairs will not be within the threshold distance if the distribution of the points is spatially random.  The confidence levels are specified by using the slide bar. The positions on the slide bar correspond to the following confidence levels. 

Slide Bar PositionProbability
1 0.00001
2 0.0001
3 0.001
4 0.01
5 0.05
6 0.1
7 0.5
8 0.75
9 0.9
10 0.95
11 0.99
12 0.999

See the example below to see how Cluster Analysis operates using Cartographica.

DC Crime Analyst

As a crime analyst in Washington D.C. you are interested in knowing where crime clusters are located within the city. Identifying clusters helps you inform police officials about where to allocate additional resources to prevent crime. To identify crime clusters you need to analyze point level crime incident data. 

The crime data and basemap used in the example are available at DC_GIS. Import the data by choosing File > Import Vector Data.

To create a cluster map choose Tools > Find Clusters. Here you have to decide what the parameters of your Cluster Analysis will be. A classic problem in Cluster Analysis is determining how the parameters will be selected. In essence, the user gets to decide how the clusters are defined. While the clusters themselves are based on the locations of the data, the values of the parameters that define the Clusters are infinite. Therefore, the user needs to have good reason to set the parameters at specific levels. For a crime analyst, clusters should be sized based on the capabilities, resources, and methods available to address the problem. Clusters that are excessively large are too broad for crime prevention efforts to be effective, and clusters that are too small may be too restricted for police to respond effectively. The goal of Cluster Analysis and identifying and setting parameters is to create an output that allows the analyst to show locations where crime is a problem. In many cases this may mean that you need to experiment with the parameters in order to produce an output that helps you achieve your goals.  

To create the map shown below the following parameters were used. The Minimum Count was set to 10. The Distance parameter selected was Average Nearest Neighbor and the value was set to 5. 

The second image is a closer look at the clusters in Central D.C. Notice that many of the clusters are several blocks large and would be good for focusing crime deterrents that are effective for entire areas such a vehicle patrol. However, the image also shows many clusters that are quite small and that may require more localized attention from the police. 

Thursday
Oct252012

Introducing Cartographica 1.4: Spatial Join 

New to Cartographica 1.4 are the Spatial Join tools. Spatial Joins are used to combine the data attributes of two or more layers. The Spatial Join operation creates a new layer that is a combination of attributes from Join and Target layers. The Spatial Join functions are akin to the Overlay functions except that the Spatial Join procedure does not change the geometry of the layers. Spatial Joins can be used for many different purposes and there are many options for determining how the join will be processed.

A Spatial Join can be performed on point, line, or polygon layers. The new vector layer that is created after the Spatial Join will match the Selected layer's data format (i.e. point, line, or polygon). For example, if you select a polygon layer and then perform a Spatial Join (using an Intersect function) with a point layer as the Join layer, the output would be a polygon layer with attribute data joined from the point layer. In this case one attribute added to the polygon layer would be a count of the number of points that intersected with each polygon in the Selected layer. 

The default Spatial Join option is the Intersection function, which will join two layers that overlap in space. In addition to the Intersection function there are 15 additional methods for performing Spatial Joins that can be used to fit various situations. See the example below for an example on how some of the Spatial Joins functions can be used to help answer questions in real-world situations.  

DC Crime Analyst

As a crime analyst in Washington D.C. you are concerned with crime around public housing facilities. In order to help relieve some of your concerns you are employing GIS to identify problem areas.  Your goal is to identify crime incidents that are within 200 meters of public housing facilities. Based on you knowledge and experience of the city you have determined that a 200-meter distance is a sufficient distance to identify problem areas.

*The data used in this example were downloaded from DC GIS, but you can download the example files  here.

Start by importing the basemap, the public housing data, and the crime incident data by choosing File > Import Vector data.

To identify the crime locations that are within 200 meters of any public housing location within the city you can use the Spatial Join tool. To accomplish your goals you are going to perform two separate join operations. The first will involve joining crime points to a public housing polygon layer. The second will work backwards to join polygon attributes to crime points. The first join will allow you to create a count of the number of crime points within 200 meters of public housing sites. The second join will allow you to identify what of crimes are near the public housing facilities.

To use the Spatial Join tool you must first select a layer in the Layer Stack that you would like to have data joined to. Begin by selecting the Public Housing layer, and then choose Tools > Spatial Join.

The Spatial Join window has several components that need mentioning. The top of the window details the layers that are available to be joined to the layer selected in the Layer Stack (i.e. Join Layers). Note that the layer you  Selected in the Layer Stack is shown in the top Left of the Spatial Join window. The bottom of the window, called the Field Mapping window, contains the fields that are found in both data layers that are going to be joined. In the Field Mapping window pane you can choose to ignore certain fields if you do not want them added to the new vector layer. Additionally, you can select other aggregation options such as copy, min, max, sum, first, last, sum, average, count, and sigma (standard deviation). These options can be applied to any of the field options and they will create a new field in the join layer that has values based on the applied aggregation option. The Ratio checkbox will adjust the attribute data being joined based on the proportionate spatial relationship between the two layers. For example, if a Spatial Join is performed between two neighborhood polygon layers and there is only a 20 percent overlap of the neighborhooods then the joined population variable will be corrected to 20 percent of the original population. The One Feature Per Match option will create an single feature for each spatial match that is made between the layers . The “matching features using” menu allows you to select the type of Spatial Join method that you would like to use. There are many options here that can address your needs in many situations.  See below for an example of the Spatial Join Window.

To perform the first join between the Public Housing layer and crime points set up the Spatial Join window like shown above. First, select the 2011_Crimes layer in the top windowpane. Within_A_Distance in the Matching Features using menu. Type in 200 in the Minimum Distance box. In the Field Mapping Pane you want to ignore all of the fields except the Name field and the Join Count fields (you can highlight all of the items you want to ignore and type ‘I’ to ignore all). These should be the first and last fields in the Field Mapping Window. Set those to copy and the rest to ignore and then click Join.  A new layer called PublicHousingAreaPly Join will be added to the layer stack. Click on the layer and observe the Data Viewer. There should be three fields, ID, Join_Count, and Name.

The Join_Count Field provides the number of crime incidents that occurred within 200 meters of the public housing facilities. The Barry Farm Dwellings had the highest count at 201. Stoddert Terrace is second at 192 and Lincoln Heights Dwelling is third at 182. This information tells you a lot about which public housing facilities might need additional protections against criminal activity, and the data allow you to make compelling statements about what is going on around these facilities.

To perform the second Spatial Join select the 2011_Crime layer in the Layer stack and then choose Tools > Spatial Join. Select the Public Housing Join layer in the top pane of the Spatial Join window. Change the Matching Features using menu to Within_Distance. Each of the public housing locations acts as the center of an invisible buffer layer that has a user defined circumference. To define the circumference of the buffer layer Type in 200 in the Minimum distance box. Finally, check the Discard Unmatched Features box and then click Join. This will remove any crime points that are not within 200 meters of a public housing facility. Move the 2011_Crime join layer to the top of the layer stack. Below is an example of the map with the selected points.

 

Check the data viewer to find the fields that have been joined to the crime layer. The field of most interest is the Name Field, which describes the name of the public housing site near the crime point. Using this data we can create individual reports for the public housing facilities that details the types of crimes occurring near those facilities. These reports will allows police officials to create goals and strategies for addressing problems in and around these facilities. See below for an example of the data viewer. 

Tuesday
Oct232012

Introducing Cartographica 1.4: Overlay Operations

New to Cartographica 1.4 is the ability to perform Overlay Operations. Overlay Operations are useful in many contexts when working with spatial data as they make limiting or expanding datasets via spatial location simpler and more efficient. Below are descriptions of the various Overlay Operations that Cartographica has in place for version 1.4. Each serve a specific purpose that you may encounter while working with spatial data. 

Clip Function: Clips all target layers to the Clip layer. The Clip layer can be thought of as a cookie cutter. The boundary of the Clip layer is the outline of the cookie cutter. The Target Layer is the rolled out cookie batter. The output of the Clip function is a new layer that includes only the area that was contained within the boundary of the Clip layer.

Erase Function: The Erase function works opposite of the Clip function. The idea with the cookie cutter is the same, except that rather than clipping a cookie from a large batter and then focusing on the cookie, it erases the cookie and focuses on what’s left of the batter.

Intersection Function: The intersection function creates a new layer based on the intersection of multiple polygon layers. The intersection function is also commonly referred to as the "and" function. The intersection is the area where both polygon A "and" polygon B are located. The intersection function creates an empty layer when the polygons do not share common space (i.e. layers that are mutually exclusive).The output of the intersection function is a new layer that contains only the areas the fit the definition provided above.

Union Function: The union function creates a new layer based on the combination of multiple polygon layers. The union function is commonly referred to as the "or" function. The union function can operate on polygons that are either mutually exclusive or non-mutually exclusive. In both cases the resulting layer will include all space occupied by both layers. Unlike the union operation in probability theory, the spatial union does not have to deal with issues of double counting non-mutually exclusive areas. The areas that overlap are simply added to the final layer.  

Difference Function: Creates a new layer that includes areas of two polygons that do not overlap. Areas that occur in both layers are not present in the resulting layer.   The idea is that the non-overlapping areas are removed, not the polygons. Sometimes the area is just one polygon, but it might also be all of one polygon and parts of 2 others. 

Update Function: The update function updates a target layer with features found in another layer. For example, if you have a new and an old street file the new street file can be used to update the missing streets on the old street file.

Identify: Identifies features in target layers with operation layer features. For example, the identify function can be used when one of two spatially identical layers is missing attribute data. The layer with attribute data (the operation layer) can be used to identify the unidentified features on the layer without attribute data (the target layer).

To highlight a few of the new Overlay Operations we can use an example. In the example you will be using Cartographica’s new overlay functions to select features based on their spatial location. Download the Lexington Census Tracts and Urban Growth Boundary. Import the Lexington Census Tracts layer and the Lexington Urban Growth Boundary Layer by using File > Import Vector Data. The Urban Growth boundary layer is a feature unique to Lexington that represents a politically defined limit on urban sprawl. The main reason behind the boundary is to limit urban sprawl from encroaching on to Lexington’s valuable horse farms that surround the city. A key problem with this situation in Lexington is that the county that Lexington is within (Fayette County) is made up of distinctly rural and urban areas. In some cases this feature of Lexington and Fayette county presents problems when conducting various spatial and statistical analyses. As a result, you want to isolate urban and rural counties into separate layers. You can do this using Cartographica’s new Overlay Operations. Below is a map highlighting Lexington-Fayette County with the red-region representing the urban-growth area. All Areas outside of the red space are rural areas within the county. 

We want to create a new layer that contains only urban areas in the city by cutting out the rural parts of the census tract layer. To do this choose Tools > Perform Overlay Operation. To identify only the rural areas within Lexington you need to use the Clip Function. The Clip function clips all target layers to the operation layer. You can identify which layer is the target and operation layer within the Overlay Operation window. In this case the LandUse_Sector layer is the operation layer that will be used to clip out the rural census tracts. To select the Clip layer click and drag the LandUse_Sector layer to the Clip with box. Below is an example of the appropriate set up to perform the clip operation. After you set up the window like shown below click Perform.

Below is an example of the map of urban areas within Lexington. Note that when the new clip layer is created it will be at the bottom of the layer stack. You need to move the layer to the top of the layer stack and check the box to view the layer’s features. The new layer contains all of the Census tracts that are within the urban growth boundary. This is advantageous because the urban and rural areas in Lexington are distinctly different and may be studied and and understood differently in specific contexts, which requires separate data layers.  

Now you want to create a new layer that contains only rural areas within Lexington by erasing the parts of Fayette County that are within the Urban Growhth Boundary. To do this choose Tools > Perform Overlay Operation. To create a new layer that contains only rural areas you need to use the Erase function. Use the LandUse_Sector (urban growth layer) as the erase layer and the Census tract layer as the target layer. When set up, click perform. 

Below is a map of the rural areas in Lexington. Like before, when the new erase layer is created it will be at the bottom of the layer stack. Move the layer to the top of the layer stack and change the layer styles so that it is more easily visible against the other layers. Notice that all of the census tracts that were within the Urban Growth Boundary are now removed from the new layer. View the map below for an example. 

Monday
Oct222012

Introducing Cartographica 1.4: Snapping Functions

Cartographica has had the ability to add and create new features for a while now, but new in version 1.4 are the snapping tools, designed to make the Add Feature process simpler and more efficient. Snapping tools make it easier to draw point, line, and polygon features by automatically connecting to Vertex, Edge, or Grid features on a layer. That is, if your goal is to create a new layer, or to update an old layer, then using the snapping tools allows you to more easily draw the new features. We can illustrate with an example.

In the following example you have a street layer from Lexington, Kentucky. The street data was collected from the U.S. Census 2000 Tiger/Line Files, but is downloadable by click on this link, download streets data . The street layer is incomplete due to the demolition of an old public housing complex that has since been reconstructed. During the rebuilding of the housing complex the street network was changed and redesigned. Fortunately, you can easily update your street layer by using newer satellite imagery and the snapping tool to redraw the street network.

Begin the example by importing the Lexington street file by choosing File > Import Vector Data. Also, add the satellite imagery by choosing File > Add Live Map.

After the data are visible in the Map Window zoom in to the area east of downtown Lexington that appears to have an incomplete road network. See below for the area of interest. We are interested in the area in the center of the map.

A closer look at the target area.

You can complete the street network by first adding a new layer by choosing Layer > New Layer (Move the new layer to the top of the layer stack). Choose Edit > Add Feature. You will be prompted to select the type of feature you would like to add. Select Line. The Editing Options window will appear. The Editing Options window has two options within it: First, the Snap to drop down menu allows you to select the type of snapping method you would like to use. The Vertex option allows you to snap to any vertex, or line end point. The Edge snap option allows you to snap to edge of any line or polygon edge, and finally the grid option allows you to snap to points that on a grid. Second, the snap distance is a parameter that defines how sensitive the snap feature is when snapping to any of the options listed above. For example, if the snap distance is set to 10 meters and the cursor is 15 meters from a vertex then the snapping function will not snap. Below is an image of the Editing Options window. 

Change the Snap to menu selection to Vertex. When you select the Vertex option a new pane will appear within the Editing Options window. Here you are able to select the layer that you would like to snap to when adding new features. Select the Street layer. The Snap Distance will automatically update (The automatically updated snap distance is fine for now). You are now ready to begin adding the new line features. To add points hold down the option key and click near the end point of a line feature on the street layer and draw a new street making sure to trace the streets in the corresponding satellite imagery. After you have drawn the new street press the return key. See below for an example. You should have noticed that when the snap function is working the cursor turns a bright green color. 

To continue adding new features choose Edit > Add Feature and then draw another new street. Repeat this process until you have completed the street network in this area of Lexington. Below is an example of the new layer. Note: the layer has been renamed Aspendale_Streets.

 

 

The final step is to merge the Streets and Aspendale_Streets layers to create a single layer that includes the updated street network. The updated layer will contain all of the streets from both layers and the corresponding attribute data from the original street layer. This is advantageous because all of the fields that are contained within the street file (i.e. the street name, speed limit, address, etc.) will be included in the new layer. This will allow you to manually update all of these atributes on the new Aspendale_Streets that have been drawn. The same method can be used to update any street file and allows you to continually update your data to real-time accuracy. To merge the layers first select each layer in the Layer Stack using command click. Choose Layer > Merge Layers. The following window will appear.  Set up the window to match the image below and then click consolidate. The final output will be a single layer that includes the data from both layers. 

Final Map with Consolidated Street Networks.

Monday
Oct222012

Introducing Cartographica 1.4: Layer Styles and the Uber Browser

The Layer Styles Window has been enhanced for version 1.4. The User Interface is similar, but includes several new or upgraded functions. New functions include additional editing capability on both lines and patterns for layer features, enhanced management of feature labels, new line and fill patterns, and integration with the Uber Browser. The new line and pattern styles have variable colors and can be used through drag and drop.

Also new to version 1.4 is the Uber Browser, which is designed to enhance your ability to edit and improve your layer styles. The Uber Browser is a collection of libraries that contain point, line, and pattern symbols, bookmarks, and color palettes. Each of the libraries is included with several stock items. However, the libraries can be added to, which allows you to create a collection of symbols and color palettes that you can continually refer to.

For this post we are using data from DC GIS. Click on the following links to download the data. Washington D.C. Basemap (Census tracts), DC Metro Lines, and DC Metro Entry Stations (points)

After you download the .zip files import the .shp files using File > Import Vector Data .

Start by editing the styles for the Metro Lines layer. You want to use something other than the standard line symbol to represent the Metro Lines. To accomplish this you can use the Uber Browser. Choose Window > Show Uber Browser and select the Line tab. Drag and drop the Freeway Under Construction symbol to the Metro Lines layer in the Layer Stack. See below for the Uber Browser.

 

You want to identify the metro lines by their color. In Washington D.C., the metro lines are blue, red, yellow, orange, and green.Double-click on the Metro Lines layer in the Layer Stack. Change the Based on menu to Name and then click on the Gearbox and select Distribute Unique Values. For each Metro line change the fill color to a color that matches the Metro’s name. This is done by individually selecting the Metro Line items in the Layer Styles table and then clicking on the Fill box and selecting the color. See below for an example of the Layer Styles window. 

 

You may also want to change the Metro Stations symbol. Double-Click on the Metro Stations layer in the Layer Stack. Click on the Symbol box to bring up the Uber Browser. Click and drag the Metro symbol to the Symbol Box and uncheck the Stroke box. Change the symbol size to 2 and press return. See below for the Uber Browser and Layer Styles Window. Note:  Your Uber Browser will most likely not have as many User symbols as what is shown below, including the Metro stations symbol. To add new symbols to your library find a symbol using an internet image search, save the image, and then click Add in the bottom left of the Uber Browser window. Select the Image and then click ok. The new symbol will be added to your library.

See below for the final map.