Codota Logo
org.postgis.binary
Code IndexAdd Codota to your IDE (free)

How to use org.postgis.binary

Best Java code snippets using org.postgis.binary (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: net.postgis/postgis-jdbc

/**
 * Write an Array of "slim" Points (without endianness, srid and type, part
 * of LinearRing and Linestring, but not MultiPoint!
 */
private void writePointArray(Point[] geom, ValueSetter dest) {
  // number of points
  dest.setInt(geom.length);
  for (int i = 0; i < geom.length; i++) {
    writePoint(geom[i], dest);
  }
}
origin: net.postgis/postgis-jdbc

/**
 * Parse a binary encoded geometry.
 * 
 * Is synchronized to protect offset counter. (Unfortunately, Java does not
 * have neither call by reference nor multiple return values.)
 *
 * @param value byte array containing the data to be parsed
 * @return resulting geometry for the parsed data
 */
public synchronized Geometry parse(byte[] value) {
  BinaryByteGetter bytes = new ByteGetter.BinaryByteGetter(value);
  return parseGeometry(valueGetterForEndian(bytes));
}
origin: net.postgis/postgis-jdbc

/**
 * Parse a hex encoded geometry
 * 
 * Is synchronized to protect offset counter. (Unfortunately, Java does not
 * have neither call by reference nor multiple return values.)
 *
 * @param value String containing the data to be parsed
 * @return resulting geometry for the parsed data
 */
public synchronized Geometry parse(String value) {
  StringByteGetter bytes = new ByteGetter.StringByteGetter(value);
  return parseGeometry(valueGetterForEndian(bytes));
}
origin: net.postgis/postgis-jdbc

private MultiLineString parseMultiLineString(ValueGetter data) {
  int count = data.getInt();
  LineString[] strings = new LineString[count];
  parseGeometryArray(data, strings);
  return new MultiLineString(strings);
}
origin: net.postgis/postgis-jdbc

  protected long getLong(int index) {
    return ((long) data.get(index + 7) << 56) + ((long) data.get(index + 6) << 48)
        + ((long) data.get(index + 5) << 40) + ((long) data.get(index + 4) << 32)
        + ((long) data.get(index + 3) << 24) + ((long) data.get(index + 2) << 16)
        + ((long) data.get(index + 1) << 8) + ((long) data.get(index) << 0);
  }
}
origin: net.postgis/postgis-jdbc

public int getInt() {
  int res = getInt(position);
  position += 4;
  return res;
}
origin: net.postgis/postgis-jdbc

private void writePolygon(Polygon geom, ValueSetter dest) {
  dest.setInt(geom.numRings());
  for (int i = 0; i < geom.numRings(); i++) {
    writeLinearRing(geom.getRing(i), dest);
  }
}
origin: net.postgis/postgis-jdbc

protected void setInt(int value, int index) {
  data.set((byte) (value >>> 24), index + 3);
  data.set((byte) (value >>> 16), index + 2);
  data.set((byte) (value >>> 8), index + 1);
  data.set((byte) value, index);
}
origin: net.postgis/postgis-jdbc

/** Write an Array of "full" Geometries */
private int estimateGeometryArray(Geometry[] container) {
  int result = 0;
  for (int i = 0; i < container.length; i++) {
    result += estimateBytes(container[i]);
  }
  return result;
}
origin: net.postgis/postgis-jdbc

public long getLong() {
  long res = getLong(position);
  position += 8;
  return res;
}
origin: net.postgis/postgis-jdbc

/** Parse an Array of "full" Geometries */
private void parseGeometryArray(ValueGetter data, Geometry[] container) {
  for (int i = 0; i < container.length; i++) {
    container[i] = parseGeometry(data);
  }
}
origin: net.postgis/postgis-jdbc

/** Write an Array of "full" Geometries */
private void writeGeometryArray(Geometry[] container, ValueSetter dest) {
  for (int i = 0; i < container.length; i++) {
    writeGeometry(container[i], dest);
  }
}
origin: postgis/postgis-java

