forked from deegree/deegree3
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deegree#849 - writing of single features (PR285)
- Loading branch information
Showing
3 changed files
with
110 additions
and
4 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...-core/deegree-core-base/src/main/java/org/deegree/geojson/GeoJsonSingleFeatureWriter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.deegree.geojson; | ||
|
||
import org.deegree.cs.exceptions.TransformationException; | ||
import org.deegree.cs.exceptions.UnknownCRSException; | ||
import org.deegree.feature.Feature; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Writer for GeoJSON documents with single features. | ||
* | ||
* @author <a href="mailto:goltz@lat-lon.de">Lyn Goltz </a> | ||
*/ | ||
public interface GeoJsonSingleFeatureWriter { | ||
|
||
/** | ||
* Starts a single feature. | ||
* <p> | ||
* To finish the feature call endSingleFeature | ||
* | ||
* @throws IOException | ||
* if GeoJSON could no be written | ||
*/ | ||
void startSingleFeature() | ||
throws IOException; | ||
|
||
/** | ||
* Ends the written feature. | ||
* <p> | ||
* Ensure that startSingleFeature was called before. | ||
* | ||
* @throws IOException | ||
* if GeoJSON could no be written | ||
*/ | ||
void endSingleFeature() | ||
throws IOException; | ||
|
||
/** | ||
* Writes a new, single feature. | ||
* | ||
* @param feature | ||
* the feature to write, never <code>null</code> | ||
* @throws IOException | ||
* if GeoJSON could no be written | ||
* @throws TransformationException | ||
* if a geometry to export cannot be transformed to CRS:84 | ||
* @throws UnknownCRSException | ||
* if the CRS of the geometry is not supported | ||
*/ | ||
void writeSingleFeature( Feature feature ) | ||
throws IOException, UnknownCRSException, TransformationException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters