Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libGPE / src / org / gvsig / gpe / ICoordinateIterator.java @ 19577

History | View | Annotate | Download (1.03 KB)

1
package org.gvsig.gpe;
2

    
3
import java.io.IOException;
4

    
5
/**
6
 * An iterator over the current geometry being parsed intended to be given to the consumer
7
 * {@link IGPEContentHandler}.
8
 * <p>
9
 * This provides an abstraction for specific format parsers to optimize as needed without imposing a
10
 * coordinate structure to the consumer application which may be inefficient for its geometry model.
11
 * </p>
12
 * <p>
13
 * Basically, using this interface allows for the following optimizations:
14
 * <ul>
15
 * <li>Avoid unneeded coordinate parsing where not necessary
16
 * <li>Allows to serve geometry sequences of arbitrary dimensions
17
 * <li>Allows unnecessary copy of large coordinate buffers from different arrays of doubles,
18
 * letting the consumer iterate over the coordinates and build its geometries more efficiently
19
 * </ul>
20
 * </p>
21
 * 
22
 * @author Gabriel Roldan (TOPP)
23
 * @version $Id: ICoordinateIterator.java 19577 2008-03-12 12:50:37Z groldan $
24
 */
25
public interface ICoordinateIterator {
26

    
27
    public boolean hasNext() throws IOException;
28

    
29
    public int getDimension();
30

    
31
    public void next(double[] buffer) throws IOException;
32
}