Class VectorDataNodeReader
- java.lang.Object
-
- org.esa.snap.core.dataio.geometry.VectorDataNodeReader
-
public class VectorDataNodeReader extends Object
Reader that creates an instance ofVectorDataNode
for a given CSV (character separated values) input. Clients need to specify:- a strategy for receiving the CRS the vector data is based on (given by an instance of
FeatureUtils.FeatureCrsProvider
) - a strategy for receiving the instance of
PlacemarkDescriptor
which is responsible for creating placemarks from the vector data (given by an instance ofVectorDataNodeReader.PlacemarkDescriptorProvider
) - The model CRS of the target product
- a strategy for receiving the CRS the vector data is based on (given by an instance of
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VectorDataNodeReader.PlacemarkDescriptorProvider
A strategy for receiving an instance ofPlacemarkDescriptor
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static VectorDataNode
read(String sourceName, Reader reader, Product product, FeatureUtils.FeatureCrsProvider crsProvider, VectorDataNodeReader.PlacemarkDescriptorProvider placemarkDescriptorProvider, org.opengis.referencing.crs.CoordinateReferenceSystem modelCrs, char delimiterChar, boolean convertToVertices, ProgressMonitor pm)
Reads aVectorDataNode
from the given input.static VectorDataNode
read(String sourceName, Reader reader, Product product, FeatureUtils.FeatureCrsProvider crsProvider, VectorDataNodeReader.PlacemarkDescriptorProvider placemarkDescriptorProvider, org.opengis.referencing.crs.CoordinateReferenceSystem modelCrs, char delimiterChar, ProgressMonitor pm)
Reads aVectorDataNode
from the given input.
-
-
-
Method Detail
-
read
public static VectorDataNode read(String sourceName, Reader reader, Product product, FeatureUtils.FeatureCrsProvider crsProvider, VectorDataNodeReader.PlacemarkDescriptorProvider placemarkDescriptorProvider, org.opengis.referencing.crs.CoordinateReferenceSystem modelCrs, char delimiterChar, ProgressMonitor pm) throws IOException
Reads aVectorDataNode
from the given input.- Parameters:
sourceName
- The name of the data source; typically a file name.reader
- A reader for the CSV data.product
- The product the vector data will be added to.crsProvider
- A strategy for receiving the CRS of the vector data.placemarkDescriptorProvider
- A strategy for receiving the placemark descriptor.modelCrs
- The model CRS of the target product.delimiterChar
- The separation character of the CSV data.pm
- A progress monitor.- Returns:
- A
VectorDataNode
containing features according to the input data, ornull
if no placemark descriptor can be found. - Throws:
IOException
- if the vector data could not be read.
-
read
public static VectorDataNode read(String sourceName, Reader reader, Product product, FeatureUtils.FeatureCrsProvider crsProvider, VectorDataNodeReader.PlacemarkDescriptorProvider placemarkDescriptorProvider, org.opengis.referencing.crs.CoordinateReferenceSystem modelCrs, char delimiterChar, boolean convertToVertices, ProgressMonitor pm) throws IOException
Reads aVectorDataNode
from the given input.- Parameters:
sourceName
- The name of the data source; typically a file name.reader
- A reader for the CSV data.product
- The product the vector data will be added to.crsProvider
- A strategy for receiving the CRS of the vector data.placemarkDescriptorProvider
- A strategy for receiving the placemark descriptor.modelCrs
- The model CRS of the target product.delimiterChar
- The separation character of the CSV data.pm
- A progress monitor.- Returns:
- A
VectorDataNode
containing features according to the input data, ornull
if no placemark descriptor can be found. - Throws:
IOException
- if the vector data could not be read.
-
-