Class FeatureLibrary

java.lang.Object
com.geodesk.feature.query.WorldView<Feature>
com.geodesk.feature.FeatureLibrary
All Implemented Interfaces:
Features<Feature>, Iterable<Feature>

public class FeatureLibrary extends com.geodesk.feature.query.WorldView<Feature>
A Geographic Object Library containing features.
  • Field Summary

    Fields inherited from class com.geodesk.feature.query.WorldView

    bbox, filter, matchers, store, types, WORLD
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a `FeatureLibrary` instance associated with an existing GOL file.
    Creates a `FeatureLibrary` instance associated with the given GOL file; if the file does not exist, an empty library will be created.
    Creates a `FeatureLibrary` instance associated with an existing GOL file.
    Creates a `FeatureLibrary` instance associated with the given GOL file; if the file does not exist, an empty library will be created.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the library and releases its resources.
     
    com.geodesk.feature.store.FeatureStore
     

    Methods inherited from class com.geodesk.feature.query.WorldView

    contains, count, in, iterator, nodes, nodes, relations, relations, select, select, types, ways, ways

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.geodesk.feature.Features

    first, isEmpty, of, toArray, toArray, toList, with

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • FeatureLibrary

      public FeatureLibrary(String path)
      Creates a `FeatureLibrary` instance associated with an existing GOL file.
      Parameters:
      path - the path of the GOL file.
    • FeatureLibrary

      public FeatureLibrary(Path path)
      Creates a `FeatureLibrary` instance associated with an existing GOL file.
      Parameters:
      path - the path of the GOL file.
    • FeatureLibrary

      public FeatureLibrary(String path, String url)
      Creates a `FeatureLibrary` instance associated with the given GOL file; if the file does not exist, an empty library will be created.
      Parameters:
      path - the path of the GOL file
      url - the URL from which missing tiles are downloaded into the library
    • FeatureLibrary

      public FeatureLibrary(Path path, String url)
      Creates a `FeatureLibrary` instance associated with the given GOL file; if the file does not exist, an empty library will be created.
      Parameters:
      path - the path of the GOL file
      url - the URL from which missing tiles are downloaded into the library
  • Method Details

    • geometryFactory

      public GeometryFactory geometryFactory()
    • close

      public void close()
      Closes the library and releases its resources. **Important**: Do not call the methods of any collections or features you have retrieved from this library after you've closed it. Doing so leads to undefined results and may cause a segmentation fault.
    • store

      public com.geodesk.feature.store.FeatureStore store()