Google logo

Creating a Map Database

In addition to using Google Earth Enterprise Fusion to prepare and publish data in Google Earth, you can use it to prepare and publish data in Google Maps. Map data can be published with Google Earth Enterprise Fusion using Plate Carrée (EPSG: 4326) and Mercator (EPSG: 3857) projections, and is referred to hereafter as a map layer, map project, and map database.

This lesson defines, builds, and publishes a Mercator map database and it also demonstrates how you can add an imagery project of flat or Plate Carrée-based imagery resources. When you publish the Mercator map database, the flat imagery is then projected as Mercator on the Fly. This feature converts a Plate Carrée-based imagery resource into a Mercator-based imagery resource when you define your Mercator map database. When hosted on GEE Server, the server requests the Mercator on the Fly imagery resource in the database and serves it with a Mercator projection.

The option to project Mercator on the Fly enables you to reuse existing flat imagery resources for all your database types, including Mercator map databases, thereby saving you the task of creating and storing Mercator imagery resources. For more information, see Add flat imagery to Mercator map databases in GEE 5.1.0.

Note

As an alternative to your own imagery resources, you can use the Google Base Map in place of an imagery project. See Using the Google Base Map for more details.

The first step in preparing any data for publication is to import the source data as Google Earth Enterprise Fusion resources. You can use one of the vector resources you defined in Defining and Building Resources for Google Maps.

After you define your vector resources, you must define and build at least one map layer for each map project. The first exercise in this lesson, Define a Map Layer, describes how to do so.

The remaining steps are similar to defining, building, pushing, and publishing other databases that you have also created for viewing in Google Earth EC.

Define a Map Layer

Defining a map layer consists of adding resources to the layer and defining the display rules and filters for the layer. This is similar to the process of defining display rules and filters for a vector project destined for Google Earth EC.

To define a map layer

  1. Select Asset Manager from the Tools menu. The Asset Manager appears.

  2. Select Mercator Map Tools (2D) from the drop-down menu.

  3. Click image1. The Map Layer Editor appears.

    image2

    The legend area displays the current value of each property you can set for the map layer. The top row lists the names of the locales you support. When you first open this dialog for a new map layer, only the default locale and its values appear, and the box next to Hide unspecialized locales is checked. Google Maps uses the default locale settings when you do not specify different settings for a user’s locale in this tab.

  4. Set the property values for the default locale as follows:

    1. Click the icon in the Icon field, select places3_new, and click OK. This is the icon that appears next to the name of the map layer in the Layers panel of Google Maps.
    2. Click in the Name field, enter CAfreeways, and press Enter to save the change. This is the text label that appears in the Layers panel of Google Maps.
    3. For Initial State, accept the default setting, Off. This setting determines whether the map layer is turned on or off in Google Maps.
  5. Click Add Resource.

  6. Navigate to the ASSET_ROOT/Resources/Vector folder.

  7. Select CAHighways, and click Open. The CAHighways resource appears on the resource list.

  8. Select default select all under the resource name.

    The Feature and Filter tabs appear on the right. The first option on the Feature tab is Draw Features As. This option allows you to specify the display rules for the selected resource. The value you set for Draw Features As determines the options available for you to specify.

    In this lesson, you define display rules for label only.

  9. For Draw Features As, select Lines. The Lines options appear.

  10. Under Line, accept the default visibility range for the lines, 8 and 14.

  11. For Color, set it to orange.

  12. For Line Width, accept the default, 2.

  13. Check the box next to Label.

  14. Under Label, accept the default setting on the drop-down list, Text.

  15. Click Label Format Open. The Label Format dialog appears.

    The Insert Field drop-down list contains the names of all fields in your source data.

  16. Select NAME, and click OK.

    In the source file for the selected resource, the Name column lists the names of the roads, so when you select the Name field here, the names of the roads are displayed in Google Maps.

  17. For the label, change the visibility range to 10 through 14.

    The visibility range refers to the zoom level at which your labels are visible in Google Maps.

  18. The default text style is black on white in the Sans 12 font. Click the text style button (labeled Sans/12) to specify a different text style for the labels.

    The Text Style dialog appears.

  19. For Size, change the value to 10, and accept the default setting for Color, black.

    Note

    In version 3.0 and beyond, only one font and style is provided, Sans regular. However, you can create a configuration file in which you can specify additional fonts, if desired. Refer to the Administration Guide for details.

    A preview of the label appears in the Preview box.

  20. Drag the preview over any button on the left. The new style is stored on that button. The button name reflects the font and font size of the style, and it appears with the selected color and outline attributes.

    After you save a style to a button, you can simply click that button to automatically select its text style settings for another label in the future.

  21. Click OK. You return to the Map Layer Editor, and the Feature tab shows all of your selections.

    image4

  22. Select Save from the File menu.

  23. Navigate to the ASSET_ROOT/MapLayers folder.

  24. In the Name field, enter SFMapLayer, and click Save. The new map layer name appears in the Asset Manager’s asset list.

