我想在SQLAlchemy中使用GeoPandas from_postgis功能时将参数传递给sql查询。SQLAlchemy传递参数与GeoPandas.from_postgis
类方法GeoDataFrame.from_postgis
我已经看过的先前相似(SQL,CON,geom_col = '的geom',CRS =无,index_col =无,coerce_float =真,则params =无) question和also here,它建议使用SQLAlchemy的textual SQL选项。但是,这需要访问未包含在GeoDataFrame from_postgis选项中的con.execute。
你能否提出将参数传递给SQL的最佳方法?如果不是直接在from_postgis中,那么如何最好地单独构造完整的SQL字符串并将它作为第一个sql参数传递给from_postgis。