Example: Trace an Area in a Map over an Image Background

In this example we use a map with a drawing layer above an image layer.  We will create an area object in the drawing by tracing over the outlines of something seen in the image layer below.  For another example of tracing over an image server layer, see the Add a Drawing and Trace an Object section of the Example: An Imageserver Tutorial topic.

 

To set up this example we first create a new data source using an image server, the Google Maps Satellite Image server.   We then create a map and drag and drop the image server image into the map.

 

Next, we create a new drawing, called TDrawing by default,  using the default  pseudo Mercator projection and then drag and drop that into the map.

 

To see a step by step tutorial on creating an image server, adding it to a map as a layer and then creating a new drawing and adding it to the map as a layer, see the Example: An Imageserver Tutorial topic.

 

eg_trace_area01_01.png

We zoom into France and then into the center of Paris.   In the center of the view above we see the oval road running around the Place de la Concorde with the Tuileries gardens to the right.  The octagonal green shape at the beginning of the gardens is a shallow pond.

 

eg_trace_area01_02.png

 

We zoom further into the view to see the octagonal, shallow pond.   Hobbyists float model sailboats there in the summer, and many people relax in lounge chairs around the edges.  We will create an octagonal area object in the drawing, "traced" over the pond.

 

il_create_area_command.png

 

As described in the Editing Drawings topic, we choose Create Area for the mode button in the main toolbar.

 

eg_trace_area01_04.png

 

We click on one corner of the octagonal pond.  In the illustration above, we have pressed the spacebar to turn off snapping, so the cursor is not surrounded with a square box as when snapping is turned on.

 

eg_trace_area01_05.png

 

We then click on the next corner.    As we click and move the mouse cursor onwards we see a small box has appeared to mark the coordinate where we clicked.   A thin blue line will "rubber band" to connect the last place we clicked to the current position of the mouse cursor.

 

eg_trace_area01_06.png

 

As we continue clicking and moving the mouse cursor we can see that the rubber-banding blue line shows us what the area object would look like if we were to click at the current mouse cursor position.

 

eg_trace_area01_07.png

 

We click all the way around the octagon.

 

To click with greater accuracy we can zoom in using the mouse wheel or by clicking the Zoom In or Zoom Out buttons in the main menu.   

 

eg_trace_area01_07a.png

 

For example, in the view above we have used the mouse wheel to zoom in to one of the corners of the octagon to more precisely choose where we will click to put a coordinate for the area.

 

We can also click and drag to pan the view.   As long as we click and drag as opposed to just clicking without doing a drag, the system will read our mouse gesture as a command to pan and not as a command to put a coordinate box at that spot.

 

eg_trace_area01_08.png

 

We click the last corner of the octagon...

 

eg_trace_area01_09.png

 

...and then we Right-click anywhere to indicate we are finished drawing the area.

 

eg_trace_area01_09a.png

 

In the resulting context menu we choose Save Changes.  

 

eg_trace_area01_10.png

The area object is created in the drawing.

 

ico_nb_arrow_blue.png

When finished drawing areas, do not forget to switch back to Default mode, which provides navigation mode by default.

 

il_switch_cursor_mode04.png

 

There is no harm done if we forget, since immediately any cursor clicks in the active window will begin to create an area.  We can press Esc at any time to abandon the edits, and no area will be created if we do not choose Save Changes or otherwise confirm the edit.

 

 

eg_trace_area01_11.png

 

We can change the Style of the drawing, for example, like the use of transparent background color above, combined with a pattern of stripes for the area, which allows seeing the newly-created area and also the background underneath.

 

eg_trace_area01_12.png

 

Zooming into the third vertex we created, we see that we did a sloppy job of clicking the location for that corner.    We can edit the area by Shift-Alt-clicking the area to pick it for editing.

 

eg_trace_area01_13.png

 

We click the vertex to be moved, to choose it.

 

 

eg_trace_area01_14.png

 

The vertex appears as a larger box, which we can now click and drag into a more precise position.

 

eg_trace_area01_15.png

 

We can now right-click and choose Save Changes, or we can use the keyboard shortcut of Ctrl-Enter, or in the Record pane, which has been opened automatically, we can press the Update Record button.

 

We press Ctrl-Enter.

 

 

eg_trace_area01_16.png

 

The vertex moves to the new position.   It is shown with a surrounding box, to make it easier to pick out against a busy background.    The area is still picked for display in the Record pane, so vertices and boundaries are highlighted in blue / white picked color.  

 

To eliminate that picked status, we can simply press Esc or Alt-click anywhere outside the area.

 

eg_trace_area01_17.png

 

There, that is better!

 

eg_trace_area01_18.png

 

It is, of course, striving after a false sense of accuracy to try to digitize to Google imagery give or take a half-meter or a foot and a half.   But if we have quality aerial photography we can get remarkably precise imagery that can be digitized to good accuracy by zooming in when clicking to create vertices.

Notes

Zoom in for Greater Accuracy - We created the area object in a casual way, clicking our way around the octagonal without bothering to zoom it or to pay particularly careful attention to where exactly we clicked.   If we were digitizing images for professional work we would be more careful to click with greater accuracy.

 

See Also

Example: An Imageserver Tutorial - An extensive tutorial showing step by step how to add new data sources that are imageservers, how to show them as layers in a map, how to create a new drawing that matches the projection of the map and how to trace over what is seen in an imageserver layer to create an area object in the drawing.

 

New Object Dialog

 

Example: Draw Lines, Areas and Points - Simple example of using basic mouse moves to add points, lines and areas to a drawing.

 

Example: Create a Line using the Record Pane - Step by step creation and modification of a line in a drawing using the Record pane's Coordinates tab.

 

Example: Create a Line using Curved Segments - Creating a line made up from curvilinear geometry using the New Object Dialog.

 

Example: Create an Area with a Hole - Using the New Object Dialog, create an area in a drawing where the area includes one or more holes.  This is similar to how we create areas that have islands as part of the area.   

 

Example: Create an Area with Holes and Islands - Using the New Object Dialog, create an area in a drawing where the area includes holes and also islands.

 

Example: Create a Multipoint - How to create multipoints using the New Object Dialog.  This topic provides two examples:  First we create a multipoint and then next we create a multipoint having two branches.  The purpose of this topic is to help teach the implementation of geometry in Manifold and other typical spatial packages using a somewhat unusual and rarely met object type, the multipoint, which combines what appear to be many separate points into a single multipoint object.

 

Example: Style Applied to an Image Server Image - Because the Style dialog simply changes the way an image is displayed and not the data, it can operate on read-only data served by various web servers such as WMS REST servers.    In this example we look at every detail of creating a data source using an image server and then manipulating the appearance of the display with Style.  We will connect to a WMS server that provides LiDAR data in various forms, including as terrain elevation.