Define a Map Project

The first step in defining a map project is to specify which map layers to include and give the project a name. Before you define a map project, however, add a subfolder to the asset navigation tree in the Asset Manager in which you can store your map projects.

To add a subfolder for map projects

  1. Select Asset Manager from the Tools menu. The Asset Manager appears.
  2. Right-click Projects in the asset navigation tree, and select New Subfolder. The New Subfolder dialog appears.
  3. Enter Map in the Folder Name field, and click OK. The new Map subfolder appears under Projects in the asset navigation tree.

To create a map project

  1. In the Asset Manager, click image5. The Map Project Editor appears.

  2. Click image6. The Open dialog appears.

  3. Navigate to the ASSET_ROOT/MapLayersfolder.

  4. Select SFMapLayer, the map layer you created in the previous exercise, and click Open. SFMapLayer appears in the Map Project Editor.

    The default legend name of the map layer, CAFreeways, appears in the Legend Name column, followed by <DEFAULT>, which indicates that this is the name you specified for the legend when you created the layer. The name and path of the map layer appears in the Layer column.

  5. Double-click CAFreeways. The Layer Legend dialog displays the current values for the map layer.

    image7

  6. Double-click the name field, change the name to California Freeways, press Enter to save the change, and click OK.

    The new legend name appears in the Map Project Editor. Notice that <DEFAULT> no longer appears after the legend name. (If you want to return to the default name, right-click California Freeways in the Legend Name field, and select Use Layer Defaults from the context menu.)

  7. Select File > Save.

  8. Navigate to the ASSET_ROOT/Projects/Mapfolder.

  9. In the Name field, enter SFMapProject, and click Save. The new map project name appears in the Asset Manager’s asset list.

Define a Flat Imagery Project

The maps layer includes Google Maps layers and uses the Google Maps API from google.com. Map databases use either Plate Carrée (EPSG: 4326) or Mercator (EPSG: 3857) projections and normally require corresponding imagery resource types. In this lesson you add a flat imagery project from a previous tutorial lesson to a Mercator map database, which can then be projected as Mercator on the Fly. For more information, see Add flat imagery to Mercator map databases in GEE 5.1.0

Tip

If you did not complete the tutorial lesson to create an imagery project, see Define an Imagery Project

  1. Select Asset Manager from the Tools menu. The Asset Manager appears.
  2. Select Mercator Map Tools (2D). The tools for Mercator maps appear in the toolbar.
  3. Click image8. The Mercator Imagery Resource Editor appears with no resources selected. image9
  4. Click the Add button. The Open Source dialog opens to the /opt/google/share/tutorials/fusion/Imagery folder. image10
  5. Select source file usgsLanSat.tif, and click the Open button.
  6. Enter today’s date for Acquisition Date
  7. Select USGS Imagery for Provider
  8. Enter 2 for Tolerance
  9. Select File > Save and navigate to the /ASSET_ROOT/Resources/Imagery folder.
  10. Enter the name SFBayAreaLanSat_Merc, and click Save.
  11. Select File > Close
  12. Repeat steps 3 through 11 for the table that follows:
Name (Resources/Imagery/…) Acquisition Date Provider Mask Source File
BlueMarble_Merc Today’s date NASA Imagery No Mask bluemarble_4km.tif
i3_15Meter_Merc Today’s date i3 Auto Mask Default values i3SF15-meter.tif
SFHighResInset_Merc Today’s date USGS Imagery Auto Mask Default values usgsSFHiRes.tif
  1. Click image11. The Mercator Imagery Project Editor appears with no resources selected. image12
  2. Click image13. The Open dialog appears.
  3. Select SFBayAreaLanSat_Merc, and click Open.
  4. Repeat steps 14 and 15 for Named entries in the above table.
  5. Select File > Save and navigate to the /ASSET_ROOT/Projects/Imagery folder.
  6. Enter the name SFBayAreaMercator, and click Save.

