﻿ New Object Dialog

# New Object Dialog

Important:  This topic no longer applies to current Manifold editions.   Release 9 editions no longer use the New Object dialog, and instead have introduced a new editing system that utilize the Record pane. See the videos on the Gallery page for examples of use.   This topic has been moved to the Appendices while other topics are being updated.

The New Object dialog works together with editing commands in visual display windows like drawings and maps.   Please make sure to read the Drawings topic before continuing with this topic, in particular the section titled Creating New Points, Lines and Areas in a Drawing.

The dialog provides a "table view" of coordinates involved in the creation of new objects.  It allows us to change the coordinate points that define objects, to choose which coordinate points we modify and to make other adjustments before committing or abandoning the creation of a new object.

We can invoke the dialog at any time during the creation of a new object by pressing Ctrl- / (same key as the ? key on most English keyboards - use Ctrl-? as a mnemonic).

## Objects are Defined by Straight or Curved Segments

When a drawing displays objects such as areas, lines or points, each object is drawn based on the set of coordinate locations, called coordinates for short,  that defines it.   A single point is defined by a single coordinate.   Note that in this short-hand nomenclature a "coordinate" is really a short hand way of saying a "coordinate pair," that is, two coordinates that consist of an X coordinate number and a Y coordinate number.

Lines and areas are more complex because they can be made up either of a sequence of coordinates that define them (with straight segments between the coordinates) or of curved segments in the form of circular arcs, ellipsoidal arcs or splines that specify a path between coordinates that anchor the beginning and end of the curve, which path is mathematically derived based upon the positions of the beginning and end coordinates plus any intermediate coordinates that mathematically define the curve.   Lines and areas can also be made up of a combination of curves and sequences of coordinates.

Most GIS systems (including all pre-Radian GIS products form Manifold) use the simpler form where all lines and areas are made up of straight segments between the sequence of coordinates that define them.

In such systems when the view is zoomed out a line that may appear to be a smooth curve at closer magnification will be seen to be made up of a sequence of straight line segments, each segment being defined by the coordinates at each end.

Likewise, an area object will be defined by a set of coordinates that when linked by straight segments define the boundary of the area object as well as any internal voids or external "islands."   When the view is zoomed out such areas might look to be smoothly curved shapes, but upon closer inspection will be seen to be made up of straight segments that define their boundaries.

A more complex way of defining objects in vector-based drawings is to use curved segments the precise shapes of which are defined by mathematical formulae based on a limited number of coordinate locations.   For example, a circular arc can be defined by three coordinates: two coordinates to define the beginning and end of the arc plus a third coordinate through which the circular arc must pass.  Given three such coordinates a simple mathematical relationship defines at any desired level of resolution what must be the shape of a circular arc which passes through those three locations.

Manifold allows use of three types of curved segments:  circular arcs (referred to as circle arcs),  ellipsoidal arcs (referred to as ellipse arcs) and splines.   All three types of curved segments are defined by beginning and end coordinates plus intermediate coordinates from which the shape of the curved segment is mathematically derived.   The illustration above shows a single line in the process of being created via the New Object dialog.  It consists of a circle arc segment followed by four straight segments followed by a spline.  The small dots are not points but are control points for defining the circle arc and the spline that can be edited to adjust the shape of the line.

For additional discussion on points, lines and areas, including on branched objects such as branched points, branched lines and branched areas, as well as on multipoints, see the Drawings topic.

## Dialog Controls

The New Object dialog opens when we pressing Ctrl- / (same key as the ? key on most English keyboards - use "Ctrl-?" as a mnemonic).     The dialog provides a toolbar at the top, a large pane in which a table-style view of coordinates appears, and controls at the bottom to facilitate editing coordinates and to create the objects we would like.

### Toolbar

The New Object dialog's toolbar allows us to switch between Add and Edit modes and it also allows us to specify which types of segments between coordinates are used to create new lines or area objects.   When adding point objects, controls to specify segments will not be active since points consist of single coordinates each and are not segments defined by beginning and ending coordinates.

#### Command buttons

Add - Specifies whether new coordinates are added or existing coordinates are edited.   In Add mode (button pushed in) each click of the mouse in the drawing will create a coordinate for an object as defined by the Line, Circle Arc, Ellipse Arc or Spline command buttons.   In Edit mode (button popped out) clicking on a coordinate or intermediate coordinate will select it for editing, allowing it to be dragged to a new position.    Keyboard shortcut:  A to toggle between Add and Edit modes.

