public abstract class LegacySpatialField<T extends SpatialField> extends Object implements Persistable, NumericDimensionField<org.locationtech.jts.geom.Geometry>
Modifier and Type | Field and Description |
---|---|
protected NumericDimensionDefinition |
baseDefinition |
protected String |
fieldName |
protected Integer |
geometryPrecision |
protected T |
updatedField |
Constructor and Description |
---|
LegacySpatialField() |
LegacySpatialField(NumericDimensionDefinition baseDefinition,
Integer geometryPrecision) |
Modifier and Type | Method and Description |
---|---|
double |
denormalize(double value)
Used to denormalize the numeric data set from a value between 0 and 1 scaled to fit within its
native bounds
|
void |
fromBinary(byte[] bytes)
Convert a stream of binary bytes to fields and data within an object.
|
NumericDimensionDefinition |
getBaseDefinition()
Get the basic index definition for this field
|
NumericRange |
getBounds()
Returns the native bounds of the dimension definition
|
NumericRange |
getDenormalizedRange(BinRange range)
Returns a range in the native bounds of the dimension definition, denormalized from a bin and
separate range
|
Set<IndexDimensionHint> |
getDimensionHints() |
Class<org.locationtech.jts.geom.Geometry> |
getFieldClass() |
String |
getFieldName()
Returns an identifier that is unique for a given data type (field IDs should be distinct per
row)
|
int |
getFixedBinIdSize()
If this numeric dimension definition uses bins, it is given a fixed length for the bin ID
|
NumericData |
getFullRange() |
BinRange[] |
getNormalizedRanges(NumericData range)
Returns the set of normalized ranges
|
NumericData |
getNumericData(org.locationtech.jts.geom.Geometry dataElement)
Decode a numeric value or range from the raw field value
|
double |
getRange() |
FieldReader<org.locationtech.jts.geom.Geometry> |
getReader()
Get a reader that can handle deserializing binary data into values for this field
|
abstract T |
getUpdatedField(Index index) |
FieldWriter<org.locationtech.jts.geom.Geometry> |
getWriter()
Get a writer that can handle serializing values for this field
|
double |
normalize(double value)
Used to normalize a value within the bounds of the range to a percentage of the range between 0
and 1
|
byte[] |
toBinary()
Convert fields and data within an object to binary form for transmission or storage.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndexFieldOptions, isCompatibleWith
protected String fieldName
protected NumericDimensionDefinition baseDefinition
protected Integer geometryPrecision
protected T extends SpatialField updatedField
public LegacySpatialField()
public LegacySpatialField(NumericDimensionDefinition baseDefinition, @Nullable Integer geometryPrecision)
public byte[] toBinary()
Persistable
toBinary
in interface Persistable
public void fromBinary(byte[] bytes)
Persistable
fromBinary
in interface Persistable
public double getRange()
getRange
in interface NumericDimensionDefinition
public double normalize(double value)
NumericDimensionDefinition
normalize
in interface NumericDimensionDefinition
public double denormalize(double value)
NumericDimensionDefinition
denormalize
in interface NumericDimensionDefinition
public BinRange[] getNormalizedRanges(NumericData range)
NumericDimensionDefinition
getNormalizedRanges
in interface NumericDimensionDefinition
range
- a numeric range of the data setpublic NumericRange getDenormalizedRange(BinRange range)
NumericDimensionDefinition
getDenormalizedRange
in interface NumericDimensionDefinition
range
- a numeric range of the data set, with a binpublic int getFixedBinIdSize()
NumericDimensionDefinition
getFixedBinIdSize
in interface NumericDimensionDefinition
public NumericRange getBounds()
NumericDimensionDefinition
getBounds
in interface NumericDimensionDefinition
public NumericData getFullRange()
getFullRange
in interface NumericDimensionDefinition
public NumericData getNumericData(org.locationtech.jts.geom.Geometry dataElement)
NumericDimensionField
getNumericData
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
dataElement
- the raw field valuepublic String getFieldName()
NumericDimensionField
getFieldName
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
public Set<IndexDimensionHint> getDimensionHints()
getDimensionHints
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
public FieldWriter<org.locationtech.jts.geom.Geometry> getWriter()
NumericDimensionField
getWriter
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
public FieldReader<org.locationtech.jts.geom.Geometry> getReader()
NumericDimensionField
getReader
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
public NumericDimensionDefinition getBaseDefinition()
NumericDimensionField
getBaseDefinition
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
public Class<org.locationtech.jts.geom.Geometry> getFieldClass()
getFieldClass
in interface NumericDimensionField<org.locationtech.jts.geom.Geometry>
Copyright © 2013–2022. All rights reserved.