Using the IlvDAFIFReader class to create vector data

To read DAFIF features using the IlvDAFIFReader object:
  1. Create an IlvDAFIFReader instance from the path of the DAFIF catalog:
    String dafifpath = "C:/maps/dafif_0606_ed8/DAFIFT";
    IlvDAFIFReader reader = new IlvDAFIFReader(dafifpath);
    
  2. You can also limit what is read to features specified by particular tables (for further information about DAFIF tables, refer to the DAFIFT format specification). For example, to read only an ARPT table you can use:
    reader.setFeatureClassFilter(new IlvFeatureClassInformation
       (IlvDAFIFDataSource.CODE_PROPERTY_NAME,"ARF/ARF_PAR"));
    
  3. Create a default renderer:
    IlvFeatureRenderer renderer = new IlvDefaultFeatureRenderer();
    
  4. Iterate over the features, render them with an appropriate IlvFeatureRenderer, and assign them to a manager:
    IlvMapFeature feature = reader.getNextFeature();
    while(feature != null) {
      // Render map feature into graphic object.
      IlvGraphic graphic = renderer.makeGraphic(feature,null);
      // Add this object to the first layer of the manager.
      manager.addObject(graphic, 0, false);
      feature = reader.getNextFeature();
    }