Line - (default) Add segments that are straight segments between beginning and end coordinates.  Keyboard shortcut:  L

Circle Arc - Add a curved segment that is a circular arc, which begins as a half-circle that is defined by beginning and end coordinates plus an intermediate coordinate that sets the radius of the circle and the direction outward of the half-circle. After each Circle Arc segment is added the system will automatically switch back to Line.  Keyboard shortcut:  C

Ellipse Arc mode - Add a curved segment that is an ellipsoidal arc, which begins as a half-ellipse that is defined by the beginning and end coordinates plus three intermediate coordinates.  After each Ellipse Arc segment is added the system will automatically switch back to Line.  Keyboard shortcut:  E

Spline  - Add a curved segment that is a spline defined by beginning and end coordinates plus three intermediate coordinates.  After each Spline segment is added the system will automatically switch back to Line.  Keyboard shortcut:  S

Although the system will automatically return to Line segment mode after a curved segment is added, if we want to add another curved segment we can do so by switching to the desired Circle Arc, Ellipse Arc or Spline mode.

Note that in each of these cases when we add coordinates we are extending a single line or area object with segments of various kinds.   We are not adding new objects that are lines or curves adjacent to each other.

We add coordinates by choosing the segment mode and then by clicking in the drawing at the desired location for the new coordinate.    For example, to create a straight line segment we click to specify the location of the beginning coordinate for the segment and then we click again to specify the location of the ending coordinate for the segment.

We add a curved segment such as a Circle Arc also by clicking to mark the beginning and end coordinates of the Circle Arc segment.   When we add curved segments the intermediate coordinates for them will automatically be added to the drawing and to the list of coordinates in the dialog.  Intermediate coordinates will have a letter in their row in the table such as c or e or s identifying them as an intermediate coordinate for a curved segment such as a Circle Arc, an Ellipse Arc or a Spline.   We can then switch into Edit mode to click on and then drag the intermediate coordinate as desired to specify the precise shape of circular arc desired.

In addition to clicking with the mouse we can add coordinates using the keyboard by entering their X and Y coordinate values into the XY: boxes and then pressing the Add Coordinate button or the Add Coordinate and End Branch button.

#### Editing Coordinates

We edit coordinates by first popping out the Add button so the dialog and drawing go into Edit mode.    We can then select a coordinate for editing, either by clicking on it in the drawing or by clicking on the row handle for that coordinate in the dialog.   Once the coordinate is selected we can move it about by dragging it with the mouse in the drawing or by editing the XY: values in the boxes in the dialog and pressing Set Coordinate button.

#### Multibranched Lines, Multibranched Areas and Multipoints

Branched objects are objects that consist of segments that are not all adjacent.   They may appear to be separate objects when seen in a drawing but they are all the same object.

Consider what appear to be two lines above, in the process of being added to a drawing.

Opening the New Object dialog we can see the values of the coordinates which define their segments.

A line which is not branched is made of segments such that each segment begins at the same coordinate where the prior segment ended.   Each next segment is adjacent to the prior segment.     Looking at the table above there is a straight segment continuing on to each next coordinate until we get to the row marked with an asterisk * character, where there is no line segment to the next coordinate. And then after that with each new coordinate a new line segment is added.

The visual display and the dialog show a single line object even though it looks like two separate line objects in the display.   In this case we have a single line object with two branches.   It could have had yet more branches, dozens or even hundreds of them.

While it may seem to someone new to GIS that lines which visually appear to be two different objects but are logically a single object are a formula for endless confusion and error as opposed to a more straightforward convention where what looks like one object is one object and what looks like two objects is indeed two objects, there are  practical reasons why branched objects may be used.

The most common of these is the nearly universal GIS convention that the way to represent areas that have "islands" or "holes" in them in vector drawings is by using multiple branches.   One branch, usually the first, is the boundary of the area and any subsequent branches are taken to indicate the boundaries of internal islands or holes in the area.   An example showing how to create an area with a hole in it shows the idea.

There are cases where it also makes more or less obvious sense why one would want a multibranched line object.   For example, in some CAD systems to draw a representation of a chair it might be easier to create the chair as a single line object that seems to be many lines that together illustrate a chair, instead of using separate line objects and trying to move them all together within drawings by some sort of field that indicates all of those line records are part of the same chair and should always be grouped together.   Making them all one object, that is a single geom within a single record, ensures they always stay together.

There might even be cases where it makes sense to create a multipoint object, that is an object which appears to be several separate point objects but is in fact a single point.   For example, in electrical CAD design having the two center points for mounting holes for a particular connector created as a single point with two coordinates, one at each hole's center location, might make sense.   But such uses are relatively rare.

Manifold's controls for branched objects are there primarily to help work with common cases such as branched areas and secondarily to allow the system to work with data imported from other formats or created by other users who may have used branched objects in their work.

Creating branched objects is simple: in the case of lines or areas click as usual to add new coordinates.   Shift-click to add the last coordinate of a branch and with the next click a new branch will be started.    When creating points the system will automatically create non-branched points.

To add multipoints, click to create points as usual where desired and then change the command button at the bottom of the dialog to Add Point / Multipoint and then press the Add Point / Multipoint button.   Instead of creating multiple point objects (the default) the system will then create the coordinates clicked as a single, multipoint object.

#### Multipoints and Multiple Branches in Points

So far we have discussed multipoints by analogy to branched lines and branched areas.  Given the casual use of the word "multipoint" in GIS circles to mean "something that looks like a lot of different points but is only one point object" that's not a bad approach, especially given the extreme rarity of ever encountering a hyper-technical situation where the word "multipoint" is shown not to be an exact synonym for "branched point."   But there are indeed situations, very rare situations, where the distinction matters.

The distinction is that a point object can be created as a multipoint object, a special sort of object which consists of multiple coordinates even though it is just one point object. When displayed in a drawing a multipoint is a single point object that appears to be multiple, different points in the visual display.

A point object can also be created as branched point object, a single point object that has multiple branches.   If each of those branches has one coordinate in it the result is something that looks and acts very much like a multipoint:  it is a single point object that appears to be multiple, different points when displayed in a drawing.

In the "truly weird" department, a multipoint itself can be created with more than one branch.   For example, what in a visual display appears to be seven different points could instead be a single multipoint that has two branches, with four coordinates in one branch and three coordinates in the second branch.

If multipoints with branches are a possibility in a data set with which we are working, when we look at a visual display that appears to show seven separate points we cannot tell from the simple, superficial appearance if we are looking at seven point objects, a single multipoint with no branches, a multipoint with seven branches or of any permutation of points, multipoints and branches that yield the same visual effect.

Given the obvious possibilities for chaos and confusion most people who create data sets who seek to avoid chaos and confusion will refrain from using multipoints when they could use separate point objects.  To avoid even more confusing situations, no one in their right minds uses multipoints that also include multiple branches within their internal structure if instead multipoints without branches could be used.  But sometimes when dealing with legacy data, perhaps once in a professional lifetime, we may encounter multipoints with internal branches.   Manifold can handle such data.

#### Visual Display of Curved Segments

Curved segments used in objects such as lines and areas are defined by the start and end coordinates of the segment plus one or more intermediate coordinates that are used within a mathematical formula to derive the precise shape of the curve.

Because the mathematical derivation results in a fundamentally analog, infinitely precise curve as a matter of mathematics, but computers are digital devices that quantize matters such as XY positions, the visual display of a what in mathematical theory is a perfectly precise curve will always be a visual approximation.  The quantized approximation is analogous to how a precise curve on a computer display will always have "the jaggies" if we magnify our view to where we can see how individual pixels in the display quantize a smooth curve into a step-function of discrete pixels.

When displaying such curved segments in visual display windows Manifold approximates their appearance by creating the curved segment out of multiple straight line segments that give the appearance of a curve.    The number of segments are chosen by a display algorithm that reckons the zoom level and considers how close the straight line segment approximation would be to the ideal curve at that zoom level.

If the approximation is too far off in some spots by more than some internally allowed number of pixels the algorithm chooses to use more segments to approximate the appearance of the curve.

The algorithm normally produces reasonably appealing visual results but sometimes it estimates poorly and the resulting "curved segment" looks very much like it is an obvious polygon made up of straight segments.

