Closed ebocher closed 8 months ago
its here:
org/h2/value/Value.java
if (extTypeInfo != null) {
int type = extTypeInfo.getType();
Integer srid = extTypeInfo.getSrid();
if (type != 0 && result.getTypeAndDimensionSystem() != type || srid != null && result.getSRID() != srid) {
StringBuilder builder = ExtTypeInfoGeometry
.toSQL(new StringBuilder(), result.getTypeAndDimensionSystem(), result.getSRID())
.append(" -> ");
extTypeInfo.getSQL(builder, TRACE_SQL_FLAGS);
throw DbException.get(ErrorCode.DATA_CONVERSION_ERROR_1, builder.toString());
}
}
type==2 and result.getTypeAndDimensionSystem() == 1002
It does not work because:
if (pts == null || pts.length == 0) {
return 3; // unknown, assume default
}
When there is no coordinates, geometry factory don't know if it is 2d or 3d when you create an empty linestring.
The geojson driver default is 2D linestring and jts default to 3d linestring..
fix thanks @nicolas-f
Since this PR https://github.com/orbisgis/h2gis/pull/1367, there is an error to read some king of GeoJSON.
Pseudo code
returns
Data : road.zip