/**
 * Parse a binary encoded geometry.
 * 
 * Is synchronized to protect offset counter. (Unfortunately, Java does not
 * have neither call by reference nor multiple return values.)
 *
 * @param value byte array containing the data to be parsed
 * @return resulting geometry for the parsed data
 */
public synchronized Geometry parse(byte[] value) {
  BinaryByteGetter bytes = new ByteGetter.BinaryByteGetter(value);
  return parseGeometry(valueGetterForEndian(bytes));
}
origin: postgis/postgis-java

/**
 * Parse a hex encoded geometry
 * 
 * Is synchronized to protect offset counter. (Unfortunately, Java does not
 * have neither call by reference nor multiple return values.)
 *
 * @param value String containing the data to be parsed
 * @return resulting geometry for the parsed data
 */
public synchronized Geometry parse(String value) {
  StringByteGetter bytes = new ByteGetter.StringByteGetter(value);
  return parseGeometry(valueGetterForEndian(bytes));
}
origin: net.postgis/postgis-jdbc

private MultiPolygon parseMultiPolygon(ValueGetter data) {
  int count = data.getInt();
  Polygon[] polys = new Polygon[count];
  parseGeometryArray(data, polys);
  return new MultiPolygon(polys);
}
origin: net.postgis/postgis-jdbc

  protected long getLong(int index) {
    return ((long) data.get(index) << 56) + ((long) data.get(index + 1) << 48)
        + ((long) data.get(index + 2) << 40) + ((long) data.get(index + 3) << 32)
        + ((long) data.get(index + 4) << 24) + ((long) data.get(index + 5) << 16)
        + ((long) data.get(index + 6) << 8) + ((long) data.get(index + 7) << 0);
  }
}
origin: postgis/postgis-java

/**
 * Write an Array of "slim" Points (without endianness, srid and type, part
 * of LinearRing and Linestring, but not MultiPoint!
 */
private void writePointArray(Point[] geom, ValueSetter dest) {
  // number of points
  dest.setInt(geom.length);
  for (int i = 0; i < geom.length; i++) {
    writePoint(geom[i], dest);
  }
}
origin: net.postgis/postgis-jdbc

  protected void setLong(long value, int index) {
    data.set((byte) (value >>> 56), index + 7);
    data.set((byte) (value >>> 48), index + 6);
    data.set((byte) (value >>> 40), index + 5);
    data.set((byte) (value >>> 32), index + 4);
    data.set((byte) (value >>> 24), index + 3);
    data.set((byte) (value >>> 16), index + 2);
    data.set((byte) (value >>> 8), index + 1);
    data.set((byte) value, index);
  }
}
origin: net.postgis/postgis-jdbc

/**
 * Get a byte, should be equal for all endians
 *
 * @return the byte value
 */
public byte getByte() {
  return (byte) data.get(position++);
}
origin: net.postgis/postgis-jdbc

  protected void setLong(long value, int index) {
    data.set((byte) (value >>> 56), index);
    data.set((byte) (value >>> 48), index + 1);
    data.set((byte) (value >>> 40), index + 2);
    data.set((byte) (value >>> 32), index + 3);
    data.set((byte) (value >>> 24), index + 4);
    data.set((byte) (value >>> 16), index + 5);
    data.set((byte) (value >>> 8), index + 6);
    data.set((byte) value, index + 7);
  }
}
org.postgis.binary

Most used classes

  • BinaryWriter
    Create binary representation of geometries. Currently, only text rep (hexed) implementation is teste
  • ByteGetter$BinaryByteGetter
  • ByteGetter$StringByteGetter
  • ByteGetter
  • ValueGetter$NDR
  • ValueGetter,
  • ByteSetter$BinaryByteSetter,
  • ByteSetter$StringByteSetter,
  • ValueSetter$NDR,
  • ValueSetter$XDR,
  • ValueSetter,
  • BinaryParser,
  • ByteSetter
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now