org.khelekore.prtree.NodeBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of georewrite Show documentation
Show all versions of georewrite Show documentation
重写geoserver发送到h2的sql,以实现自定义数据源
package org.khelekore.prtree;
/**
* @param the type of the child entries
* @param the type of the data entries
*/
abstract class NodeBase implements Node {
private MBR mbr;
private Object[] data;
public NodeBase (Object[] data) {
this.data = data;
}
public int size () {
return data.length;
}
@SuppressWarnings("unchecked")
public N get (int i) {
return (N)data[i];
}
public MBR getMBR (MBRConverter converter) {
if (mbr == null)
mbr = computeMBR (converter);
return mbr;
}
public abstract MBR computeMBR (MBRConverter converter);
public MBR getUnion (MBR m1, MBR m2) {
if (m1 == null)
return m2;
return m1.union (m2);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy