15.3. Editando

O QGIS possui vários recursos para editar camadas e tabelas de vetores OGR, SpatiaLite, PostGIS, MSSQL Spatial e Oracle Spatial.

Nota

O procedimento para editar camadas do GRASS é diferente - consulte a seção Digitalizando e editando uma camada vetorial GRASS para mais detalhes.

Atenção

Edições Simultâneas

Esta versão do QGIS não rastreia se outra pessoa estiver editando o mesmo recurso ao mesmo tempo que você. A última pessoa a salvar as edições vence.

Dica

Validando Edições

Continuous validation can be activated on a layer basis in the Layer Properties ► Digitizing tab. More at Propriedades de Digitalização.

15.3.1. Setting the snapping tolerance and search radius

Under the Settings ► Options… ► Digitizing menu, QGIS provides a number of parameters to configure default behaviour of editing tools. More information at Digitizing Settings.

For optimal and accurate editing of vector layer geometries, we need to set an appropriate value of snapping tolerance and search radius for features vertices. The Snapping group provides related options, namely handling of the snapping tolerance and the search radius.

  • Snapping tolerance: When you add a new vertex or move an existing one, the snapping tolerance is the distance QGIS uses to search for the closest vertex or segment you are trying to connect to. If you are not within the snapping tolerance, QGIS will leave the vertex where you release the mouse button, instead of snapping it to an existing vertex or segment.

    The tolerance setting affects all tools that work with snapping and applies by default to new layers and projets. It can however be overridden at layer level (see Snapping and Digitizing Options).

  • Search radius: Search radius for vertex edits is the distance QGIS uses to search for the vertex to select when you click on the map. If you are not within the search radius, QGIS will not find and select any vertex for editing.

A tolerância ao snap e o raio de pesquisa são definidos em `` unidades de mapa`` ou `` pixels``. Pode ser necessário experimentar para acertar. Se você especificar uma tolerância muito grande, o QGIS poderá se ajustar ao vértice errado, especialmente se você estiver lidando com um grande número de vértices nas proximidades. Quanto menor o raio de pesquisa, mais difícil será atingir o que você deseja mover.

15.3.2. Snapping and Digitizing Options

Global snapping and digitizing settings (snapping mode, tolerance value, and units…) can be overridden in the project from the Project ► Snapping Options… menu. In the Snapping and Digitizing Options, you can also configure some other properties (snapping layers, scale limit, topology…) The guilabel:Snapping Toolbar gives access to most of these features.

By default, snapping is disabled in a project until you press the aderindo Enable snapping button or press S. The snapping mode, tolerance value, and units can also be configured in this toolbar.

15.3.2.1. Snapping properties

Existem três opções para selecionar as camadas nas quais ajustar:

  • : guilabel: Todas as camadas: configuração rápida para todas as camadas visíveis no projeto, para que o ponteiro se encaixe em todos os vértices e / ou segmentos. Na maioria dos casos, é suficiente usar esse modo de ajuste, mas tenha cuidado ao usá-lo em projetos com muitas camadas de vetores, pois isso pode afetar o desempenho.

  • : guilabel: Camada atual: somente a camada ativa é usada, uma maneira conveniente de garantir consistência topológica na camada que está sendo editada.

  • Advanced Configuration: allows you to enable and adjust snapping mode, tolerance and units, overlaps and scales of snapping on a layer basis (see Fig. 15.87). If you need to edit a layer and snap its vertices to another, make sure that the target layer is checked and increase the snapping tolerance to a higher value. Snapping will not occur to a layer that is not checked in the snapping options dialog.

As for snapping mode, you can choose between Vertex, Segment, Area, Centroid, Middle of Segments and Line Endpoints.

QGIS will show different snap icons depending on the kind of snap:

../../../_images/snap_vertex_icon.png
../../../_images/snap_segment_icon.png
../../../_images/snap_intersection_icon.png

Snapping to a vertex: box icon

Snapping to a segment: hourglass icon

Snapping to an intersection: cross icon

Note that it is possible to change the color of these icons in the Digitizing part of the global settings.

Os valores de tolerância podem ser definidos nas `` unidades de mapa`` do projeto ou em `` pixels``. A vantagem de escolher `` pixels ‘’ é que ele mantém o snap constante em diferentes escalas do mapa. 10 a 12 pixels é normalmente um bom valor, mas depende do DPI da sua tela. O uso de unidades de mapa permite que a tolerância esteja relacionada às distâncias reais do solo. Por exemplo, se você tem uma distância mínima entre elementos, essa opção pode ser útil para garantir que você não adicione vértices muito próximos um do outro.

../../../_images/editProjectSnapping.png

Fig. 15.87 Opções de ajuste (modo de configuração avançada)

Nota

Por padrão, somente os recursos visíveis (os recursos cujo estilo é exibido, exceto as camadas em que a simbologia é “Nenhum símbolo”) podem ser ajustados. Você pode ativar o snap em recursos invisíveis marcando | desmarcado | : guilabel: Habilite o snap em recursos invisíveis na seção: menuselection:` Settings -> Options -> Digitizing`

Dica

** Ativar ajuste por padrão **

Você pode definir o encaixe para ser ativado por padrão em todos os novos projetos na: menuselection: Settings -> Options -> Digitizing Você também pode definir o modo de snap padrão, o valor de tolerância e as unidades, que preencherão a caixa de diálogo: guilabel: opções de snap.

15.3.2.2. Activar atracção nas intersecções

Outra opção disponível é usar | snappingIntersection | : guilabel: encaixe na interseção, que permite encaixar nas interseções geométricas das camadas habilitadas para encaixe, mesmo que não haja vértices nas interseções.

15.3.2.3. Limit snapping to a scale range

In some cases snapping can become very slow. This is often caused by the amount of features in some layers that require a heavy index to compute and maintain. Some parameters exist to enable snapping only when the map view is inside a relevant scale range. This allows to only do the costly index computation related to snapping at a scale where drawing is relevant.

Scale limit to snapping is configured in Project ► Snapping Options…. Limiting snapping to scale is only available in Advanced Configuration mode.

To limit snapping to a scale range you have three modes available:

  • Disabled: Snapping is enabled whatever the current map scale is. This is the default mode.

  • Global: Snapping is limited and only enabled when the current scale of the map is between a global minimum and a global maximum value. When selecting this mode two widgets become available to configure the range of scales in which snapping is enabled.

  • Per layer: The snapping scale range limit is defined for each layer. When selecting this mode two columns become available to configure the minimum and maximum scales for each layer.

Please note that the minimum and maximum scales follow the QGIS convention: minimum scale is the most “zoomed out” scale while maximum scale is the most “zoomed in”. A minimum or maximum scale that is set to “0” or “not set” is considered not limiting.

15.3.2.4. Self-snapping

The snappingSelf Self-snapping option allows you to snap to the geometry that is being edited. Combined with the advanced digitizing panel, this provides a handy way to digitize new edges relative to the previous edges or vertices. Self-snapping can cause invalid geometries, use with caution.

../../../_images/self_snapping.gif

Fig. 15.88 Drawing features with self-snapping

15.3.2.5. Snapping on custom grid

A snapping distance can also be customized on a layer basis in the Digitizing tab of the layer properties dialog. With setting the Geometry precision distance, you enable a dotted grid visible when the map canvas is at a coherent scale for display. Snapping can then be performed on the dots of the grid: an added or modified geometry will have all of its vertices snapped automatically to the closest node of the grid. More information at Propriedades de Digitalização.

15.3.3. Edição Topológica

In addition to these snapping options, the Snapping options… dialog (Project ► Snapping options) and the Snapping toolbar allow you to enable / disable some other topological functionalities.

15.3.3.1. Ativar edição topológica

A | edição topopológica | : sup: botão Edição topológica ajuda na edição e manutenção de recursos com limites comuns. Com esta opção ativada, o QGIS ‘detecta’ limites compartilhados. Quando você move vértices / segmentos comuns, o QGIS também os move nas geometrias dos recursos vizinhos.

