postgis/postgis-java

Empty with geomFromString and typed columns cause exceptions

tobias- opened this issue · 3 comments

I've added a PR with a couple of failing test cases ( #86 ) that details this problem.

The problems were discovered due to a line in the following format:
prep.setObject(6, new PGgeometryLW(GeometryBuilder.geomFromString("SRID=4326;MULTIPOLYGON EMPTY")));
which, when combined with "type-safe" columns (ie <column> geometry(MultiPolygon, 4326) NOT NULL) caused the driver to throw exceptions.

The PR now includes our solution to the problem.

Thanks for submitting the issue and PR and apologies for not being able to review it sooner. I've not had the opportunity to review it yet but will get to as soon as possible. Thanks again!