Package mil.nga.giat.geowave.index.sfc.data

Examples of mil.nga.giat.geowave.index.sfc.data.NumericData


   */
  public static Constraints basicConstraintsFromPoint(
      final double latitudeDegrees,
      final double longitudeDegrees ) {
    // Create a NumericData object using the x axis
    final NumericData latitude = new NumericValue(
        latitudeDegrees);

    // Create a NumericData object using the y axis
    final NumericData longitude = new NumericValue(
        longitudeDegrees);

    final Map<Class<? extends NumericDimensionDefinition>, NumericData> constraintsPerDimension = new HashMap<Class<? extends NumericDimensionDefinition>, NumericData>();
    // Create and return a new IndexRange array with an x and y axis
    // range
View Full Code Here


      final CommonIndexModel indexModel ) {
    final DimensionField<?>[] dimensionFields = indexModel.getDimensions();
    final List<QueryFilter> filters = new ArrayList<QueryFilter>();
    final NumericData[] orderedConstraintsPerDimension = new NumericData[dimensionFields.length];
    for (int d = 0; d < dimensionFields.length; d++) {
      final NumericData nd = constraints.constraintsPerTypeOfDimensionDefinition.get(dimensionFields[d].getBaseDefinition().getClass());
      if (nd == null) {
        orderedConstraintsPerDimension[d] = dimensionFields[d].getBaseDefinition().getFullRange();
      }
      else {
        orderedConstraintsPerDimension[d] = constraints.constraintsPerTypeOfDimensionDefinition.get(dimensionFields[d].getBaseDefinition().getClass());
View Full Code Here

      }
      final NumericDimensionDefinition[] dimensionDefinitions = indexStrategy.getOrderedDimensionDefinitions();
      final NumericData[] dataPerDimension = new NumericData[dimensionDefinitions.length];
      // all or nothing...for now
      for (int d = 0; d < dimensionDefinitions.length; d++) {
        final NumericData dimConstraint = constraintsPerTypeOfDimensionDefinition.get(dimensionDefinitions[d].getClass());
        dataPerDimension[d] = (dimConstraint == null ? dimensionDefinitions[d].getFullRange() : dimConstraint);
      }
      return new BasicNumericDataset(
          dataPerDimension);
    }
View Full Code Here

    final List<byte[]> lengthDimensionAndQueryBinaries = new ArrayList<byte[]>(
        dimensions);
    final NumericData[] dataPerDimension = constraints.getDataPerDimension();
    for (int d = 0; d < dimensions; d++) {
      final DimensionField<?> dimension = dimensionFields[d];
      final NumericData data = dataPerDimension[d];
      final byte[] dimensionBinary = PersistenceUtils.toBinary(dimension);
      final int currentDimensionByteBufferLength = (20 + dimensionBinary.length);

      final ByteBuffer buf = ByteBuffer.allocate(currentDimensionByteBufferLength);
      buf.putInt(dimensionBinary.length);
      buf.putDouble(data.getMin());
      buf.putDouble(data.getMax());
      buf.put(dimensionBinary);
      byteBufferLength += currentDimensionByteBufferLength;
      lengthDimensionAndQueryBinaries.add(buf.array());
    }
    final ByteBuffer buf = ByteBuffer.allocate(byteBufferLength);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public PersistentValue<Object>[] toNativeValues(
      final Time indexValue ) {
    final NumericData value = indexValue.toNumericData();
    final Class<?> startBindingClass = nativeStartTimeHandler.attrDesc.getType().getBinding();
    final Object startObj = TimeUtils.getTimeValue(
        startBindingClass,
        (long) value.getMin());
    final Class<?> endBindingClass = nativeEndTimeHandler.attrDesc.getType().getBinding();
    final Object endObj = TimeUtils.getTimeValue(
        endBindingClass,
        (long) value.getMax());
    return new PersistentValue[] {
      new PersistentValue<Object>(
          nativeStartTimeHandler.getFieldId(),
          startObj),
      new PersistentValue<Object>(
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.index.sfc.data.NumericData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.