Class VectorDataNodeReader


  • public class VectorDataNodeReader
    extends Object
    Reader that creates an instance of VectorDataNode for a given CSV (character separated values) input. Clients need to specify: The vector data will be read, clipped according to the product's bounds, and projected onto the model CRS of the target product.
    • 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 a VectorDataNode 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, or null 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 a VectorDataNode 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, or null if no placemark descriptor can be found.
        Throws:
        IOException - if the vector data could not be read.