A edição topológica funciona com recursos de diferentes camadas, desde que as camadas estejam visíveis e no modo de edição.

In layer with Z values, topological editing will interpolate the Z value of the vertex based on the value of the edge used for the connection.

15.3.3.2. Overlapping control

Overlapping prevents you from drawing new features that overlap existing ones in the selected layer, speeding up digitizing of adjacent polygons. It can be controlled by the overlap tool. Three modes are available:

  1. permitirInterseções Allow Overlap (default)

  2. avoidIntersectionsCurrentLayer Avoid Overlap on Active Layer: prevents any overlap with other features from the layer being edited. Digitize the new geometries so that they overlap their neighbours and QGIS will cut the overlapping part(s) of the new geometries and snap them to the boundary of the existing features. The advantage is that you don’t have to digitize the common vertices on boundary.

  3. avoidIntersectionsLayers Follow Advanced Configuration: allows the overlapping setting to be set on a layer basis in the Advanced configuration view mode.

Nota

Se a nova geometria for totalmente coberta pelas existentes, ela será limpa e o QGIS mostrará uma mensagem de erro.

Aviso

** Use com cuidado a opção **: guilabel: Evitar sobreposição ** **

Como essa opção cortará novas geometrias sobrepostas de qualquer camada de polígono, você poderá obter geometrias inesperadas se esquecer de desmarcá-la quando não for mais necessária.

15.3.3.3. Rastreamento automático

Geralmente, ao usar as ferramentas de captura de mapas (adicionar recurso, adicionar peça, adicionar anel, remodelar e dividir), você precisa clicar em cada vértice do recurso. Com o modo de rastreamento automático, você pode acelerar o processo de digitalização, pois não precisa mais colocar manualmente todos os vértices durante a digitalização:

  1. Ative o | rastreio | : sup: Tracing (na barra de ferramentas: guilabel:` Snapping`) pressionando o ícone ou pressionando: kbd: tecla T.

  2. : ref: Ajustar para um vértice ou segmento de um recurso que você deseja rastrear.

  3. Move the mouse over another vertex or segment you’d like to snap and, instead of the usual straight line, the digitizing rubber band represents a path from the last point you snapped to the current position. The tool also works with curved geometries.

    O QGIS realmente usa a topologia de recursos subjacente para criar o caminho mais curto entre os dois pontos. O rastreamento exige que o snap seja ativado em camadas rastreáveis ​​para criar o caminho. Você também deve encaixar em um vértice ou segmento existente ao digitalizar e garantir que os dois nós sejam topologicamente conectáveis ​​pelas bordas dos recursos existentes; caso contrário, o QGIS não poderá conectá-los e, portanto, traçará uma única linha reta.

  4. Clique e QGIS posiciona os vértices intermediários seguindo o caminho exibido.

Desdobre o | rastreio | : sup: Ative o rastreio e defina a opção: guilabel:` Offset` para digitalizar um caminho paralelo aos recursos em vez de rastreá-los. Um valor positivo desloca o novo desenho para o lado esquerdo da direção de rastreamento e um valor negativo faz o oposto.

Nota

** Ajuste as configurações de escala ou ajuste do mapa para um rastreamento ideal **

Se houver muitos recursos na exibição do mapa, o rastreamento será desativado para evitar a preparação potencialmente longa da estrutura de rastreamento e a sobrecarga de memória. Após ampliar ou desativar algumas camadas, o rastreamento é ativado novamente.

Nota

** Não adiciona pontos topológicos **

Esta ferramenta não adiciona pontos às geometrias poligonais existentes, mesmo que: guilabel: Edição topológica esteja ativada. Se a precisão da geometria estiver ativada na camada editada, a geometria resultante poderá não seguir exatamente uma geometria existente.

Dica

** Ative ou desative rapidamente o rastreio automático pressionando a tecla **: kbd: T **

Pressionando a tecla: kbd: T, o rastreamento pode ser ativado / desativado a qualquer momento (mesmo durante a digitalização de um recurso), para que seja possível digitalizar partes do recurso com o rastreamento ativado e outras partes com o rastreamento desativado. As ferramentas se comportam como de costume quando o rastreamento está desativado.

Dica

Converter traçado em geometrias curvas

By using Settings ► Options ► Digitizing ► Tracing you can create curved geometries while digitizing. See digitizing options.

15.3.4. Digitalizar uma camada existente

Por padrão, o QGIS carrega camadas somente leitura. Essa é uma salvaguarda para evitar a edição acidental de uma camada, se houver um deslizamento do mouse. No entanto, você pode optar por editar qualquer camada, desde que o provedor de dados a suporte (consulte: ref: supported_format), e a fonte de dados subjacente é gravável (ou seja, seus arquivos não são somente leitura).

Dica

** Restrinja a permissão de edição em camadas dentro de um projeto **

Na tabela: menuselection: Projeto -> Propriedades … -> Fontes de dados -> Recursos de camadas, você pode optar por definir qualquer camada somente leitura, independentemente da permissão do provedor. Essa pode ser uma maneira prática, em um ambiente de vários usuários, para evitar que usuários não autorizados editem camadas por engano (por exemplo, Shapefile), portanto, dados potencialmente corrompidos. Observe que essa configuração se aplica apenas ao projeto atual.

Em geral, as ferramentas para editar camadas vetoriais são divididas em uma barra de ferramentas de digitalização e uma avançada, descritas na seção: ref: sec_advanced_edit. Você pode selecionar e desmarcar os dois em: menuelection: View -> Barras de ferramentas ->.

Usando as ferramentas básicas de digitalização, você pode executar as seguintes funções:

Ícone

Finalidade

Ícone

Finalidade

todasAsEdições

Access to save, rollback or cancel changes in all or selected layers simultaneously

toggleEditing

Turn on or off edit status of selected layer(s) based on the active layer status

salvarEdições

Salvar edições na camada ativa

novaLinhaTabela

Adicionar novo registro

capturePoint

Adicionar Feição: Ponto de Captura

captureLine

Adicionar recurso: Linha de captura

capturar polígono

Adicionar recurso: Capturar polígono

Ferramenta de vértice

Ferramenta de Vértice (todas as camadas)

|Camada ativa da ferramenta vértice|

Ferramenta Vértice (camada atual)

multiEdit

Modifique os atributos de todos os recursos selecionados simultaneamente

excluir recursos selecionados

Excluir feições selecionadas da camada ativa

editarCortar

Recortar feições da camada ativa

editarCopiar

Copiar as feições selecionadas da camada ativa

editarColar

Colar feições na camada ativa

desfazer

Undo changes in the active layer

refazer

Redo changes in active layer

Edição da Tabela: Edição básica da camada vectorial pela barra de ferramentas

Observe que, ao usar qualquer uma das ferramentas de digitalização, você ainda pode: ref: ampliar ou deslocar na tela do mapa sem perder o foco na ferramenta.

All editing sessions start by choosing the toggleEditing Toggle editing option found in the context menu of a given layer, from the attribute table dialog, the digitizing toolbar or the Layer menu.

Quando a camada estiver no modo de edição, botões de ferramentas adicionais na barra de ferramentas de edição ficarão disponíveis e os marcadores aparecerão nos vértices de todos os recursos, a menos que: guilabel: Mostrar marcadores apenas para os recursos selecionados opção em: menuelection:` Settings -> Opções … -> O menu Digitalizar` está marcado.

Dica

Salvar Regularmente

Remember to salvarEdições Save Layer Edits regularly. This will also check that your data source can accept all the changes.

15.3.4.1. Adicionando Elementos

Dependendo do tipo de camada, você pode usar o | newTableRow | : sup: Adicionar registro, | capturePoint | : sup: Adicionar recurso de ponto, | captureLine | : sup: Adicionar recurso de linha ou | capturePolygon | : sup: ícones Adicionar recurso de polígono na barra de ferramentas para adicionar novos recursos à camada atual.

To add a geometryless feature, click on the novaLinhaTabela Add Record button and you can enter attributes in the feature form that opens.

