예제 #1
0
        protected internal override void AssertSameDerivedValue(PointValue p1, PointValue p2)
        {
            ConfiguredSpaceFillingCurveSettingsCache settingsFactory = new ConfiguredSpaceFillingCurveSettingsCache(Config.defaults());
            SpaceFillingCurveSettings spaceFillingCurveSettings      = settingsFactory.ForCRS(CoordinateReferenceSystem.WGS84);
            SpaceFillingCurve         curve = spaceFillingCurveSettings.Curve();

            assertEquals(curve.DerivedValueFor(p1.Coordinate()), curve.DerivedValueFor(p2.Coordinate()));
        }
예제 #2
0
        public static Pair <PointValue, PointValue> PointsWithSameValueOnSpaceFillingCurve(Config config)
        {
            ConfiguredSpaceFillingCurveSettingsCache configuredCache = new ConfiguredSpaceFillingCurveSettingsCache(config);
            SpaceFillingCurveSettings spaceFillingCurveSettings      = configuredCache.ForCRS(CoordinateReferenceSystem.WGS84);
            SpaceFillingCurve         curve = spaceFillingCurveSettings.Curve();

            double[] origin = new double[] { 0.0, 0.0 };
            long?    spaceFillingCurveMapForOrigin = curve.DerivedValueFor(origin);

            double[]   centerPointForOriginTile = curve.CenterPointFor(spaceFillingCurveMapForOrigin.Value);
            PointValue originValue      = Values.pointValue(CoordinateReferenceSystem.WGS84, origin);
            PointValue centerPointValue = Values.pointValue(CoordinateReferenceSystem.WGS84, centerPointForOriginTile);

            assertThat("need non equal points for this test", origin, not(equalTo(centerPointValue)));
            return(Pair.of(originValue, centerPointValue));
        }
예제 #3
0
 internal SpatialLayout(CoordinateReferenceSystem crs, SpaceFillingCurve curve) : base("UPI", 0, 1)
 {
     this.Crs    = crs;
     this._curve = curve;
 }
예제 #4
0
 internal SpatialIndexKey(CoordinateReferenceSystem crs, SpaceFillingCurve curve)
 {
     this.Crs   = crs;
     this.Curve = curve;
 }