Skip to content

Is this a bug? about "mil.nga.giat.geowave.core.geotime.store.query.SpatialQuery" #1469

@hw4270

Description

@hw4270

when I use SpatialQuery in spark,I got an exception:"java.nio.BufferOverflowException",then I find out this:
`
@OverRide

public byte[] toBinary() {

	final byte[] crsBinary = isDefaultCrs(crsCode) ? new byte[0] : StringUtils.stringToBinary(crsCode);
	final byte[] superBinary = super.toBinary();
	final byte[] geometryBinary = new WKBWriter().write(queryGeometry);
	final ByteBuffer buf = ByteBuffer.allocate(superBinary.length + geometryBinary.length + 16); //when crsCode = 'EPSG:4523',crsBinary.length?

	buf.putInt(compareOp.ordinal());
	buf.putInt(nonSpatialCompareOp.ordinal());
	buf.putInt(crsBinary.length);
	buf.putInt(superBinary.length);
	buf.put(crsBinary);
	buf.put(superBinary);
	buf.put(geometryBinary);

	return buf.array();
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions