Maps

 

Maps

icon_map.pngMaps are components that take their layers from other components, with each layer being a drawing, an image or a labels component. Map windows add a tab strip to the bottom of the window with the name of each layer on its tab.    In this topic we tend to use the word layer as a synonym for component, because that is how components appear in maps, as layers in the map.

 

By default, new maps are created using the EPSG:3857 Pseudo-Mercator coordinate system, as used by almost all modern web mapping data sources.  Components that appear in a map as layers can use coordinate systems that are different from the map.  They will be re-projected on the fly into the map's coordinate system when displayed in the map.

Three Ways to Create a New Map

 

See the Example: Create Maps topic for step-by-step illustrations of the procedures below.

 

To create a new, blank map:

 

  1. Choose File - Create - New Map or use the context menu from right-clicking on a blank spot in the Project pane.

  2. Specify a Name for the new map.

  3. Press Create Map.

 

A new, blank map component will appear in the Project pane.   The coordinate system we choose does not matter since the new, blank map will take on the coordinate system of whatever is the first component that is dropped into the map.

 

To add a layer to a map:

 

  1. Open the map by double-clicking it in the Project pane.

  2. Drag and drop the desired layer from the Project pane into the map.

  3. The first layer added specifies the coordinate system the map will use.

  4. If any additional layers use a different coordinate system, the map will show them in the map's coordinate system.

  5. Rearrange layers by dragging their tabs left or right, or by using the Layers panel.

 

ico_nb_arrow_blue.pngWhen a new, blank map is created, the map's coordinate system will automatically be changed to whatever is the coordinate system used by the first layer that is added to the map.    Additional layers will be re-projected on the fly, if necessary, into the coordinate system used by the map.  That on the fly re-projection is for display only: the components will not be modified.

 

To create a new map using one, existing component as a layer:

 

  1. In the Project pane, right-click on the desired component.

  2. In the context menu that pops open, choose Create - New Map.

  3. Specify a Name for the new map.

  4. Choose a coordinate system if the component's coordinate system is not desired.

  5. Press Create Map.

 

A new map will be created with the chosen existing component as a layer.   By default, the new map will use whatever coordinate system is used by the single component that was right-clicked.   That can be changed in the New Map dialog to some other coordinate system, if desired.   

 

To create a new map using multiple components as layers:

 

  1. In the Project pane, ctrl-click on drawing, image or labels components to highlight them.

  2. Right-click onto any one of the highlighted components.

  3. In the context menu that pops open, choose Create - New Map.

  4. Specify a Name for the new map.

  5. Uncheck the box for any component in the list not desired as a layer.

  6. Click on any item and then move it up or down in the layer order list.

  7. Choose a coordinate system if the default is not desired.

  8. Press Create Map.

 

A new map will be created with the chosen components as layers, in the order in which they appeared in the list when creating the map.   The new map will use whatever coordinate system was specified for the map, by default EPSG:3857 Pseudo-Mercator, while the existing components will continue with their own coordinate systems.   If those are different than the map's coordinate system, the layers will be re-projected on the fly into the coordinate system of the map.

 

To create a new map from an existing map:

 

  1. In the Project pane, right-click on the desired map.

  2. In the context menu that pops open, choose Create - New Map.

  3. Specify a Name for the new map.

  4. Choose a coordinate system if the given coordinate system is not desired.

  5. Uncheck the box for any component in the list not desired as a layer.

  6. Click on any item and then move it up or down in the layer order list.

  7. Choose a coordinate system if the default is not desired.

  8. Press Create Map.

 

Creating a new map from an existing map will list all of the layers in the existing map in the New Map dialog.  We can then uncheck those layers not desired in the new map.

Changing a Map's Projection

btn_coord_sys_picker.png To change a map's projection after it has been created and populated with layers, in the Component panel in the Contents pane click on the coordinate picker button for the map's coordinate system.   

 

Measurements - We can measure distances and bearings in maps using the Tracker tool.

Layers

