# geoprocessamento transformações vetor x raster. transformações ponto...

Post on 21-Apr-2015

112 views

Category:

## Documents

Embed Size (px)

TRANSCRIPT

• Slide 1
• Geoprocessamento Transformaes vetor x raster
• Slide 2
• Transformaes Ponto vetor x ponto raster Linha vetor x linha raster Polgono vetor x polgono raster (algoritmo point in polygon) No IDRISI estas transformaes so feitas sobre imagem j existente Esta imagem pr-existente pode ser composta por zeros Muitas vezes necessrio criar esta imagem com INITIAL
• Slide 3
• Transformao Vetor - raster Transformao de pontos Pontos vetoriais podem ser transformados em pontos raster Inicia com grade vazia Tipos de transformaes Registra a presena de 1 ou mais pontos numa clula (0 ou 1) Conta a freqencia de pontos dentro de uma clula Assume o valor do ponto vetorial na clula Registra o valor da soma dos identificadores dos pontos Utilidade: semente para delimitao de bacia um ponto; estrada vetorial somente pode ser considerada em uma anlise de caminho timo se for rasterizada
• Slide 4
• Transformao ponto vetor x ponto raster Crie um raster vazio adequado (use Initial) Extremos xmin, xmax, ymin, ymax Resoluo Faa a operao vector to raster
• Slide 5
• Slide 6
• Linha vetor x linha raster
• Slide 7
• Converso de polgonos
• Slide 8
• SPRING Bsico8 Converso Vetor - Varredura
• Slide 9
• O algoritmo Point in polygon Converses vetor x raster Responder perguntas como: Este posto pluviomtrico est dentro da bacia? Este ponto em que foi identificado o mosquito da dengue est dentro do municpio? Este ponto de captao de gua est na bacia A ou B? Quantos dos pontos do conjunto X esto dentro da regio Y?
• Slide 10
• Point in polygon Point-In-Polygon Algorithm Determining Whether A Point Is Inside A Complex Polygon 1998 Darel Rex Finley. This complete article, unmodified, may be freely distributed for educational purposes. http://www.alienryderflex.com/polygon/
• Slide 11
• Figure 1 demonstrates a typical case of a severely concave polygon with 14 sides. The red dot is a point which needs to be tested, to determine if it lies inside the polygon. The solution is to compare each side of the polygon to the Y (vertical) coordinate of the test point, and compile a list of nodes, where each node is a point where one side crosses the Y threshold of the test point. In this example, 8 sides of the polygon cross the Y threshold, while the other 6 sides do not. Then, if there are an odd number of nodes on each side of the test point, then it is inside the polygon; if there are an even number of nodes on each side of the test point, then it is outside the polygon. In our example, there are 5 nodes to the left of the test point, and 3 nodes to the right. Since 5 and 3 are odd numbers, our test point is inside the polygon. (Note: This algorithm does not care whether the polygon is traced in clockwise or counterclockwise fashion.)
• Slide 12
• Polgonos complexos Figure 2 shows what happens if the polygon crosses itself. In this example, a 10-sided polygon has lines which cross each other. The effect is much like "exclusive or", or XOR as it is known to assembly- language programmers. The portions of the polygon which overlap cancel each other out. So, the test point is outside the polygon, as indicated by the even number of nodes (2 and 2) on either side of it.
• Slide 13
• Interseo coincide com pontos In Figure 3, the 6- sided polygon does not overlap itself, but it does have lines that cross. This is not a problem; the algorithm still works fine.
• Slide 14
• Interseo coincide com segmento Figure 5 shows the case of a polygon in which one of its sides lies entirely on the threshold. Simply follow the rule as described concerning Figure 4. Side c generates a node, because it has one endpoint below the threshold, and its other endpoint on-or-above the threshold. Side d does not generate a node, because it has both endpoints on-or-above the threshold. And side e also does not generate a node, because it has both endpoints on-or-above the threshold.
• Slide 15
• Converso polgono vetorial polgono raster no Idrisi Polgono vetor Raster vazio (apenas zeros) Crie um raster vazio adequado (use Initial) Extremos xmin, xmax, ymin, ymax Resoluo Faa a operao vector to raster
• Slide 16
• Converso polgono vetorial polgono raster no Idrisi
• Slide 17
• Sobreposio perfeita!!!
• Slide 18
• Sobreposio perfeita???
• Slide 19
• Reversibilidade das transformaes Transformaes vetor x raster so reversveis? Sim. Existem as operaes inversas, mas parte da informao perdida no caminho.
• Slide 20
• Operao inversa Raster x vetor Linhas no so iguais! Experimente criar uma linha vetorial e transformar para um raster e depois transformar de volta para um vetor. O resultado so duas linhas diferentes!!
• Slide 21
• Operao inversa para polgonos
• Slide 22
• Polgono x vetor Transforme para vetor (polgono) Transforme de volta para raster Verifique diferenas Arquivo raster Towns
• Slide 23
• Medio de distncia de caminhos sobre arquivos raster Da figura ao lado pode-se ver que, embora seja boa a aproximao, a distncia ao longo da linha preta maior, porque ela mais sinuosa. Isto ocorre sempre!
• Slide 24
• ERRORS IN RIVER LENGTHS DERIVED FROM RASTER DIGITAL ELEVATION MODELS Adriano Rolim da Paz*; Walter Collischonn; Alfonso Risso; Carlos Andr Bulhes Mendes Instituto de Pesquisas Hidrulicas, Universidade Federal do Rio Grande do Sul, Caixa Postal 15029, Porto Alegre, RS, CEP 91501-970, Brazil. Email address: adrianorpaz@yahoo.com.br; {collischonn,risso,mendes}@iph.ufrgs.br. *Corresponding author: tel.: +55 51 3308 7511; fax: +55 51 3308 7285. Abstract Length of river reaches is one of the most important characteristics of stream networks when applying hydrological or environmental simulation models. A common method of obtaining estimates of river lengths is based on deriving flow directions, accumulated area and drainage lines from raster digital elevation models (DEM). This method leads to length estimates with variable accuracy, which depends on DEM horizontal resolution, flatness of terrain, DEM vertical accuracy, the algorithm used to obtain flow directions and the way by which distances are calculated over raster structures. We applied an automatic river length extraction method for eight river reaches in the River Uruguay basin (206 000 km2), in Southern Brazil, and compared its results to the lengths obtained from drainage vector lines digitalized over satellite images. Our results show that relative errors can be higher than 30% in flat regions with relatively low DEM resolution. Preprocessing of DEM by the method known as stream burning greatly improves results, reducing errors to the range 1.9% to 7.4%. Further improved estimates were obtained by applying optimized values for the length of orthogonal and diagonal steps called Distance Transforms, reducing the errors to the range -2.0% to 3.3%. A ser publicado em Computers and Geosciences
• Slide 25
• Distance calculations over raster DEMs are normally done step-by-step, accumulating Euclidean distances which depend on the size of the cells and on the travel direction between cells. The distance of a step connecting two orthogonal cells is considered equal to the cell size, while a diagonal step is considered to have a distance equal to 1.414 (square root of 2) times cell size (Burrough and McDonnel, 1998; Fairfield and Leymarie, 1991; Kennedy, 2006). The distance from cell B2 to cell E4 in the example shown in Figure 1-a is calculated by adding the distances of step B2 to C2, plus C2 to D3, plus D3 to E3, plus E3 to E4. If the cell size is 100 m than the total length would be 100+100(21/2)+100+100, or nearly 441 m.
• Slide 26
• As pointed out by De Smith (2004), this ordinary way of calculating length or distance leads to errors, even when using a high-resolution raster. Consider the three examples shown in Figure 1-b. The line from cell A6 to cell A1 follows an orthogonal direction on the raster grid and for this reason is perfectly approximated by the raster structure. The line from cell A6 to cell F1 follows a diagonal direction (45 o ) and can also be correctly approximated by the raster structure. In the case of the line connecting cell A6 to cell F4, however, the best approximation one can obtain is the sinuous path shown by the dashed segments connecting cell centers. Length will be calculated without error for line segments A6-A1 and A6-F1. If we consider a cell side of 1 unit, then the line segment A6-F4, which correct length is close to 5.38 units, will be calculated as having a length of 3+2.(21/2), or close to 5.83 units. In this case, an error of about 8% in calculated length would have been made.
• Slide 27
• Falar de Distance transforms
• Slide 28
• Slide 29
• Tema interessante para trabalho: Caminhos de mnima distncia em polgonos vetoriais
• Slide 30
• Shortest Path Through A Concave Polygon With Holes 2006 Darel Rex Finley. This complete article, unmodified, may be freely distributed for educational purposes.
• Slide 31
• The shortest path between two points inside a polygon may be a straight line: Or, it may have to go around an obstacle: Often, the shortest path will hug the wall