Class TLcdSHPTiler

java.lang.Object
com.luciad.format.shp.TLcdSHPTiler

public class TLcdSHPTiler extends Object
Utility for converting SHP files into smaller tiles. It provides support for tiling of both SHP geometry and accompanying DBF files into smaller, tiled data. It can be used to deal with very large SHP files, which do not fit into memory at once. The tiles are organized in a quadtree structure, whereas each level contains 4 times more tiles than the level above, and the top level contains a single tile. Geometries are stored in the smallest possible tile in which they fit completely (each geometry can be contained in only one tile). The levels are complementary, i.e. to obtain the full dataset, all tiles of all levels need to be merged together. This tiler does not provide any facilities for generating multiple levels of detail. Next to the split SHP files, a summary file will be created, named prefix.summary, where prefix is the destination template given to the tiler. It will be a java properties file with the following structure:
   tileCount=5                      # number of files
   tile.0.source=prefix_1_0_0.shp   # filename of a split SHP file
   tile.0.bounds=10,20,30,40        # x,y,width,height of the bounds, as doubles
   tile.0.elements=513              # number of elements in the file
   tile.1.source=...
   tile.1.bounds=...
   tile.1.elements=...
   tile.2.source=...
   tile.2.bounds=...
   tile.2.elements=...
   ...
 
Since:
11.0
  • Constructor Details

    • TLcdSHPTiler

      public TLcdSHPTiler()
  • Method Details

    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Returns the ILcdInputStreamFactory to be used for decoding SHP data.
      Returns:
      the ILcdInputStreamFactory to be used for decoding SHP data.
    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Sets the ILcdInputStreamFactory to be used for decoding SHP data.
      Parameters:
      aInputStreamFactory - the ILcdInputStreamFactory to be used for decoding SHP data.
    • getMaxSHPFileSize

      public int getMaxSHPFileSize()
      Returns the maximum file size of leaf node ShapeFiles, in bytes.
      Returns:
      the maximum file size of leaf node ShapeFiles, in bytes.
    • setMaxSHPFileSize

      public void setMaxSHPFileSize(int aMaxSHPFileSize)
      Sets the maximum file size of leaf node ShapeFiles, in bytes.
      Parameters:
      aMaxSHPFileSize - the maximum file size of leaf node ShapeFiles, in bytes.
    • tile

      public void tile(String aSourceName, String aDestinationName) throws IOException
      Converts the SHP file specified by aSourceName into smaller tiles. The individual tiles will be stored to separate SHP files with as the destination name, with an additional infix indicating the tile level, row and column.
      Parameters:
      aSourceName - the sourcename of the SHP file to be converted.
      aDestinationName - the template destination name of the resulting SHP tiles.
      Throws:
      IOException - if an I/O exception occurs during the conversion.
    • getDecodingBounds

      public ILcdBounds getDecodingBounds()
      Returns the decoding bounds used by this tiler.
      Returns:
      The decoding bounds of this tiler.
      See Also:
    • setDecodingBounds

      public void setDecodingBounds(ILcdBounds aDecodingBounds)

      Sets the decoding bounds of the tiler.

      Only those elements of the SHP file of which the bounds interact with the decoding bounds end up in the tiled model.

      If the decoding bounds is null, no filtering is performed. Default value is null.

      The bounds must be specified in the reference of the SHP file.

      Parameters:
      aDecodingBounds - The new decodingBounds to be set.
      See Also: