Example #1
0
 internal override GenericLayout Layout(StoreIndexDescriptor descriptor, File storeFile)
 {
     try
     {
         int numberOfSlots = descriptor.Properties().Length;
         IDictionary <CoordinateReferenceSystem, SpaceFillingCurveSettings> settings = new Dictionary <CoordinateReferenceSystem, SpaceFillingCurveSettings>();
         if (storeFile != null && Fs.fileExists(storeFile))
         {
             // The index file exists and is sane so use it to read header information from.
             GBPTree.readHeader(PageCache, storeFile, new NativeIndexHeaderReader(new SpaceFillingCurveSettingsReader(settings)));
         }
         return(new GenericLayout(numberOfSlots, new IndexSpecificSpaceFillingCurveSettingsCache(_configuredSettings, settings)));
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }