Revision 19577

View differences:

trunk/libraries/libGPE/src/org/gvsig/gpe/ICoordinateIterator.java
2 2

  
3 3
import java.io.IOException;
4 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$
24
 */
5 25
public interface ICoordinateIterator {
6 26

  
7 27
    public boolean hasNext() throws IOException;
trunk/libraries/libGPE/src/org/gvsig/gpe/IGPEContentHandler2.java
1 1
package org.gvsig.gpe;
2 2

  
3
/**
4
 * Proposal interface change to use {@link ICoordinateIterator} as the callback object for a
5
 * consumer to retrieve the coordinate sequence for a given geometry.
6
 * 
7
 * @author Gabriel Roldan (TOPP)
8
 * @version $Id$
9
 */
3 10
public interface IGPEContentHandler2 extends IGPEContentHandler {
4 11

  
5 12
    public Object startBbox(String id, ICoordinateIterator coords, String srs);
6
    
13

  
7 14
    public Object startInnerPolygon(String id, ICoordinateIterator coords, String srs);
8
    
15

  
9 16
    public Object startLinearRing(String id, ICoordinateIterator coords, String srs);
10
    
11
    public Object startLineString( String id, ICoordinateIterator coords, String srs);
12
    
17

  
18
    public Object startLineString(String id, ICoordinateIterator coords, String srs);
19

  
13 20
    public Object startPoint(String id, ICoordinateIterator coords, String srs);
14
    
21

  
15 22
    public Object startPolygon(String id, ICoordinateIterator coords, String srs);
16 23
}

Also available in: Unified diff