Applying a style template

This feature is available to Google Earth Pro and Google Earth EC customers only.

This section covers the basic steps for applying a style template to vector data that contains fields you want to have displayed in the 3D viewer. You can apply style templates to newly ingested data or to existing KML data. In addition, you can modify existing templates using the steps below.

Note - Style templates may only be applied to placemarks that contain extended schema data, such as those Google Earth has created by ingesting a vector data file.

Note - Style templates are quite specific to the data you are working with. While you can use the same style template for different data that has the same fields, the template settings will often have to be adjusted to represent the data properly. As your original data set changes with new data, you might also need to adjust the template to accommodate new information.

  1. Choose the data that will have the style template applied to it. If you are importing the data for the first time, simply click the Yes button when prompted to apply a style template.
  2. If you already have this data in your 'Places' panel, select the parent folder and click Edit > Apply Style Template. (Use this method when you want to edit a recently-created style template.)
  3. In the 'Style Template Settings ' dialog box, indicate whether you are creating a new template or using an existing one.
  4. If you have an existing style template for your data, it appears in the 'Compatible templates' list along with any other style template that is compatible to the data you have selected. If you choose to use an existing style template, select the correct one from the list. If you simply want to apply the template to your data without changing the template itself, leave the 'edit selected template' check box clear. To edit the style template, select the check box.
  5. When you create new template or edit an existing one, the 'Style Template Settings' dialog box appears.
  6. Choose a field from your data that you want to use as a Name, or label, for your data. This name appears in the 3D viewer as well as in the Places panel that lists the data points.
  7. Click on the Color tab and map an element of your data to color styles. See Mapping Color Styles for details.
  8. Click the Icon tab and map and element of your data to one or more icons. See Mapping Icons to Point Data for details.
  9. Click the Height tab to map a height value to a data element. See Mapping Height Values for details.
  10. Click OK when you are finished defining your styles. The values defined appear in the 3D viewer.

The rest of this section discusses in detail how to apply template values to data. Finally, you can use the instructions in A Style Template Example to walk through the process of defining a style template on sample point data from a text file.

Mapping Color Styles

You can apply color to selected fields in your imported data. In this case, color is applied to the feature depending upon the type of data imported:

  • Icons are colored with point data
  • Lines are colored when applying to lines or paths
  • Solid polygons are colored with shape data

Use the color style to color these elements in a meaningful way depending upon both the data type and the field data within the entire set. You can use three mechanisms to color data:

  • Use a single color for all features
  • Use random colors
  • Set colors based on field values

The rest of this section describes how to use these color application methods.

Using a Single Color

If you want to use one color for all the points or lines from your imported data, select the 'Use single color' option and click the colored square next to the option. From the color selector, choose a color or define your own color to apply to the data.

Using Random Colors

To use a variety of colors that are applied randomly by Google Earth, select the 'Use random colors' option.

Note - The line or point data will be colored based on values supplied by Google Earth. If you are also supplying an icon for point data, the color is added to the existing color of the icon.

Setting Colors Based on Field Values

While applying colors to data features helps distinguish features from each other in the 3D viewer, using colors based on field values provides a way to display data about the feature set that you couldn't otherwise easily display. For example, you might want to set a short range of colors based on the square footage of real estate listings. Or, you might want to set a range of colors for shape files showing average household income.

Use the following steps to define color values by a data field.

  1. Select the Set color from field option in the Color tab.
  2. Choose the field that you want to apply color data to from the Set color field drop-down list. Here, you can choose either numeric fields or text fields from your data. See Choosing Field Types for Style Mapping.
  3. Choose the starting and ending color (optional) for your color mapping. By default, the style template "color buckets" are created from blue and mapped through the spectrum to red. If you want to change the color range, you can click each color block and set the starting and ending colors as desired. Google Earth automatically calculates the color range between the two chosen values.
  1. Use the Number of buckets selector to indicate how to group the range of field values. This option is only available for fields with numeric data. The ranges for each bucket are automatically computed, but can be adjusted manually. See Customizing the Value Range for Numeric Data for details. To learn how buckets behave for string and numeric fields, see Using Buckets for Field Data.
  2. Make any further desired adjustments.
    • Subfolders - You can create subfolders for each color bucket so that the 'Places' listing displays the data elements grouped by color into their respective folders. This makes it easier for you to show or hide the display of color groups simply by selecting or removing the check box next to the folder. Once you select the sub-folder option, you must provide a name for your sub-folder in order for the data to be properly grouped in the 'Places' listing. Note that you can only define a single sub-folder option for either color or icon display.
      Data elements grouped by color into their respective folders
    • Color display order - You can click the Reverse order button to reverse the display order of the color range. So, if you have a range of colors starting with blue for the first element and ending with red for the last one, reversing the order will apply red to the first element and blue to the last.
    • Color adjustments to single buckets - You can modify each color element individually by clicking on it and adjusting the color for that particular value or value range. In addition, you can modify the settings for numeric buckets to adjust the spread of the data to your preference. See Customizing the Value Range for Numeric Data to learn how to adjust the numeric ranges once you choose the number of buckets for a range of numbers.
  3. Click the OK button to apply and view your changes. - Save the style template. You can always edit the template to apply icon and height styles or to make additional color adjustments. Do this by following the instructions in Applying a Style Template.