Layers in a map are seen in the map as if they were a vertical stack of transparent sheets, with the contents of each layer drawn on that sheet. If the contents of a drawing layer have "empty space" between the objects shown in that layer, whatever is in a layer below can be seen through that empty space.   Labels have empty space between the labels and if an image has any transparent pixels layers below the image can be seen through those regions of transparent pixels.

 

ico_nb_arrow_blue.pngLayers in maps are persistent:  when we add layers to a map and then arrange those layers in order, if we close the map and then open it again those layers will still be in the map in that order.   If we save the project, the next time we open the project the map will still have exactly the same layers in the order saved.

 

 

 

 

 

 

 

A drawing, image or labels component can be a layer in many different maps at the same time and it can be open in its own window at the same time.   Changing the component in any one of those windows will change it in all of them.

 

The bottom background color for the map, by default white, is set in Contents - Layers when a map is open.

 

i_mapstack01.png

 

The vertical order of layers is important because opaque shapes drawn in a higher layer will hide items drawn in lower layers below those shapes.   

 

i_mapstack02.png

 

For example, suppose we would like to show two layers together in a map, a layer of rivers drawn as blue lines together with a layer of provinces or states drawn as opaque shapes in various colors.   We should position the rivers layer above the provinces layer so that the solid, opaque shapes of provinces will not hide the river lines below.

 

i_mapstack03.png

 

Maps can have many layers.   To manage these it is often most convenient to use Contents - Layers in addition to the layers tab strip at the bottom of the map.

tech_tina_sm.png

 

Tech tip: Unless they contain regions of fully or partially transparent pixels, images are generally opaque and will hide anything in layers below them. That includes image layers such as those brought in from tile image server data sources such as Open Street Maps, Bing, Yandex satellite images, Google and so on.

 

If we want to create a map that shows locations in a drawing using a Google street map as a background, we should put the drawing layer above the Google layer, that is, with the drawing's layer tab to the left of the Google layer tab.   If we do not see some expected layer in a map, we should drag that layer's tab all the way to the left to make sure it is the uppermost layer in the map.

 

Do not use the same color as the background color for objects in layers because then they will be invisible against the background color.  Likewise, do not format objects entirely in transparent color as then they will be invisible no matter what the background color may be.   See the Example: How Not to Format a Drawing topic for an example.

Layer Tabs in Map Windows

When a map is opened in a window just like with other components the name of the map will be in the tab for the window at the top of the window.  In addition, the layers of the map will be shown as tabs at the bottom of the map window, each tab giving the name of the layer.

 

 

i_map_window_desktop.png

 

 

The layer tabs of a map show the order of layers with higher layer tabs to the left and lower layer tabs to the right.   The illustration above shows a map called Australia Hydro that has been opened.  The map has three layers, all drawings, which consist in order from top layer to bottom layer of the Lakes, WatercourseAreas and WatercourseLines drawings.   We have used the Style panel to format the colors of lakes, areas and lines in blue colors.  

 

 

il_map_contents_layers.png

 

The  Contents - Layers panel has been used to assign a light beige background color to the map.

 

We can move a layer up or down within the display stack by dragging the layer tab for that layer to the left or right, or by Ctrl-clicking the layer's row in the Layers panel and moving it up and down in the stack with the Layers panel toolbar arrow buttons.

 

tech_tina_sm.png

Tech tip: Careful readers will notice the illustration shows a map that has a layer with areas above a layer that contains lines. That is unusual.  Because areas are usually opaque they will hide any lines beneath a particular area so we would normally position a layer with lines above a layer with areas.  

 

The illustration takes the unusual step of putting a layer with areas above a layer of lines because the data sets it utilizes, from an Australian government website, are inconsistent in how they show streams and rivers as either lines or areas.  In some cases wider rivers are shown as areas in one drawing, like the broad river at the top of the window, and also as a network of interwoven lines in an accompanying drawing.  

 

To avoid a confusing display that shows river lines wending their way through a lake, in our illustration we put areas above lines so that any inconsistency is resolved visually in favor of a prettier and more logical area.

 

 

i_map_window_desktop_alt.png

 

 

We Alt-click a window's tab to undock it.   We can then resize the undocked window as we like and move it to anywhere on our Windows desktop.

 

i_maplayers01_01.png

 

Double-clicking a layer tab turns that layer on and off for display.   

 

 i_maplayers01_02.png

 

In the illustrations above we have double-clicked the WatercourseLines layer to turn it off, leaving only the Lakes and the WatercourseAreas layers on for display.  The illustrations show the map as an undocked window.  Dock or undock windows by Alt-clicking their title bar.

 

If we can't see something in a layer that we expect to see it could be that something in a higher layer is blocking it.   If we do not want to drag our layer of interest all the way to the left to make it the uppermost layer, we can double-click off all layers above our layer of interest to see if that indeed is the case.   

 

 

i_maplayers02_01.png  i_maplayers02_02.png

 

If layer names do not fit we can see layers by clicking the down triangle to choose from a pull-down menu of layers.  We can also hover the mouse over the layer to see the full layer name in a tooltip.

 

We can add layers to a map by dragging components from the Project pane and dropping them into the map.   We can drag and drop one component at a time or several components at a time, using Ctrl-click or Shift-click to highlight more than one component at a time in the Project pane.  We can also drag and drop a folder into the map to add all the components found in that folder and subfolders.

 

We can delete a layer from a map by right-clicking the layer tab and choosing Delete.  That will delete the layer from the map - it will not delete the layer from the project.

 

il_zoom_to_fit_with_tooltip.pngtech_ravi_sm.png

 

Tech Tip: When adding the first layer to a map, or, if we do not see anything in a map when we open it,  we should make sure to press the Zoom to Fit button.   It is always possible the data is in the map but the viewport of the map is aimed at a location and at a zoom level where the data is not visible.  Another problem might be lack of a coordinate system in the table from which the drawing or image is created.   Open the table's properties: if it does not have a FieldCoordSystem property it does not have a coordinate system and one should be specified.  

Context Menus for Layer Tabs

Right-clicking on a layer tab in a map calls up a useful context menu:

 

Visible

Turn the layer on or off for display.

Center

Pan the map viewport to center the contents of this layer.

Zoom

Pan and zoom the map viewport to zoom to fit the contents of this layer.

Zoom to Selection

Enabled if there is a selection in the layer.  Zoom to fit the selection.

Refresh

Refresh the layer, taking the latest data from whatever data source is used.   Used in cases where data sources might not signal changes to enable automatic refreshing.

Delete from Map

Delete this layer from the map (does not delete the component).

Open

Open this layer in its own window.

Open Table

Open this layer's table in its own window.

Show in Project

Highlight this layer's component in the Project pane, expanding hierarchies and scrolling the project pane as necessary.

Properties

Launch the View - Properties dialog with this layer's component.

 

Consider a map that contains two drawing layers taken from an ESRI gdb file database shown above a layer taken from a Bing image server layer.    For a step-by-step example working with an ESRI gdb file database see the Example: Connect to an ESRI GDB File Geodatabase  topic.

 

il_layers_contextmenu01_01.png

 

Right-clicking on the wHydrant Drawing layer calls up a context menu:

 

 

il_layers_contextmenu01_02.png

 

Clicking on the Zoom option will zoom to fit to show the contents of that layer.

 

il_layers_contextmenu01_03.png

 

Users familiar with ESRI examples utilizing file geodatabases will recognize the drawing as one of the sample data sets for Naperville, Illinois, in the US, showing the locations of fire hydrants on water mains in Naperville.   

 

Users of file geodatabases also know that they can often contain very many components.   In a large Manifold project that contains very many data sources and components it is good we have a Show in Project context menu option to highlight in the project the component used for the layer.

 

il_layers_contextmenu01_04.png il_layers_contextmenu01_05.png

 

In the case of the layer above, right-clicking  on the layer and choosing Show in Project will open up hierarchies as necessary and scroll the Project pane to highlight the component used.

Zoom to Fit Shortcuts

The following commands work with any window that has a tab at the bottom:  map windows, drawings in their own windows, images in their own windows, etc.

 

eg_quick_zoom_to_fit01_01.png eg_quick_zoom_to_fit01_02.png

Ctrl-click the bottom layer tab of any window to Zoom to Fit the contents of that layer.

 

eg_quick_zoom_to_fit01_03.png eg_quick_zoom_to_fit01_04.png

Shift-Ctrl-click will Zoom to Fit any selection that is in the layer.  This is a great way to see in a drawing or map layer those objects that have been selected in a drawing's table.

 

See the Manifold 9 - Incredibly Convenient Zooms video for the above in action.

Map Layers and Projections

A new, blank map takes its projection from the first component that is added to the map.   Therefore, it makes sense to add layers to a map so the first layer added uses the projection we would like the map to use.

 

btn_coord_sys_picker.png To change a map's projection, in Component panel in the Contents pane click on the coordinate picker button for the map's coordinate system.   

 

We can use as many layers as we like in a map window without reducing rendering performance as long as the layers are in the same projection as the map.  If layers require re-projection on the fly to match the projection used by the map, that re-projection can slow down the rendering process.

 

il_map_contents_projections.png

 

 

A map window has a projection that it uses, that is, a coordinate system, which we can see in the Contents pane.   The Contents pane will also report the projections used by the active layer in the map.

 

The components which appear as layers in a map window can have different coordinate systems from the map window.  The map window will automatically convert on the fly those different coordinate systems into the map's coordinate system to display such layers in the map.

 

Although Manifold is very fast at re-projecting data on the fly, also using parallel processing if multiple processor cores are available,  the process does take some time.  Re-projection time might not be noticed with smaller data sets but it can become significant with large data sets.   Therefore, to get the fastest possible rendering performance in a map it is best to ensure that all components which are displayed as layers in the map use exactly the same coordinate system as the map window does.   In that case they can be displayed with no time at all required to re-project on the fly.   In the illustration above the layers all use the same Latitude / Longitude coordinate system used by the map.  

 

Second best is to ensure that the map uses whatever projection is used by the largest component.   When creating a new map if we know that one of the layers will be a 100 GB image and the other layers small drawings in a different projection, we should add the 100 GB image to the map first so the map will use that image's projection for the map.   We can then drag and drop the small drawings into the map.   

 

When the map renders because it uses the same projection as the image there will be no need to re-project the image on the fly into the map's coordinate system.  For the largest amount of data involved rendering will be fast.    When the drawing layers are rendered during the map's display the drawings will have to be re-projected on the fly into the map's coordinate system but that process will take much less time than re-projecting a large image on the fly.

Parallelized Layer Rendering

Manifold renders maps using parallel performance, taking advantage of multiple cores to render multiple layers and then merging data rendered for different layers in a user interface thread.    As a result maps which have many layers can render as fast as a single drawing with the same amount of data.  

 

i_log_par_coeff.png

 

The Log Window will report rendering times for map windows and will report after an @ character the parallelization coefficient achieved in rendering, with a higher coefficient better.  In the example above involving very large vector data the lower value of 2.0 involved a zoom or pan operation in which the contents of few layers were visible while the last value of 8.1 most probably involved a Zoom to Fit operation where the contents of many layers with many objects were visible in the view.   Small data sets will often show low parallelization coefficients  because with small data it is quicker to simply render the data in a single thread than to launch multiple rendering threads on multiple processors.

 

We can see parallel rendering in action when working with bigger data.  Manifold will display a blue bar at the bottom of the tab for layers in the process of being rendered.   Unless we are working with large data we are unlikely to catch more than a fleeting glimpse of a blue bar at the bottom of a layer tab.   

 

i_tabs_blueline.png

 

The screenshot above shows a layer tab for a drawing that contains all of the roads in the United States (approximately 13 gigabytes of vector data) which is currently being rendered, a process that takes under a second on a reasonable desktop computer.  The smaller layers which contain roads for the states of New Hampshire and Maine have already finished rendering in their threads.

 

If a layer has been updated while it is in the process of rendering, the map window will automatically restart rendering that layer to ensure the latest version is displayed.    That is important when working with components that can change dynamically.

 

Components displayed as layers in a map can come from any of the sources used to bring data into a Manifold project, some of which can change the components we see without any editing by us.   Some such sources, for example, linking in a drawing from a spatial DBMS like Oracle Spatial, could easily result in drawing data that changes as we are viewing it, for example, when someone else also connected to that spatial DBMS edits the drawing on a different computer.

 

Notes

Why does the first layer specify the projection? - When we create a new blank map, regardless of what was specified in the New Map dialog, adding the first layer to the map will automatically change the map's coordinate system to that of the first layer added.  That means the coordinate system we choose in the  New Map dialog is ignored when we create maps interactively by dragging and dropping a layer into them. Why is that?

 

First, this provides a way of setting the coordinate system when creating a new map that will be finished through other means, such as by manually changing entries in properties and tables.  Second, when creating maps interactively by dragging and dropping layers into them, this is a safety measure because map windows will, for display purposes, re-project on the fly any layers they contain into the coordinate system used by the map.   

 

Manifold is very fast at such re-projection but despite such speed it does take some time if a layer uses a different coordinate system from the map window to re-project that layer on the fly to show in the map's coordinate system.   Most of the time we will not notice the time required, but if we are working with very big data that must be re-projected on the fly from a different projection into the map's projection, that can lead to significantly slower panning, zooming and other visual navigation within the map window.

 

If a map includes a layer that contains big data, it therefore makes sense, if we want a fast user interface, to use the same projection for the map that is used by the big data layer.   If we do that, then the map will not be required to re-project the big data in the layer on the fly to show within the map.   The map will use the same projection as the big data layer and no re-projection on the fly will be necessary.   Beginners will sometimes neglect to consider the size of layers they add to a map, but they do tend to add the layer of greatest interest to the map first, and more often than not that first layer added usually is the biggest.   Therefore, automatically assigning to the map the projection used by the first layer that is added will, in most cases, ensure that the map uses whatever projection is used by the biggest layer.   That can help preserve a quick user interface.

 

Deletions are Confirmed - Deleting objects or labels in layers in a map window displays a confirmation dialog. The default button in the confirmation dialog is set to Cancel.  If we do not want to see the confirmation dialog, we can check the Never show this again box.  That will remove the confirmation dialog for deleting frames in layouts, for deleting objects in drawing layers, for deleting labels, and for deleting records in tables.    Another way to eliminate the confirmation dialog is to uncheck the Confirm deleting records box in the Tools - Options dialog.  Objects and labels are records in the associated drawing's table, hence the "records" terminology.

 

See Also

Getting Started

 

Tables

 

Drawings

 

Images

 

Labels

 

Project Pane

 

Style

 

Tracker: Measurements

 

Contents - Layers

 

Example: Project Pane Tutorial - In this example we take an extended tour of the Project pane, engaging in a variety of simple but typical moves that are illustrated step by step.

 

Example: Layers Tutorial - We take a tour of the Layers panel in the Contents pane, learning how to manage layer display order, select layers, turn several layers on and off at the same time, alter opacity settings for one or more layers and how to change background color.

 

Example: Create Maps - Maps are used to show layers that can be drawings, images, and labels.  This topic shows how to create new, blank maps, how to create maps from existing components, and how to create maps from other maps.

 

Example: How Not to Format a Drawing -  When using Style to format a drawing it is a really bad idea to use the same color for objects that is used for the background color.    It can also be a bad idea to use transparent color.   This topic illustrates why.

 

Example: Re-project a Drawing - An essential example on changing the projection of a drawing, either within the drawing itself, or by changing the projection of a map window that shows the drawing and re-projects on the fly for display.