Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Spanish help please?

That's mine.
Here it goes:

Strategy:
<ul>
<li>Build a graph with all the edges and nodes from the intersection between 
the polygon and the line
<li>Put weights on the nodes depending on the amount of incident edges. Nodes 
are only the intersection points between the polygon boundary and the 
linestring, and the start point of the polygon boundary.
<li>Classify the edges between shared (all the linestring ones) and non shared 
(the polygon boundary ones). Store the coordinate list of an edge on the edge 
object itself.
<li>Start traveling the graph at any node, starting by its first edge.
<li>Alway travel to the next node, selecting the edge whose first segment has 
the lower angle to the left (CCW) with the last segment in the linestring 
from the current edge.
<li>Remove the non shared edges used from the graph.
<li>Decrement in 1 the weight of the used nodes.
<li>Mark the remaining edges that have a node with weight < 3 as non-shared
<li>Remove the nodes with weight < 1 from the graph
</ul>

hope that helps.
Gabriel

On Friday 11 January 2008 11:04:50 pm Jody Garnett wrote:
> I found this charming javadoc:
> >      * Estrategia:
> >      * <ul>
> >      * <li> Construir un grafo con todos los edges y nodes de la
> > intersección del polígono con la
> >      * línea
> >      * <li> Ponderar los nodos según la cantidad de edges incidentes.
> > Nodos son solo las
> >      * intersecciones del boundary del poligono con el linestring y el
> > punto inicial de cada parte
> >      * del boundary.
> >      * <li> Ponderar los edges según son shared (todos los del
> > linestring) o non shared (todos los
> >      * del boundary del poligono). Almacenar la lista de coordenadas
> > del edge en el edge.
> >      * <li> Comenzar a recorrer el grafo por un nodo cualquiera,
> > empezando por su primer edge
> >      * <li> Recorrer siempre hacia el nodo siguiente, seleccionando el
> > edge cuyo primer segmento de
> >      * su linestring presenta un menor angulo a la izquiera (CCW) con
> > el ultimo segmento del
> >      * linestring del edge en curso.
> >      * <li> Eliminar del grafo los edges non-shared que se utilizaron
> >      * <li> Disminuir en 1 la ponderación de los nodos que se utilizaron
> >      * <li> Marcar los edges restantes que tengan algun nodo con
> > ponderación < 3 como non-shared
> >      * <li> Eliminar del grafo los nodos con ponderación 1
> >      * </ul>
>
> Help :-)
> Jody
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
> !DSPAM:4045,4787e80775313327367457!




Back to the top