For example, the polygon-looking half-circle portion of the line above is really a Circle Arc curved segment even though the algorithm at the zoom level used makes it appear to be composed of straight line segments.

In such cases if we zoom in or out and the curve smooths out we know that it is the approximate effect we see and we are looking at a curved segment, not at a sequence of straight line segments.

In the screenshot above we see the same curved segment zoomed in so it fills much of the monitor, and we can see it is a curved segment and not made up of straight line segments.

## Curved Segments are a Poor Choice for GIS

For maximum precision we should always use straight segments in spatial work.  Manifold supports curved segments to facilitate import of such segments from CAD systems and other software that uses curved segments but with the expectation that after import such curved segments will be transformed into straight segments more useful in GIS.  One hallmark of non-GIS software, such as CAD, tends to be that curvilinear constructions, such as splines, are used only within what ends up being always the same Cartesian coordinate system.    CAD systems, for example, do not usually feature re-projections into profoundly different coordinate systems that can radically change the shape of objects.

GIS systems, however, do feature such radical changes where what once was straight rarely ends up being straight after a re-projection, and what once was a curve of known shape based on the locations of defining points and formulae using those points becomes a totally different curve in the new coordinate system.   Even a change in scale can cause radical changes in shape given the highly non-linear nature of most geographic projections.

For those reasons, curved segments in GIS tend to look right only within the scale and the coordinate system for which they were created.   Zoom in or out and the appearance of the curved segment can change significantly.  Change the coordinate system or transform the object's geometry and the result will most likely be nothing like the original curve.

For those reasons, using curved segments within GIS is almost always a mistake.  When creating new objects intended for GIS use it is almost always a very bad idea to create them as curved segments.   When working with objects that have been imported from other software and have curved segments it is almost always a very good idea, usually a required move anyway,  before working with them in GIS as spatial data to first convert such curved segments into the usual straight line segments that can be manipulated using well-known GIS infrastructure and transformations.

Tech Tip:   Curved segments may be rendered in drawing windows as approximations that appear to be made up of straight line segments and not curves.  Rendering of curved segments in drawings depends greatly upon zoom level, coordinate system and other factors so that curved segments are normally rendered using straight segment approximations.   For illustrations and means to convert curved segments to straight segments see the Linearize template in the Transform Templates - Geom topic.

## Examples

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.  Important:  This topic no longer applies to current Manifold editions.

Example: Create an Area with a Hole - 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 - Create an area in a drawing where the area includes holes and also islands.

Example: Create a Multipoint - How to create multipoints. 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.

## Notes

Zillions of digits after the decimal point - Why are the coordinate numbers in some illustrations relatively short numbers like 199.5 or 177.5 but sometimes when we try to repeat this example the numbers have many digits after the decimal point as in the illustration above?   That depends upon the zoom level we use in the drawing.

If we create a new. blank drawing in the Project pane, open it and without zooming in or out begin adding new lines we are working at the default zoom level of a drawing when it opens.   At the default zoom level, every pixel on the screen occupies a more or less round number of units of measure in whatever coordinate system the drawing utilizes, so no matter where we click we click on a pixel at some reasonably round number of units of measure.     We might click at a coordinate location with numbers such as 199.5 or 177.5 but because we cannot click into a fraction of a pixel we cannot click at a location that has numbers such as 15.921622760800847 or -52.834836670179136.

In contrast, when we zoom in or out, especially if we use Zoom Box where Manifold will zoom not to some quantized zoom level but to whatever zoom we command with formidable mathematical accuracy, the coordinate numbers that each pixel represents could easily be some fraction that could extend with many digits past the decimal point.

In fact, Manifold uses full accuracy at all times but the system truncates endless strings of zeros so instead of showing numbers like 199.500000000000000 the dialogs simply show 199.5.

How do we constrain our creation of objects so that we always click onto coordinates that are reasonably round numbers?   Easy:  we always edit using default zoom levels.    If we want to go beyond that and to use whatever zoom we like while constraining new coordinates to reasonably round values, we use a snap to grid or similar feature.

Getting Started

User Interface Basics

Drawings

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

Example: Trace an Area in a Map over an Image Background - In a map with a drawing layer above an image layer, create an area object in the drawing by tracing over the outlines of something seen in the image layer below.