OtterMind/Chat2DB · error · IllegalArgumentException
EWKB point contains an invalid empty coordinate
Error message
EWKB point contains an invalid empty coordinate
What it means
Error "EWKB point contains an invalid empty coordinate" thrown in OtterMind/Chat2DB.
Source
Thrown at chat2db-community-server/chat2db-community-plugins/chat2db-community-postgresql/src/main/java/ai/chat2db/plugin/postgresql/value/sub/PostgreSQLGeometryProcessor.java:226
case 4 -> inspectChildren(cursor, byteOrder, header, inheritedSrid, 1, depth);
case 5 -> inspectChildren(cursor, byteOrder, header, inheritedSrid, 2, depth);
case 6 -> inspectChildren(cursor, byteOrder, header, inheritedSrid, 3, depth);
case 7 -> inspectChildren(cursor, byteOrder, header, inheritedSrid, 0, depth);
default -> throw new IllegalArgumentException("Unsupported EWKB geometry type");
}
return header;
}
private void inspectPoint(WkbCursor cursor, ByteOrder byteOrder, int coordinateDimension) {
boolean allNaN = true;
boolean allFinite = true;
for (int i = 0; i < coordinateDimension; i++) {
double ordinate = cursor.readDouble(byteOrder);
allNaN &= Double.isNaN(ordinate);
allFinite &= Double.isFinite(ordinate);
}
if (!allNaN && !allFinite) {
throw new IllegalArgumentException("EWKB point contains an invalid empty coordinate");
}
}
private void inspectLineString(WkbCursor cursor, ByteOrder byteOrder, int coordinateDimension) {
int coordinateCount = readCount(cursor, byteOrder);
if (coordinateCount == 1) {
throw new IllegalArgumentException("EWKB line string must be empty or contain at least two coordinates");
}
inspectFiniteCoordinates(cursor, byteOrder, coordinateCount, coordinateDimension);
}
private void inspectLinearRing(WkbCursor cursor, ByteOrder byteOrder, int coordinateDimension) {
int coordinateCount = readCount(cursor, byteOrder);
if (coordinateCount < 4) {
throw new IllegalArgumentException("EWKB linear ring must contain at least four coordinates");
}
double[] firstCoordinate = readFiniteCoordinate(cursor, byteOrder, coordinateDimension);View on GitHub (pinned to 5ee1e990e7)
Solutions
- Replace the empty (NaN) coordinate with a valid one, or use a properly empty point representation.
When it happens
Trigger: An EWKB point contained an invalid empty-coordinate encoding.
Common situations: See trigger scenarios.
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/6225c282c5ab7477.
Report an issue: GitHub.