java - JDBI Postgis JTS 包装器
问题描述
我正在尝试使用 PostGIS-JDBC-jtsparser(版本 2.5.0)模块将 JTS java 对象作为参数注入,@SQLQuery
但我不知道如何。
我知道应该在我的 JDBI 配置中注入一个参数工厂,但是哪个?
如果这不是正确的方法,那么最好的方法是什么?
! org.jdbi.v3.core.statement.UnableToCreateStatementException: No argument factory registered for 'POLYGON ((-10 -10, -10 10, 10 10, 10 -10, -10 -10))' of qualified type org.locationtech.jts.geom.Polygon [statement:"/* DataDao.dateHistogramAsIterable */ select st_geohash(mygeo,1) as geohash_0_key,count(mygeo) as geohash_0_count from myindex where (st_coveredby(mygeo,:0)) group by rollup (geohash_0_key) ", arguments:{positional:{}, named:{0:POLYGON ((-10 -10, -10 10, 10 10, 10 -10, -10 -10))}, finder:[]}]
! at org.jdbi.v3.core.statement.ArgumentBinder.factoryNotFound(ArgumentBinder.java:174)
解决方案
推荐阅读
- python - Python检查带有变量的json文件
- azure - Azure ADF 如何确保复制的相同文件也被删除?
- python - ValueError:未知标签类型:SVM 中的“连续”错误
- mysql - 表在springboot中与mysql共享id列
- html - 通过伪元素设置纵横比,防止元素溢出
- jquery - 第 n 个孩子影响每个第 n 个孩子,无论嵌套如何
- dart - 飞镖图中的默认值
- mysql - 如何使用 Laravel Query Builder 计算两种不同格式之间的小时数?
- python - 未通过代码信号中的隐藏测试。我的代码中似乎有什么问题?
- oracle - 无法获得年月间隔