Define, Push, and Publish a Map Database

  1. Select Asset Manager from the Tools menu. The Asset Manager appears.

  2. Select Mercator Map Tools (2D). The tools for Mercator maps appear in the toolbar.

  3. Click image14. The Map Database Editor appears with no projects selected.

    Mercator Maps Database Editor

  4. Click image16 next to Map Project. The Open Asset dialog appears.

  5. Navigate to the ASSET_ROOT/Projects/Mapfolder.

  6. Select SFMapProject, and click Open. The SF Map Project appears in the Map Database Editor next to Map Project.

  7. Click image17 next to Imagery Project. The Open Asset dialog appears.

  8. Navigate to the ASSET_ROOT/Projects/Imageryfolder.

    Notice that Type is set to Mercator Imagery Project and only the Mercator imagery project(s) you have built are listed.

  9. Select SFBayAreaMercator, and click Open. The SF Bay Area Mercator imagery project appears in the Map Database Editor next to Imagery Project.

    Both map and Mercator imagery projects appear on the list.

  10. Select File > Save.

  11. Navigate to the ASSET_ROOT/Databases folder.

  12. In the Name field, enter SFMapDatabase, and click Save.

    In the Asset Manager, the new map database appears, along with the other databases you have created. Notice that the Category column distinguishes between Google Earth databases and Google Maps database.

  13. Right-click SFMapDatabase and select Build from the context menu. The status of the database immediately changes to Waiting or Queued and then to In Progress.

    Note

    It might take a while to build the map database, because it is also building the project.

    When Google Earth Enterprise Fusion finishes building the database, its Current State column in the Asset Manager changes to Succeeded, and its Current Version column changes to the date and time the most recent build was started.

Push a Map Database to Google Earth Enterprise Server

To push a map database:

  1. Right-click the name of the map database you built in the previous exercise, and select Push from the context menu. The Push Database dialog appears.

    image18

  2. Click the Push button.

    Google Earth Enterprise Fusion pushes the database to the Google Earth Enterprise Server, and displays a success message when it is done.

    Note

    If you get an error message, contact your Google Earth Enterprise Server administrator for help, or check the Google Earth Enterprise Administration Guide for more information.

Publish a Map Database on Google Earth Enterprise Server

To publish a database:

  1. Access the Google Earth Enterprise Server Admin console in a browser window by going to myserver.mydomainname/admin, replacing myserver and mydomainname with your server and domain.

  2. Sign in with the default credentials or the username and password assigned to you:

    • Default username: geapacheuser
    • Default password: geeadmin

    Note

    If you do not know your username and password, contact your Google Earth Enterprise Server System Administrator.

  3. Click Databases to display the list of databases pushed to the server.

  4. Check the box next to the map database you want to publish. The Publish button on the Databases page appears.

  5. Click the Publish button. The Publish dialog appears.

  6. Specify a Publish point where the database will be accessible from. For example, if you specify MySFMap, it will be accessible from myserver.mydomainname/MySFMap.

    To learn more about the options available in the Publish dialog, see Search Tabs, Snippet profiles, and WMS.

  7. Click Publish. The Databases page updates to indicate the published status of your database.

View a Map Database

After you publish your map database, you can view it from Google Earth Enterprise Server or in any browser.

To view your map database from Google Earth Enterprise Server

  1. Log in to the Admin console of Google Earth Enterprise Server.

    The Admin console opens to the Databases page.

  2. Check the box next to the map database that you want to view.

  3. Click Preview.

    A new browser tab opens displaying your map database.

To view your map database in any browser:

  1. Launch any web browser.

  2. Point your browser to:

    http://myserver.mydomainname/publish_point

where myserver.mydomainname is the host name or IP address of your server to which you published the map database, and publish_point is the publish point that you specified when the published the map database. For example:

http://my_host_name/MySFMap

If you are not sure which server you published to, contact your Google Earth Enterprise Server administrator for help.

Google Maps displays your database.

Using the Google Base Map

When you build a map database, you have the option to use the Google Base Map. Enabling this feature connects to www.google.com, loads Google base map tiles through the Google Maps Javascript API V3, and renders your map layers on top of them.

Note

As per Google’s terms of service, you may need to purchase a Maps for Business license if you are deploying your application in an internal environment.

Deploying the Google Base Map involves adding it when you build your map database.

To build your map database to include the Google Base Map:

  1. Select Asset Manager from the Tools menu. The Asset Manager appears.

  2. Select Mercator Map Tools (2D). The tools for Mercator maps appear in the toolbar.

  3. Click image19. The Map Database Editor appears with no projects selected.

    Mercator Maps Database Editor Geo

  4. Select the Use Google Base Map (google.com) checkbox.

  5. Add your map project.

    The map project appears in the Map Database Editor next to Map Project.

  6. Optionally add an imagery project. This is useful for overlaying high-resolution imagery insets on the Google Base Map.

  7. Select File > Save.

    Your map database is saved to the location you specified.

Build, Push, and Publish your map database as described in Define, Push, and Publish a Map Database.

Learn more