private void writeCoordinate(CoordinateSequence seq, int index, OutStream os) throws IOException { ByteOrderValues.putDouble(seq.getX(index), buf, byteOrder); os.write(buf, 8); ByteOrderValues.putDouble(seq.getY(index), buf, byteOrder); os.write(buf, 8); // only write 3rd dim if caller has requested it for this writer if (outputDimension >= 3) { // if 3rd dim is requested, only access and write it if the CS provides is double ordVal = Coordinate.NULL_ORDINATE; if (seq.getDimension() >= 3) ordVal = seq.getOrdinate(index, 2); ByteOrderValues.putDouble(ordVal, buf, byteOrder); os.write(buf, 8); } }
private void writeInt(int intValue, OutStream os) throws IOException { ByteOrderValues.putInt(intValue, buf, byteOrder); os.write(buf, 4); }
ByteOrderValues.putInt(g.getSRID(), buf, order); out.write(buf, 4); ByteOrderValues.putDouble(env.getMinX(), buf, order); out.write(buf, 8); ByteOrderValues.putDouble(env.getMaxX(), buf, order); out.write(buf, 8); ByteOrderValues.putDouble(env.getMinY(), buf, order); out.write(buf, 8); ByteOrderValues.putDouble(env.getMaxY(), buf, order); out.write(buf, 8);
public static double getDouble(byte[] buf, int byteOrder) { long longVal = getLong(buf, byteOrder); return Double.longBitsToDouble(longVal); }
public static void putDouble(double doubleValue, byte[] buf, int byteOrder) { long longVal = Double.doubleToLongBits(doubleValue); putLong(longVal, buf, byteOrder); }
public int readInt() throws IOException { stream.read(buf4); return ByteOrderValues.getInt(buf4, byteOrder); } public long readLong()
public double readDouble() throws IOException { stream.read(buf8); return ByteOrderValues.getDouble(buf8, byteOrder); }
ByteOrderValues.putInt(g.getSRID(), buf, order); out.write(buf, 4); ByteOrderValues.putDouble(env.getMinX(), buf, order); out.write(buf, 8); ByteOrderValues.putDouble(env.getMaxX(), buf, order); out.write(buf, 8); ByteOrderValues.putDouble(env.getMinY(), buf, order); out.write(buf, 8); ByteOrderValues.putDouble(env.getMaxY(), buf, order); out.write(buf, 8);
public long readLong() throws IOException { stream.read(buf8); return ByteOrderValues.getLong(buf8, byteOrder); }
private void writeInt(int intValue, OutStream os) throws IOException { ByteOrderValues.putInt(intValue, buf, byteOrder); os.write(buf, 4); }
private void writeCoordinate(CoordinateSequence seq, int index, OutStream os) throws IOException { ByteOrderValues.putDouble(seq.getX(index), buf, byteOrder); os.write(buf, 8); ByteOrderValues.putDouble(seq.getY(index), buf, byteOrder); os.write(buf, 8); // only write 3rd dim if caller has requested it for this writer if (outputDimension >= 3) { // if 3rd dim is requested, only write it if the CoordinateSequence provides it double ordVal = Coordinate.NULL_ORDINATE; if (seq.getDimension() >= 3) ordVal = seq.getOrdinate(index, 2); ByteOrderValues.putDouble(ordVal, buf, byteOrder); os.write(buf, 8); } } }