Search in sources :

Example 6 with SpaceFillingCurveSettings

use of org.neo4j.kernel.impl.index.schema.config.SpaceFillingCurveSettings in project neo4j by neo4j.

the class SpatialIndexConfig method settingFromIndexConfig.

private static SpaceFillingCurveSettings settingFromIndexConfig(IndexConfig indexConfig, CoordinateReferenceSystem crs) {
    final double[] min = asDoubleArray(indexConfig.get(IndexSettingUtil.spatialMinSettingForCrs(crs).getSettingName()));
    final double[] max = asDoubleArray(indexConfig.get(IndexSettingUtil.spatialMaxSettingForCrs(crs).getSettingName()));
    final Envelope envelope = new Envelope(min, max);
    return new SpaceFillingCurveSettings(crs.getDimension(), envelope);
}
Also used : SpaceFillingCurveSettings(org.neo4j.kernel.impl.index.schema.config.SpaceFillingCurveSettings) Envelope(org.neo4j.gis.spatial.index.Envelope)

Aggregations

SpaceFillingCurveSettings (org.neo4j.kernel.impl.index.schema.config.SpaceFillingCurveSettings)6 CoordinateReferenceSystem (org.neo4j.values.storable.CoordinateReferenceSystem)4 IndexConfig (org.neo4j.internal.schema.IndexConfig)3 ConfiguredSpaceFillingCurveSettingsCache (org.neo4j.kernel.impl.index.schema.config.ConfiguredSpaceFillingCurveSettingsCache)3 HashMap (java.util.HashMap)2 Test (org.junit.jupiter.api.Test)2 Config (org.neo4j.configuration.Config)2 IndexSpecificSpaceFillingCurveSettings (org.neo4j.kernel.impl.index.schema.config.IndexSpecificSpaceFillingCurveSettings)2 Envelope (org.neo4j.gis.spatial.index.Envelope)1 SpaceFillingCurve (org.neo4j.gis.spatial.index.curves.SpaceFillingCurve)1 Value (org.neo4j.values.storable.Value)1