查了半天,有python版本的,改为c++,
为方便查找,特记录如下:
std::string strID = "test";
std::string strFilter = "ID = '" + strID + "'";
OGRErr thError = poLayer->SetAttributeFilter(strFilter.c_str());
这篇博客记录了如何将Python中的过滤逻辑转换为C++,使用OGRErr处理错误,并通过SetAttributeFilter方法在C++中应用过滤器。主要涉及字符串操作和GIS库的使用。
查了半天,有python版本的,改为c++,
为方便查找,特记录如下:
std::string strID = "test";
std::string strFilter = "ID = '" + strID + "'";
OGRErr thError = poLayer->SetAttributeFilter(strFilter.c_str());
1848
1237

被折叠的 条评论
为什么被折叠?