Mapping Icons to Point Data

As with color, you can apply icons to fields in your data. However, icons can only be mapped to point data, so if you are importing line or shape data, the Icon style tab will be unavailable. You can use two mechanisms for mapping icons to points:

  • Use the same icon for all features - To do this, simply select the Use same icon for all features option and choose an icon from the drop-down list.
    Use the same icon for all features
  • Set icon from a field - The actions for doing this are similar to those described in Mapping Color Styles, and are described in the sections that follow.

Setting Icons Based on Fields

These steps describe the basic process of mapping icons to fields in your data. The following steps describe the basic process for defining color values by a data field.

  1. Select the 'Set icon from field' option in the Icon tab.
  2. Choose the field that you want to apply icon labels to from the 'Set icon from field' drop-down list. Here, you can choose either numeric fields or text fields from your data. See Choosing Field Types for Style Mapping.
  3. Use the 'Number of buckets' selector to indicate how to group the range of field values. This option is only available for fields with numeric data. The ranges for each bucket are automatically computed but can be adjusted manually. See Customizing the Value Range for Numeric Data for details. To learn how buckets behave for string and numeric fields, see Using Buckets for Field Data.
  4. For each bucket defined, select an icon from the list.
  5. Make any further desired adjustments:
    • Subfolders - You can create subfolders for each icon bucket so that the 'Places' listing displays the data elements grouped by the folder label into their respective folders. This makes it easier for you to show or hide the display of icon groups simply by selecting or removing the check box next to the folder. Once you select the subfolder option, you must provide a name for your sub-folder in order for the data to be properly grouped in the 'Places' listing.
      Subfolders for each icon bucket
    Note: You can only define a single subfolder option for either color or icon display.
    • Icon adjustments to single buckets - You can modify each icon element individually by clicking on it and adjusting the icon for that particular value or value range.
    • In addition, you can modify the settings for numeric buckets to adjust the spread of the data to your preference. See Customizing the Value Range for Numeric Data to learn how to adjust the numeric ranges once you choose the number of buckets for a range of numbers.
  6. Click OK to apply and view your changes.
  7. Save the style template. You can always edit the template to apply icon and height styles or to make additional color adjustments. Do this by following the instructions in Applying a Style Template.

Mapping Height Values

By default, no height values are defined initially in the 'Height' tab. Use the 'Height' tab in the 'Style Template Settings' dialog box to set height values from a selected field. Once height values are activated, points, lines, or shapes are extruded from ground level to the height defined for each data element. If you map height to lines or shapes, the values you define work in combination with the colors defined in the 'Color' tab.

On the other hand, if you map height to point data, those points are extruded using a single pixel colored line to connect the icon from its elevated position to the ground. You can use style settings to modify the width and color of those lines if you wish.

The rest of this section covers details for using height values effectively, including:

Height Values for Text Fields

The height map settings for text fields differ from those for numeric fields. If the field you choose to map contains text data, the first 8 unique fields are each defined in their own container, or bucket. For this reason, it makes sense to only map height values to a field that has 8 or fewer unique values. See Choosing Field Types for Style Mapping for more details.

When you map height values to a text field, the following settings are available:

  • Individual height values - The height mapping wizard automatically calculates reasonable height values for your data given its geographical extents. For example, for points clustered around a small region, 20 - 2000 meters might be adequate to view all points as elevated when looking at the entire set in the 3D viewer. On the other hand, if your data set encompasses an entire state, higher values are calculated so that height is apparent when looking over the entire region in the 3D viewer.

    You can always modify the height values by hand to adjust each point to your preference. In general, the greater the distinction between each point, the easier it is to visualize that distinction in the 3D viewer from a distance. Height units - By default, height units are set to meters, but you can change them to feet if you prefer. When you change the default value from meters to feet, you might want to adjust the values in each bucket upward to make the data visible in the 3D viewer.
  • Scaling factor - Use the 'Scaling factor' slider to uniformly adjust the numeric values in all height fields. The slider provides a general factor from .1 times the value to 10 times the value defined in each field. If you manually adjust the height values, you can also use the 'Scaling factor' slider to make further adjustments to those numbers.

Height Values for Numeric Fields

When you map height values to a numeric field in your data, you can choose from two types of mapping methods: continuous or split into buckets.

Using Continuous Mapping

The continuous mapping method uses the minimum and maximum values of your selected field to determine a minimum and maximum height display for the entire set. It then maps all data within the set in a way that best corresponds to each individual field. In the example, the 'Square_footage' field is used to map height values, with the minimum value of 2000 and a maximum value of 6234. Each of the 9 elements in the set is displayed at a slightly different height value that most accurately displays its relationship to the other points. This particular method is useful in smaller data sets where individual distinctions between points or shapes are easily visualized.