To create features with the spatially enabled tools, you first digitize the geometry then enter its attributes. To digitize the geometry:

  1. Left-click on the map area to create the first point of your new feature. For point features, this should be enough and trigger, if required, the feature form to fill in their attributes.

  2. For line or polygon geometries, keep on left-clicking for each additional point you wish to capture. You can rely on the snapping to features options, the snap-to-grid or the advanced digitizing panel to accurately position each vertex.

    Along with placing nodes clik by click, lines and polygons can be:

    • traced automatically, accelerating the digitization. This will create consecutive straight lines between the vertices you place.

    • free-hand digitized, pressing R or activating streamingDigitize Stream digitizing in the Advanced Digitizing Toolbar.

    Nota

    Pressionar: kbd: Excluir ou: kbd: tecla Backspace `reverte o último nó y ou adicione.

  3. Quando você terminar de adicionar pontos, clique com o botão direito do mouse em qualquer lugar na área do mapa para confirmar que você terminou de inserir a geometria desse recurso.

    Nota

    Ao digitalizar geometrias de linhas ou polígonos, você pode alternar entre linear: guilabel: Adicionar recurso `tools e: ref: ferramentas de cordas circulares `para criar geometrias curvas compostas.

    Dica

    ** Personalize a faixa de borracha digitalizada **

    Ao capturar o polígono, o elástico vermelho por padrão pode ocultar recursos ou locais subjacentes que você deseja capturar um ponto. Isso pode ser corrigido configurando uma opacidade mais baixa (ou canal alfa) no menu: guilabel: Cor de preenchimento do elástico em: seleção de menu: Configurações -> Opções -> Digitalização. Você também pode evitar o uso do elástico marcando: guilabel: Não atualize o elástico durante a edição do nó.

  4. For line feature pressing Shift + right-click will close the line automatically.

  5. The attribute window will appear, allowing you to enter the information for the new feature. Fig. 15.89 shows setting attributes for a fictitious new river. However, in the Digitizing menu under the Settings ► Options menu, you can also:

    • caixa de seleção Suppress attributes pop-up windows after each created feature to avoid the form opening;

    • ou | caixa de seleção | : guilabel: Reutilizar os últimos valores de atributo inseridos para ter campos automaticamente preenchidos na abertura do formulário e apenas digitar valores alterados.

../../../_images/editDigitizing.png

Fig. 15.89 Caixa de diálogo Inserir valores de atributo após digitalizar um novo recurso de vetor

15.3.4.2. Ferramenta Vertex

O QGIS fornece duas ferramentas para interagir com os vértices das feições vetoriais:

  • vertexToolActiveLayer Vertex Tool (Current Layer): only overlaid features in the active layer (in the Layers panel) are affected

  • Ferramenta de vértice Vertex Tool (All Layers): any overlaid features in all editable layers are affected. This allows you to edit features without switching the active layer or edit multiple layers at once (e.g., country and their regions boundaries)

For any editable vector layer, the vertex tools provide manipulation capabilities of feature vertices similar to CAD programs. It is possible to select multiple vertices at once and to move, add or delete them altogether. The vertex tools also support the topological editing feature. They are selection persistent, so when some operation is done, selection stays active for this feature and tool.

It is important to set the property Settings ► opções Options ► Digitizing ► Search Radius: selecionarNúmero to a number greater than zero. Otherwise, QGIS will not be able to tell which vertex is being edited and will display a warning.

Dica

Marcadores de Vértice

QGIS supports different kinds of vertex markers: ‘Semi-transparent circle’, ‘Cross’ and ‘None’. To change the marker style, choose opções Options from the Settings menu, click on the Digitizing tab and select the appropriate entry.

Operações Básicas

Dada uma camada no modo de edição, comece ativando a ferramenta vértice. Círculos vermelhos aparecerão ao passar o mouse sobre os vértices.

  • Selecionando os vértices: Você pode selecionar os vértices por:

    • Clicking on them one at a time holding Shift key pressed

    • Click-and-dragging a rectangle surrounding the target vertices

    • Drawing a polygon surrounding the target vertices: Hold Alt and click using the vertex tool to start digitizing a polygon. Each subsequent click adds a new vertex to the rubberband polygon. Backspace or Delete removes last added rubberband vertex. Esc cancels the polygon selection mode, as also does backspacing/deleting all of the rubberband’s vertices. Right click finalizes the polygon digitizing and selects all vertices within the rubberband polygon.

    When a vertex is selected, its color changes to blue. To add more vertices to the current selection, hold down the Shift key while proceeding as above. To remove vertices from the selection, hold down Ctrl.

    Dica

    Feature selection bounds vertex tool

    Vertices can be selected accross different features (or layers). If you are looking for vertices of a specific feature in a crowded place, first select that feature. Then draw the rectangle or polygon selector with the vertex tool around the vertices: only the selected feature’s vertices are selected.

    This is also the case if you display the feature in the vertex editor panel.

  • Batch vertex selection mode: The batch selection mode can be activated by pressing Shift+R. Select a first node with one single click, and then hover without clicking another vertex. This will dynamically select all the nodes in between using the shortest path (for polygons).

    ../../../_images/vertex_batch_selection_mode.png

    Fig. 15.90 Batch vertex selection using Shift+R

    Press Ctrl will invert the selection, selecting the longest path along the feature boundary. Ending your node selection with a second click, or pressing Esc will escape the batch mode.

  • Adding vertices: To add a vertex to a line or polygon geometry, hold Shift and double-click the place on the segment.

    When hovering a segment, a virtual new node appears on the center. Click on it, move the cursor to a new location and click again to add a new vertex. For lines, a virtual node is also proposed at both extremities: click on it, do subsequent clicks and finish with a right-click; this allows to easily extend an existing line.

    ../../../_images/vertex_add_node.png

    Fig. 15.91 Nós virtuais para adicionar vértices

  • ** Excluindo vértices **: selecione os vértices e clique na tecla: kbd: Excluir. A exclusão de todos os vértices de um recurso gera, se compatível com a fonte de dados, um recurso sem geometria. Observe que isso não exclui o recurso completo, apenas a parte da geometria. Para excluir um recurso completo, use o | deleteSelectedFeatures | : sup: ferramenta Excluir selecionados.

  • Moving vertices: Select all the vertices you want to move, click on a selected vertex or edge, and click on the desired new location. You can use the snapping to feature capabilities and the Advanced Digitizing Panel constraints for distance, angles, exact X and Y location before the second click. All the selected vertices will be translated.

    However, if the snap-to-grid option is enabled, selected vertices are snapped to the closest grid intersection to their translated position. Unselected vertices are also moved to their closest grid intersection. There is no simple translation.

    ../../../_images/vertex_snap_to_grid.png

    Fig. 15.92 Movendo o vértice superior encaixa todos os vértices na grade

Each change made with the vertex tool is stored as a separate entry in the Undo dialog. Remember that all operations support topological editing when this is turned on. On-the-fly projection is also supported.

O painel do editor de vértices

With enabling a vertex tool, you also open the Vertex Editor panel. Right-clicking over a feature fills the panel with the list of all the vertices of the feature with their x, y (z, m if applicable) coordinates and r (for the radius, in case of circular geometry). The feature is also made exclusive for editing, meaning that the edit of any other features is disabled: new vertices can only be added to the bound feature, selecting and moving of vertices and segments by clicking or dragging the map canvas is only possible for that feature. Also, select a row in the table does select the corresponding vertex in the map canvas, and vice versa. Change a coordinate in the table and the vertex position is updated. You can also select multiple rows and delete them altogether.

../../../_images/vertex_editor_panel.png

Fig. 15.93 Painel do editor de vértices mostrando os nós selecionados

15.3.4.3. Cortando, Copiando e Colando Elementos

Os recursos selecionados podem ser recortados, copiados e colados entre as camadas no mesmo projeto QGIS, desde que as camadas de destino estejam definidas como | toggleEditing | : sup: Alterna a edição de antemão.

Dica

** Transforme o polígono em linha e vice-versa usando copiar / colar **

Copie um recurso de linha e cole-o em uma camada de polígono: O QGIS cola na camada de destino um polígono cujo limite corresponde à geometria fechada do recurso de linha. Essa é uma maneira rápida de gerar geometrias diferentes dos mesmos dados.

Features can also be pasted to external applications as text. That is, the features are represented in CSV format, with the geometry data appearing in the OGC Well-Known Text (WKT) format. WKT and GeoJSON features from outside QGIS can also be pasted to a layer within QGIS.

When would the copy and paste function come in handy? Well, it turns out that you can edit more than one layer at a time and copy/paste features between layers. Why would we want to do this? Say we need to do some work on a new layer but only need one or two lakes, not the 5,000 on our big_lakes layer. We can create a new layer and use copy/paste to plop the needed lakes into it.

Como exemplo, vamos copiar alguns lagos para uma nova camada:

  1. Carregue a camada que quer copiar a partir (camada de origem)

  2. Carregue ou crie a camada que quer copiar para (camada de destino)

  3. Começar a editar a camada de destino

  4. Ative a camada de origem clicando nela na legenda

  5. Use the selecionarRetângulo Select Features by area or single click tool to select the feature(s) on the source layer

  6. Click on the editarCopiar Copy Features tool

  7. Ative a camada de destino clicando na legenda

  8. Clique no | editar Colar | : sup: ferramenta Colar recursos

  9. Parar a edição e salvar as alterações

What happens if the source and target layers have different schemas (field names and types are not the same)? QGIS populates what matches and ignores the rest. If you don’t care about the attributes being copied to the target layer, it doesn’t matter how you design the fields and data types. If you want to make sure everything - the feature and its attributes - gets copied, make sure the schemas match.

Nota

Congruência dos Elementos Colados

If your source and destination layers use the same projection, then the pasted features will have geometry identical to the source layer. However, if the destination layer is a different projection, then QGIS cannot guarantee the geometry is identical. This is simply because there are small rounding-off errors involved when converting between projections.

Dica

** Copiar atributo da string para outro **

If you have created a new column in your attribute table with type ‘string’ and want to paste values from another attribute column that has a greater length the length of the column size will be extended to the same amount. This is because the GDAL Shapefile driver starting with GDAL/OGR 1.10 knows to auto-extend string and integer fields to dynamically accommodate for the length of the data to be inserted.

15.3.4.4. Apagando os Elementos Selecionados

Se quisermos excluir um recurso inteiro (atributo e geometria), podemos fazer isso selecionando primeiro a geometria usando o regular | select Rectangle | : sup: Selecione Recursos por área ou clique único. A seleção também pode ser feita na tabela de atributos. Depois de definir a seleção, pressione: kbd: Excluir ou: kbd: Backspace ou use a tecla | delete Features Selecionadas | : sup: ferramenta Delete Selected para excluir os recursos. Vários recursos selecionados podem ser excluídos de uma só vez.

The editarCortar Cut Features tool on the digitizing toolbar can also be used to delete features. This effectively deletes the feature but also places it on a “spatial clipboard”. So, we cut the feature to delete. We could then use the editarColar Paste Features tool to put it back, giving us a one-level undo capability. Cut, copy, and paste work on the currently selected features, meaning we can operate on more than one at a time.

15.3.4.5. Retroceder e Retomar

The desfazer Undo and refazer Redo tools allows you to undo or redo vector editing operations. There is also a dockable widget, which shows all operations in the undo/redo history (see Fig. 15.94). This widget is not displayed by default; it can be displayed by right-clicking on the toolbar and activating the Undo/Redo Panel checkbox. The Undo/Redo capability is however active, even if the widget is not displayed.

../../../_images/redo_undo.png

Fig. 15.94 Refazer e desfazer etapas de digitalização

When Undo is hit or Ctrl+Z (or Cmd+Z) pressed, the state of all features and attributes are reverted to the state before the reverted operation happened. Changes other than normal vector editing operations (for example, changes done by a plugin) may or may not be reverted, depending on how the changes were performed.

Para usar a tela histórico de desfazer / refazer, basta clicar para selecionar uma operação na lista de histórico. Todas as feições serão revertidas para o estado em que estavam depois da operação selecionada.

15.3.4.6. Salvando as Camadas Editadas

When a layer is in editing mode, any changes remain in the memory of QGIS. Therefore, they are not committed/saved immediately to the data source or disk. If you want to save edits to the current layer but want to continue editing without leaving the editing mode, you can click the salvarEdições Save Layer Edits button. When you turn editing mode off with toggleEditing Toggle editing (or quit QGIS for that matter), you are also asked if you want to save your changes or discard them.

Se as alterações não puderem ser salvas (por exemplo, disco cheio ou os atributos tiverem valores fora do intervalo), o estado na memória do QGIS será preservado. Isso permite que você ajuste suas edições e tente novamente.

Dica

Integridade dos dados

É sempre uma boa idéia fazer backup da fonte de dados antes de começar a editar. Embora os autores do QGIS tenham se esforçado para preservar a integridade dos seus dados, não oferecemos garantia a esse respeito.

Salvando várias camadas ao mesmo tempo

Esse recurso permite a digitalização de várias camadas. Escolha | arquivo Salvar como | : guilabel: Salvar para camadas selecionadas para salvar todas as alterações feitas em várias camadas. Você também tem a oportunidade de | reverter edições | : guilabel: Reversão para camadas selecionadas, para que a digitalização possa ser retirada para todas as camadas selecionadas. Se você deseja parar de editar as camadas selecionadas, cancele Edições | : guilabel: Cancelar para a (s) camada (s) selecionada (s) é uma maneira fácil.

As mesmas funções estão disponíveis para a edição de todas as camadas do projeto.

Dica

** Use o grupo de transações para editar, salvar ou reverter várias alterações de camada ao mesmo tempo **

When working with layers from the same PostGreSQL database, activate the Automatically create transaction groups where possible option in Project ► Properties… ► Data Sources to sync their behavior (enter or exit the edit mode, save or rollback changes at the same time).

15.3.5. Digitalização Avançada

Ícone

Finalidade

Ícone

Finalidade

cad

Ativar ferramentas avançadas de digitalização

digitalize com curva

Digitize with Curve

streamingDigitize

Enable Stream Digitizing

recurso de movimento mover linha de recurso mover ponto de recurso

Mover feições

mover cópia de recurso | | mover Linha de Cópia de Recursos | | mover Ponto de Cópia de Recurso |

Copiar e Mover Feição(ões)

girar recurso

Rodar Elemento(s)

simplificar

Simplificar elemento

Recurso de escala

Scale Feature

adicionar anel

Adicionar Anel

adicionar parte

Adicionar Parte

encher anel

Preenchimento Anel

linha reversa

Swap direction

excluir anel

Apagar Anel

excluir parte

Apagar Parte

Curva de deslocamento

Curva de Afastamento

remodelar

Refazer elementos

Partes divididas

Dividindo partes

Recursos divididos

Dividir Elementos

mesclar atributos de recurso

Juntar Atributos dos Elementos Selecionados

mesclar recursos

Juntar Elementos Selecionados

girar símbolos de ponto

Rodar Símbolos de Pontos

Símbolos de ponto de deslocamento

Offset Point Symbols

aparar Estender

Trim or Extend Feature

Tabela de edição avançada: Barra de ferramentas de edição avançada de camadas vetoriais

15.3.5.1. Straight, curve and stream digitizing

The digitalize com curva Digitize with Curve tool allows you to draw curves in layers with geometries that support curves. Digitizing a curve requires to provide three points along the curve (start, point along the arc, end) which define it.

The streamingDigitize Stream Digitizing tool allows you to activate and deactivate stream digitizing which allows to create features in freehand mode.

The streaming tolerance affects the spacing between consecutive vertices. Currently, the only supported unit is pixels (px).

15.3.5.2. Mover feições

The recurso de movimento Move Feature(s) tool allows you to move existing features:

  1. Selecionar as feições a serem movidas.

  2. Click on the map canvas to indicate the origin point of the displacement; you can rely on snapping capabilities to select an accurate point.

    You can also take advantages of the advanced digitizing constraints to accurately set the origin point coordinates. In that case:

    1. Primeiro clique no | cad | para ativar o painel.

    2. Digite `` x`` e insira o valor correspondente ao ponto de origem que você deseja usar. Em seguida, pressione o botão | bloqueado | ao lado da opção para bloquear o valor.

    3. Faça o mesmo para a coordenada y.

    4. Click on the map canvas and your origin point is placed at the indicated coordinates.

  3. Move over the map canvas to indicate the destination point of the displacement, still using snapping mode or, as above, use the advanced digitizing panel which would provide complementary distance and angle placement constraints to place the end point of the translation.

  4. Click on the map canvas: the whole features are moved to new location.

Likewise, you can create a translated copy of the feature(s) using the mover cópia de recurso Copy and Move Feature(s) tool.

Nota

If no feature is selected when you first click on the map canvas with any of the Move Feature(s) or Copy and Move Feature(s) tools, then only the feature under the mouse is affected by the action. So, if you want to move several features, they should be selected first.

15.3.5.3. Rodar Elemento(s)

Use the girar recurso Rotate Feature(s) tool to rotate one or multiple features in the map canvas:

  1. Press the girar recurso Rotate Feature(s) icon

  2. Then click on the feature to rotate. The feature’s centroid is referenced as rotation center, a preview of the rotated feature is displayed and a widget opens showing the current Rotation angle.

  3. Click on the map canvas when you are satisfied with the new placement or manually enter the rotation angle in the text box. You can also use the Snap to ° box to constrain the rotation values.

  4. If you want to rotate several features at once, they shall be selected first, and the rotation is by default around the centroid of their combined geometries.

You can also use an anchor point different from the default feature centroid: press the Ctrl button, click on the map canvas and that point will be used as the new rotation center.

If you hold Shift before clicking on the map, the rotation will be done in 45 degree steps, which can be modified afterwards in the user input widget.

To abort feature rotation, press the ESC button or click on the girar recurso Rotate Feature(s) icon.

15.3.5.4. Scale Feature

The Recurso de escala Scale Feature tool is similar to the Rotate feature. Though instead of performing a rotation of selected features, it rescales their geometry. The change is performed in relation to the anchor point and the scale ratio can be manually specified in the widget that appears in the upper corner of the canvas.

15.3.5.5. Simplificar elemento

The simplificar Simplify Feature tool allows you to interactively reshape a line or polygon geometry by reducing or densifying the number of vertices, as long as the geometry remains valid:

  1. Select the simplificar Simplify Feature tool.

  2. Click on the feature or drag a rectangle over the features.

  3. A dialog pops up allowing you to define the Method to apply, ie whether you would like to:

    • simplify the geometry, meaning less vertices than the original. Available methods are Simplify by distance, Simplify by snapping to grid or simplify by area (Visvalingam). You’d then need to indicate the value of Tolerance in Layer units, Pixels or map units to use for simplification. The higher the tolerance is the more vertices can be deleted.

    • or densify the geometries with new vertices thanks to the Smooth option: for each existing vertex, two vertices are placed on each of the segments originated from it, at an Offset distance representing the percentage of the segment length. You can also set the number of Iterations the placement would be processed: the more iterations, the more vertices and smoother is the feature.

    Settings that you used will be saved when leaving a project or an edit session. So you can go back to the same parameters the next time you simplify a feature.

  4. A summary of the modifications that would apply is shown at the bottom of the dialog, listing number of features and number of vertices (before and after the operation and the ratio the change represents). Also, in the map canvas, the expected geometry is displayed over the existing one, using the rubberband color.

  5. When the expected geometry fits your needs, click OK to apply the modification. Otherwise, to abort the operation, you can either press Cancel or right-click in the map canvas.

Nota

Unlike the feature simplification option in Settings ► Options ► Rendering menu which simplifies the geometry just for rendering, the simplificar Simplify Feature tool permanently modifies feature’s geometry in data source.

15.3.5.6. Adicionar Parte

You can adicionar parte Add Part to a selected feature generating a multipoint, multiline or multipolygon feature. The new part must be digitized outside the existing one which should be selected beforehand.

The adicionar parte Add Part can also be used to add a geometry to a geometryless feature. First, select the feature in the attribute table and digitize the new geometry with the adicionar parte Add Part tool.

15.3.5.7. Apagar Parte

The excluir parte Delete Part tool allows you to delete parts from multifeatures (e.g., to delete polygons from a multi-polygon feature). This tool works with all multi-part geometries: point, line and polygon. Furthermore, it can be used to totally remove the geometric component of a feature. To delete a part, simply click within the target part.

15.3.5.8. Adicionar Anel

You can create ring polygons using the adicionar anel Add Ring icon in the toolbar. This means that inside an existing area, it is possible to digitize further polygons that will occur as a ‘hole’, so only the area between the boundaries of the outer and inner polygons remains as a ring polygon.

15.3.5.9. Preenchimento Anel

The encher anel Fill Ring tool helps you create polygon feature that totally falls within another one without any overlapping area; that is the new feature covers a hole within the existing one. To create such a feature:

  1. Select the encher anel Fill Ring tool.

  2. Desenhe um novo polígono sobre o recurso existente: o QGIS adiciona um anel à sua geometria (como se você usasse a ferramenta | addRing |: sup: Add Ring) e cria um novo recurso cuja geometria corresponde ao anel (como se você: ref : traçado sobre os limites internos com a ferramenta | capturePolygon |: sup: Adicionar recurso de polígono).

  3. Or alternatively, if the ring already exists on the feature, place the mouse over the ring and left-click while pressing Shift: a new feature filling the hole is drawn at that place.

    The Feature Attributes form of the new feature opens, pre-filled with values of the “parent” feature and/or fields constraints.

15.3.5.10. Apagar Anel

The excluir anel Delete Ring tool allows you to delete rings within an existing polygon, by clicking inside the hole. This tool only works with polygon and multi-polygon features. It doesn’t change anything when it is used on the outer ring of the polygon.

15.3.5.11. Refazer elementos

You can reshape line and polygon features using the remodelar Reshape Features tool on the toolbar. For lines, it replaces the line part from the first to the last intersection with the original line.

../../../_images/reshape_lines.png

Fig. 15.95 Remodelar linha

Dica

Extend linestring geometries with reshape tool

Use the remodelar Reshape Features tool to extend existing linestring geometries: snap to the first or last vertex of the line and draw a new one. Validate and the feature’s geometry becomes the combination of the two lines.

For polygons, it will reshape the polygon’s boundary. For it to work, the reshape tool’s line must cross the polygon’s boundary at least twice. To draw the line, click on the map canvas to add vertexes. To finish it, just right-click. Like with the lines, only the segment between the first and the last intersections is considered. The reshape line’s segments that are inside the polygon will result in cropping it, where the ones outside the polygon will extend it.

../../../_images/reshape_polygon.png

Fig. 15.96 Remodelar polígono

With polygons, reshaping can sometimes lead to unintended results. It is mainly useful to replace smaller parts of a polygon, not for major overhauls, and the reshape line is not allowed to cross several polygon rings, as this would generate an invalid polygon.

Nota

A ferramenta de mudança de forma pode alterar a posição inicial de um anel ou de uma linha poligonal fechada. Assim, o ponto que está representada ‘duas vezes’ não será o mesmo mais. Isto pode não ser um problema para a maioria das aplicações, mas é algo a considerar.

15.3.5.12. Curvas de Afastamento

The Curva de deslocamento Offset Curve tool creates parallel shifts of line layers. The tool can be applied to the edited layer (the geometries are modified) or also to background layers (in which case it creates copies of the lines / rings and adds them to the edited layer). It is thus ideally suited for the creation of distance line layers. The User Input dialog pops-up, showing the displacement distance.

To create a shift of a line layer, you must first go into editing mode and activate the Curva de deslocamento Offset Curve tool. Then click on a feature to shift it. Move the mouse and click where wanted or enter the desired distance in the user input widget. Holding Ctrl during the 2nd click will make an offset copy. Your changes may then be saved with the salvarEdições Save Layer Edits tool.

QGIS options dialog (Digitizing tab then Curve offset tools section) allows you to configure some parameters like Join style, Quadrant segments, Miter limit.

15.3.5.13. Linha Invertida

Alterar a direção de uma geometria de linha pode ser útil para fins cartográficos ou ao preparar a análise de rede.

Para alterar a direção de uma linha:

  1. Activate the reverse line tool by clicking linha reversa Reverse line.

  2. Clique na linha. A direção da linha é invertida.

15.3.5.14. Dividir Elementos

Use the Recursos divididos Split Features tool to split a feature into two or more new and independent features, ie. each geometry corresponding to a new row in the attribute table.

Para quebrar feições de linha ou polígono:

  1. Select the Recursos divididos Split Features tool.

  2. Draw a line across the feature(s) you want to split. If a selection is active, only selected features are split. When set, default values or clauses are applied to corresponding fields and other attributes of the parent feature are by default copied to the new features.

  3. Você pode então modificar qualquer um dos atributos de qualquer feição resultante.

Dica

Split a polyline into new features in one-click

Using the Recursos divididos Split Features tool, snap and click on an existing vertex of a polyline feature to split that feature into two new features.

15.3.5.15. Dividindo partes

No QGIS, é possível dividir as partes de um recurso de várias partes para aumentar o número de partes. Basta desenhar uma linha na parte que você deseja dividir usando o |  peças separadas | : sup: ícone Split Parts.

Dica

** Divida uma polilinha em novas peças com um clique **

Using the Partes divididas Split Parts tool, snap and click on an existing vertex of a polyline feature to split the feature into two new polylines belonging to the same feature.

15.3.5.16. Juntar elementos selecionados

The mesclar recursos Merge Selected Features tool allows you to create a new feature by merging existing ones: their geometries are merged to generate a new one. If features don’t have common boundaries, a multipolygon/multipolyline/multipoint feature is created.

  1. Primeiro, selecione os recursos que você deseja combinar.

  2. Em seguida, pressione o | mergeFeatures | : sup: botão “Mesclar recursos selecionados”.

  3. Na nova caixa de diálogo, a linha: guilabel: Merge na parte inferior da tabela mostra os atributos do recurso resultante. Você pode alterar qualquer um desses valores:

    • substituindo manualmente o valor na célula correspondente;

    • selecting a row in the table and pressing Take attributes from selected feature to use the values of this initial feature;

    • pressing the Take attributes from the largest geometry to use the attributes from the longest line feature, the largest polygon, or the multipoints with the most parts;

    • pressing Skip all fields to use empty attributes;

    • expanding the drop down menu at the top of the table, select any of the above options to apply to the corresponding field only. There, you can also choose to aggregate the initial features attributes (Minimum, Maximum, Median, Sum, Count, Concatenation… depending on the type of the field. see O painel Estatísticas for the full list of functions).

    Nota

    If the layer has default values or clauses present on fields, these are used as the initial value for the merged feature.

  4. Press OK to apply the modifications. A single (multi)feature is created in the layer, replacing the previously selected ones.

15.3.5.17. Juntar os atributos dos elementos selecionados

The mesclar atributos de recurso Merge Attributes of Selected Features tool allows you to apply same attributes to features without merging their boundaries. The dialog is the same as the Merge Selected Features tool’s except that unlike that tool, selected objects are kept with their geometry while some of their attributes are made identical.

15.3.5.18. Rodar Símbolos de Pontos

The girar símbolos de ponto Rotate Point Symbols allows you to individually change the rotation of point symbols in the map canvas.

  1. First, you need to indicate the field to store the rotation value in. This is made by assigning a field to the symbol data-defined rotation property:

    1. In the Layer Properties ► Symbology dialog, browse to the symbol editor dialog.

    2. Click the Definir dados Data-defined override widget near the Rotation option of the top Marker level (preferably) of the symbol layers.

    3. Choose a field in the Field Type combobox. Values of this field are hence used to rotate each feature’s symbol accordingly.

      You can also check the Store data in project entry to generate an auxiliary data storage field to control the rotation value.

    Nota

    Certifique-se de que o mesmo campo seja atribuído a todas as camadas de símbolos

    A configuração do campo de rotação definido por dados no nível mais alto da árvore de símbolos o propagará automaticamente para todas as camadas de símbolos, um pré-requisito para executar a rotação gráfica de símbolos com a ferramenta: guilabel: Rotate Point Symbols. De fato, se uma camada de símbolo não tiver o mesmo campo anexado à sua propriedade de rotação, a ferramenta não funcionará.

    ../../../_images/rotatepointsymbol.png

    Fig. 15.97 Girando um símbolo de ponto

  2. Then click on a point symbol in the map canvas with the girar símbolos de ponto Rotate Point Symbols tool

  3. Move the mouse around. A red arrow with the rotation value will be visualized (see Fig. 15.97). If you hold the Ctrl key while moving, the rotation will be done in 15 degree steps.

  4. Quando você obtiver o valor do ângulo esperado, clique novamente. O símbolo é renderizado com esta nova rotação e o campo associado é atualizado de acordo.

    Você pode clicar com o botão direito do mouse para abortar a rotação do símbolo.

15.3.5.19. Offset Point Symbols

The Símbolos de ponto de deslocamento Offset Point Symbols allows you to interactively change the rendered position of point symbols in the map canvas. This tool behaves like the girar símbolos de ponto Rotate Point Symbols tool except that it requires you to connect a field to the data-defined Offset (X,Y) property of each layer of the symbol. The field will then be populated with the offset coordinates for the features whose symbol is moved in the map canvas.

  1. Associate a field to the data-defined widget of the Offset (X,Y) property of the symbol. If the symbol is made with many layers, you may want to assign the field to each of them

  2. Select the Símbolos de ponto de deslocamento Offset Point Symbols tool

  3. Clique em um símbolo de ponto

  4. Mover para um novo local

  5. Clique novamente. O símbolo é movido para o novo local. Os valores de deslocamento da posição original são armazenados no campo vinculado.

    You can right-click to abort symbol offset.

Nota

The Símbolos de ponto de deslocamento Offset Point Symbols tool doesn’t move the point feature itself; you should use the vertexToolActiveLayer Vertex Tool (Current Layer) or mover ponto de recurso Move Feature tool for this purpose.

15.3.5.20. Recortar / estender o recurso

The aparar Estender Trim/Extend tool allows you to shorten or lengthen segments of a (multi)line or (multi)polygon geometry to converge with a selected segment (the cutting line). This results in a modified geometry with a vertex snapped to the target segment or in its prolongation. Depending on how the selected geometries are placed in relation to each other, the tool will either:

  • Aparar: remove partes do segmento de linha ou limite de polígono, além da linha de corte

  • Estender: estende os limites dos polígonos ou segmentos de linha para que eles possam se encaixar na linha de corte.

A fim de aparar ou ampliar as geometrias existentes:

  1. Enable appropriate snapping settings on segment for the involved layer(s)

  2. Select the aparar Estender Trim/Extend tool

  3. Clique no segmento de limite alvo, ou seja, o segmento com respeito ao qual você deseja estender ou aparar outro segmento. Parece destacado.

  4. Mude para o segmento que você deseja aparar ou estender. Não precisa ser o último segmento da geometria, mas tem que estar na camada ativa.

  5. Passe o mouse sobre o segmento, e QGIS mostra uma prévia do que seria a geometria do recurso. Se estiver OK, clique no segmento. No caso de um recorte, você deve selecionar a peça que deve ser encurtada.

  6. Quando ambos os segmentos estão em 3D, a ferramenta realiza uma interpolação no segmento limite para obter o valor Z.

Atenção

Pay attention to the modified geometry while using the aparar Estender Trim/Extend tool. Depending on the inputs, it can create invalid geometries, potentially resulting in failure at layer saving.

15.3.6. Digitalização de forma

The Shape Digitizing toolbar offers a set of tools to draw regular shapes and curved geometries.

15.3.6.1. Add Circular string

The circularStringCurvePoint Add circular string or circularStringRadius Add circular string by radius buttons allow users to add line or polygon features with a circular geometry.

Creating features with these tools follow the same rule as of other digitizing tools: left-click to place vertices and right-click to finish the geometry. While drawing the geometry, you can switch from one tool to the other as well as to the linear geometry tools, creating some coumpound geometries.

Nota

Curved geometries are stored as such only in compatible data provider

Although QGIS allows to digitize curved geometries within any editable data format, you need to be using a data provider (e.g. PostGIS, memory layer, GML or WFS) that supports curves to have features stored as curved, otherwise QGIS segmentizes the circular arcs.

15.3.6.2. Desenhar círculos

Há um conjunto de ferramentas para desenhar círculos. As ferramentas são descritas abaixo.

Circles are converted into circular strings. Therefore, as explained in Add Circular string, if allowed by the data provider, it will be saved as a curved geometry, if not, QGIS will segmentize the circular arcs.

  • círculo2Pontos Add circle from 2 points: The two points define the diameter and the orientation of the circle. (Left-click, right-click)

  • círculo3Pontos Add circle from 3 points: Draws a circle from three known points on the circle. (Left-click, left-click, right-click)

  • círculoCentralPonto Add circle from center and a point: Draws a circle with a given center and a point on the circle (Left-click, right-click). When used with the O painel Digitalização avançada this tool can become a “Add circle from center and radius” tool by setting and locking the distance value after first click.

  • círculo3Tangentes Add circle from 3 tangents: Draws a circle that is tangential to three segments. Note that you must activate snapping to segments (See Setting the snapping tolerance and search radius). Click on a segment to add a tangent. If two tangents are parallel, the coordinates of the click on the first parallel tangent are used to determine the positioning of the circle. If three tangents are parallel, an error message appears and the input is cleared. (Left-click, left-click, right-click)

  • círculo2TangentesPonto Add circle from 2 tangents and a point: Similar to circle from 3 tangents, except that you have to select two tangents, enter a radius and select the desired center.

15.3.6.3. Desenhar Elipses

There is a set of tools for drawing ellipses. The tools are described below.

Ellipses cannot be converted as circular strings, so they will always be segmented.

  • elipseCentro2Pontos Add Ellipse from center and two points: Draws an ellipse with a given center, major axis and minor axis. (Left-click, left-click, right-click)

  • elipseCentroPonto Add Ellipse from center and a point: Draws an ellipse into a bounding box with the center and a corner. (Left-click, right-click)

  • elipseExtensão Add Ellipse from extent: Draws an ellipse into a bounding box with two opposite corners. (Left-click, right-click)

  • ellipseFoci Add Ellipse from foci: Draws an ellipse by 2 points for foci and a point on the ellipse. (Left-click, left-click, right-click)

15.3.6.4. Desenhar Retângulos

There is a set of tools for drawing rectangles. The tools are described below.

  • retânguloCentro Rectangle from center and a point: Draws a rectangle from the center and a corner. (Left-click, right-click)

  • extensãoRetangular Rectangle from extent: Draws a rectangle from two opposite corners. (Left-click, right-click)

  • retângulo3PontosDistância Rectangle from 3 points (distance): Draws an oriented rectangle from three points. The first and second points determine the length and angle of the first edge. The third point determines the length of the other edge. One can use O painel Digitalização avançada to set the length of the edges. (Left-click, left-click, right-click)

  • retângulo3PontosProjetado Rectangle from 3 points (projected): Same as the preceding tool, but the length of the second edge is computed from the projection of the third point on the first edge. (Left-click, left-click, right-click)

    ../../../_images/draw_rectangles_3_points.png

    Fig. 15.98 Draw rectangle from 3 points using distance (right) and projected (left)

15.3.6.5. Desenhar Polígonos Regulares

There is a set of tools for drawing regular polygons. The tools are described below. Left-click to place the first point. A dialog appears, where you can set the number of polygon edges. Right-click to finish the regular polygon.

  • regularPolígono2Pontos Regular polygon from two points: Draws a regular polygon where the two points determine the length and angle of the first edge.

  • regularPolígonoCentroPonto Regular polygon from center and a point: Draws a regular polygon from the provided center point. The second point determines the angle and distance to the middle of an edge.

  • regularPolygonCenterCorner Regular polygon from center and a corner: Same as the preceding tool, but the second point determines the angle and distante to a vertex.

15.3.7. O painel Digitalização avançada

When capturing, reshaping, splitting new or existing geometries you also have the possibility to use the Advanced Digitizing panel. You can digitize lines exactly parallel or perpendicular to a particular angle or lock lines to specific angles. Furthermore, you can enter coordinates directly so that you can make a precise definition of your new geometry.

../../../_images/advanced_digitizing.png

Fig. 15.99 O painel Digitalização avançada

The Advanced Digitizing panel can be open either with a right-click on the toolbar, from View ► Panels ► menu or pressing Ctrl+4. Once the panel is visible, click the cad Enable advanced digitizing tools button to activate the set of tools.

Nota

As ferramentas não são habilitadas se a visão do mapa está em coordenadas geográficas.

The aim of the Advanced Digitizing tool is to lock coordinates, lengths, and angles when moving the mouse during the digitalizing in the map canvas.

You can also create constraints with relative or absolute reference. Relative reference means that the next vertex constraints’ values will be relative to the previous vertex or segment.

15.3.7.1. The toolbar

At the top of the Digitizing panel, you find the following buttons:

  • cad Enable advanced digitizing tools

  • cadConstruction Construction mode: allows to capture the clicks’ positions to reuse as reference points to lock distance, angle, X, Y, Z or M relative values. More details at Modo de construção.

  • cadParallel Parallel to draw a line parallel to an existing one (more at Linhas paralelas e perpendiculares)

  • cadPerpendicular Perpendicular to draw a line perpendicular to an existing one (more at Linhas paralelas e perpendiculares)

  • definições Snap to common angles: when moving the cursor, displays a virtual line that you can snap to to add the next vertex. The snapping line is defined by the last added vertex and an (absolute or relative to previous segment) angle from a preset list (following steps of 5°, 10°, 15°, 18°, 22.5°, 30°, 45° or 90°). Choose Do not snap to common angles to disable this feature.

  • floater Floater: displays a live preview of the coordinates right next to the cursor. The values can be accessed and edited using the panel’s shortcuts.

15.3.7.2. Atalhos do Teclado

To speed up the use of Advanced Digitizing Panel, there are a couple of keyboard shortcuts available:

Chave

Simples

Ctrl+ ou Alt+

Shift+

D

Definir distância

Lock distance

A

Definir Ângulo

Lock angle

Toggle relative angle to last segment

X

Definir coordenada X

Lock X coordinate

Toggle relative X to last vertex

Y

Definir coordenada Y

Lock Y coordinate

Toggle relative Y to last vertex

Z

Definir coordenada Z

Lock Z coordinate

Toggle relative Z to last vertex

M

Definir valor M

Lock M value

Toggle relative M to last vertex

C

Alternar modo de construção

P

Alternar entre modos perpendicular e paralelo

Nota

As opções de coordenada Z e valor M estão disponíveis somente se forem compatíveis com a dimensão da geometria da camada.

15.3.7.3. Absolute reference digitizing

When drawing a new geometry from scratch, it is very useful to have the possibility to start digitizing vertexes at given coordinates.

For example, to add a new feature to a polygonal layer, click the capturar polígono button. You can enter the exact coordinates where you want to start editing the feature, i.e.:

  1. Click the x text box (or use the X keyboard shortcut).

  2. Type the X coordinate value you want and press Enter or click the bloqueado button to their right to lock the mouse to the X axis on the map canvas.

  3. Click the y text box (or use the Y keyboard shortcut).

  4. Type the Y coordinate value you want and press Enter or click the bloqueado button to their right to lock the mouse to the Y axis on the map canvas.

  5. If available and relevant, proceed as above to add the Z coordinate and M value (respectively z or m text box).

    Duas linhas pontilhadas azuis e uma cruz verde identificam as coordenadas exatas que você inseriu.

  6. Start digitizing by clicking on the map canvas; a vertex is added at the green cross position.

    ../../../_images/advanced_digitizing_coordinates.png

    Fig. 15.100 Comece a desenhar nas coordenadas fornecidas

  7. You can continue digitizing by free hand, adding a new set of coordinates, or you can type the segment’s length (distance) and angle.

  8. Se você quiser desenhar um segmento de um determinado comprimento:

    1. Click the d (distance) text box (keyboard shortcut D)

    2. Digite o valor da distância (em unidades do mapa)

    3. Press Enter or click the bloqueado button on the right to lock the mouse in the map canvas to the length of the segment. In the map canvas, the latest vertex is surrounded by a circle whose radius is the value entered in the distance text box. A cross on the circle shows the position of the next vertex if you click.

    ../../../_images/advanced_digitizing_distance.png

    Fig. 15.101 Fixed length segment

  9. Você também pode restringir a posição do vértice, definindo o ângulo do segmento. Conforme descrito anteriormente:

    1. Click the a (angle) text box (keyboard shortcut A)

    2. Digite o valor do ângulo (em graus)

    3. Press Enter or click the bloqueado button on the right to lock it. A line going through the latest vertex and rotated based on the set angle appears in the map canvas and a cross on it shows the next vertex position if you click.

    ../../../_images/advanced_digitizing_angle.png

    Fig. 15.102 Fixed angle segment

Dica

Pressing Ctrl+<key> or Alt+<key> automatically locks the target property and puts its value into edit. Modify, press Enter and you are done. Combined with the floater Toggle floater, this can be a real time saver, with keyboard digitizing.

15.3.7.4. Relative reference digitizing

Instead of using absolute values of angles or coordinates, you can also use values relative to the last digitized vertex or segment.

For angles, you can click the delta button on the left of the a text box (or press Shift+A) to toggle relative angles to the previous segment. With that option on, angles are measured between the last segment and the mouse pointer.

For coordinates, click the delta buttons to the left of the x, y, z or m text boxes (or press Shift+<key>) to toggle relative coordinates to the previous vertex. With these options on, coordinates measurement will consider the last vertex to be the origin of the set coordinates.

15.3.7.5. Continuous lock

Both in absolute or relative reference digitizing, angle, distance, X, Y, Z and M constraints can be locked continuously by clicking the lockRepeating Continuous lock buttons. Using continuous lock allows you to digitize several points or vertexes using the same constraints.

15.3.7.6. Linhas paralelas e perpendiculares

All the tools described above can be combined with the cadPerpendicular Perpendicular and cadParallel Parallel tools. These two tools allow drawing segments perfectly perpendicular or parallel to another segment. The target segment can be on another layer, another feature within the layer or the feature being digitized (requires self-snapping option).

Para desenhar um segmento perpendicular:

  1. Primeiro adicione um dos vértices do segmento.

  2. Click the cadPerpendicular Perpendicular icon (keyboard shortcut P) to activate it.

  3. Clique no segmento ao qual você deseja ser perpendicular.

  4. A virtual dotted line perpendicular to the segment through the previous vertex appears. The angle property is locked, constraining the next vertex on that line and, a cross indicates the projected position of the cursor on the line. Click to place the new vertex.

    ../../../_images/advanced_digitizing_perpendicular.png

    Fig. 15.103 Digitalização perpendicular

To draw a parallel segment, the steps are the same except that you need to click on the cadParallel Parallel icon (keyboard shortcut P twice).

../../../_images/advanced_digitizing_parallel.png

Fig. 15.104 Digitalização paralela

Essas duas ferramentas apenas encontram o ângulo certo do ângulo perpendicular e paralelo e bloqueiam esse parâmetro durante sua edição. Desbloqueie o parâmetro ângulo para cancelar seu uso no meio do processo.

15.3.7.7. Modo de construção

You can enable and disable construction mode by clicking on the cadConstruction Construction mode icon or with the C keyboard shortcut. While in construction mode, clicking the map canvas won’t add new vertexes, but will capture the clicks’ positions so that you can use them as reference points to then lock distance, angle or X, Y, Z, M relative values.

Como exemplo, o modo de construção pode ser usado para desenhar algum ponto a uma distância exata de um ponto existente.

With an existing point in the map canvas and the snapping mode correctly activated, you can easily draw other points at given distances and angles from it. In addition to the cad button, you have to activate also the construction mode by clicking the cadConstruction Construction mode icon or with the C keyboard shortcut.

Click next to the point from which you want to calculate the distance and click on the d box (D shortcut) type the desired distance and press Enter to lock the mouse position in the map canvas:

../../../_images/advanced_digitizing_distance_point.png

Fig. 15.105 Distância do ponto

Before adding the new point, press C to exit the construction mode. Now, you can click on the map canvas, and the point will be placed at the distance entered.

You can also use the angle constraint to, for example, create another point at the same distance of the original one, but at a particular angle from the newly added point. Click the cadConstruction Construction mode icon or with the C keyboard shortcut to enter construction mode. Click the recently added point, and then the other one to set a direction segment. Then, click on the d text box (D shortcut) type the desired distance and press Enter. Click the a text box (A shortcut) type the angle you want and press Enter. The mouse position will be locked both in distance and angle.

../../../_images/advanced_digitizing_distance_angle_point.png

Fig. 15.106 Distância e ângulo dos pontos

Before adding the new point, press C to exit the construction mode. Now, you can click on the map canvas, and the point will be placed at the distance and angle entered. Repeating the process, several points can be added.

../../../_images/advanced_digitizing_distance_point_final.png

Fig. 15.107 Pontos a uma dada distância e ângulo

15.3.8. The Processing in-place layer modifier

The Processing menu provides access to a large set of tools to analyze and create new features based on the properties of the input features or their relations with other features (within the same layer or not). While the common behavior is to create new layers as outputs, some algorithms also allow modifications to the input layer. This is a handy way to automate multiple features modification using advanced and complex operations.

Para editar feições no local:

  1. Select the layer to edit in the Layers panel.

  2. Selecione as feições em questão. Você pode pular esta etapa, nesse caso a modificação será aplicada a toda a camada.

  3. Press the processo selecionado Edit Features In-Place button at the top of the Processing toolbox. The list of algorithms is filtered, showing only those compatible with in-place modifications, i.e.:

    • Eles funcionam na origem da feição e não no nível da camada.

    • Eles não alteram a estrutura da camada, por ex. adicionando ou removendo campos.

    • Eles não alteram o tipo de geometria, por ex. de camada de linha para ponto.

    ../../../_images/edit_inplace_algorithms.png

    Fig. 15.108 Algoritmos de processamento: todos (esquerda) vs editores de polígonos no local (direita)

  4. Encontre o algoritmo que deseja executar e clique duas vezes nele.

    Nota

    Se o algoritmo não precisar de nenhum parâmetro adicional definido pelo usuário (excluindo os parâmetros usuais da camada de entrada e saída), o algoritmo será executado imediatamente sem nenhum pop-up de diálogo.

    1. Se forem necessários parâmetros diferentes das camadas usuais de entrada ou saída, a caixa de diálogo do algoritmo será exibida. Preencha as informações necessárias.

    2. Click Modify Selected Features or Modify All Features depending on whether there’s an active selection.

    Changes are applied to the layer and placed in the edit buffer: the layer is indeed toggled to editing mode with unsaved modification as indicated by the editableEdits icon next to the layer name.

  5. As usual, press salvarEdições Save layer edits to commit the changes in the layer. You can also press desfazer Undo to rollback the whole modification.