With the continuous mapping method, you can use the 'Scaling factor' slider and the 'Height units' selector as described above in Height Values for Text Fields. Additionally, you can enter the desired height you want for the beginning and ending ranges of your data. For example, you might want houses starting at 2000 feet to be displayed in the 3D viewer at a height of 100 meters, and houses at the ending range to be displayed at a height of 5000 meters.

In the 3D viewer, the visual distinction between individual elements using this method is affected by both the height range you set and by the number of elements in the data. For example, a range of 100 - 5000 meters for a set containing only 9 elements creates a visually distinct height for each point.

If you decrease the range or increase the number of elements in the set, the distinction between each element diminishes.

Splitting Values into Buckets

Use the 'Split into buckets' mapping method to create up to 8 height groupings for your data. This method works well for large data sets where continuously mapped heights are not easily visualized in the 3D viewer. For example, if your data set contains over 1000 housing listings clustered around a small region, it might be difficult to see the actual difference between houses in different height categories. By using the 'Split into buckets' option, you can create more meaningful categories and define visually distinct gaps in their display. For example, you might have all listings between 2000 - 3000 square feet display at a height of 500 meters, all listings between 3000 - 4000 square feet display at a height of 1500 meters, and so on. While this method will not distinguish a house at 3000 square feet from one at 3200 square feet, it will allow a more immediate visual grasp of the categories you have defined.

As with color and icon styles, the maximum value for each bucket is automatically computed, but can be adjusted manually. Use the 'Scaling factor' slider and the 'Height units' selector for this method as described above in Height Values for Text Fields. As you set the number of buckets and define the maximum value for each bucket, the Style Template wizard displays the count of items for each bucket. For more details, see Using Buckets for Field Data.

Using Style Settings to Modify Point Display

The color values you set for point data are applied to the icon that you map to points as well as to the line that is extruded from the point on the earth for the height of the line, as shown in the real estate listing example above. However, in some cases it might not be easy to visualize a single-pixel line in the 3D viewer against the earth imagery.

In that case, you can edit the style settings for each point in order to modify the line thickness.

  1. Right-point you want to modify and select Properties from the pop-up menu.
  2. In the Edit Placemark dialog box, in the 'Style, Color' tab, modify the point's appearance as appropriate.
  3. Click OK.

Since this process is not practical for large data sets, you might consider applying changes to entire folders or subfolders. Beware that if you do this, any individually defined styles will be lost. In this case, use the sub-folder feature of the 'Style Template' wizard to group similarly styled data into subfolders. Make sure that each folder created has similar color and icon data. Then, apply the height value to your data and save the style template. Later, use the steps above to create shared styles for each subfolder you set up. As long as all of the data within each folder has the same color value and the same icon value, changes to the line thickness will not impact those settings.

Using Buckets for Field Data

When using color, icon, or height mapping for specific fields in your data set, you typically define a number of buckets, or containers, to distinguish different ranges of data. The sections that follow describe how different field types are interpreted by style templates, as well as how you can adjust the range of values when mapping numeric data.

Choosing Field Types for Style Mapping

You can choose two basic types of fields from your data when mapping color, icon, or height values:

  • Text (string) fields - If the field that you map to color or other style contains non-numeric data (i.e., text and other characters), the application looks for the first 8 unique text fields, and maps those fields to the style. If there are fewer than 8 values in your data, each unique value is paired to a different color, icon, or height. If there are more than 8 values, the first 8 unique values are mapped to a style, and the rest of the values are grouped together and mapped to a ninth style. For this reason, it typically is most useful to apply a style to text fields that contain small unique sets.

    For example, in the real estate example described in A Style Template Example, there is a field in the data called 'School_district'. This field defines the school district ratings for each listed house. Because there are only three districts: 'AA', 'AAA', and 'AAAA', it makes sense to use a style to distinguish this type of text field. You might, for instance, decide to map a height to this field, so that users viewing your data see the highest points as those belonging to houses in the highest-rated districts, and so on.
  • Numeric field - If the field that you choose contains numeric data, the application automatically apportions the numeric data across the number of buckets that you select, and provides a count of items in each bucket. If you increase or decrease the number of buckets, the application automatically re-apportions the number of elements for each bucket.
 
Note - If you are using a spreadsheet application such as Microsoft Excel to create your data, be sure that the cell format you choose for numeric fields has been set to numeric and not text. If you have numeric fields in your CSV saved from a spreadsheet, but the 'Style Template' wizard is not recognizing it as numeric, it might be due to incorrect formatting. To verify whether the actual field is marked as text or numeric, open the CSV file in a simple text editor and look at the field in question. If it is enclosed in double quotation marks, then it has been defined as text — even if there are only numbers within the quotations. You can remove the quotation marks manually from the file, or open your spreadsheet application and format the cells as numeric and save the CSV data again.