根据要素选择集,创建新图层
转自原文 根据要素选择集,创建新图层
IFeatureLayer featureLayer = new FeatureLayerClass();
featureLayer.FeatureClass = featureClass;
IFeatureSelection featureSelection = featureLayer as IFeatureSelection;
IQueryFilter queryFilter1 = new QueryFilterClass();
queryFilter1.WhereClause = "XZQDM like '" + xz_xzqdm + "%'";
featureSelection.SelectFeatures(queryFilter1, esriSelectionResultEnum.esriSelectionResultNew, false);
ISelectionSet selectionSet = featureSelection.SelectionSet;
IFeatureLayer newFeatureLayer = null;
if (selectionSet.Count > 0)
{
IFeatureLayerDefinition featureLayerDefinition = featureLayer as IFeatureLayerDefinition;
newFeatureLayer = featureLayerDefinition.CreateSelectionLayer(featureClass.AliasName, true, null, null);
}
没有整理与归纳的知识,一文不值!高度概括与梳理的知识,才是自己真正的知识与技能。 永远不要让自己的自由、好奇、充满创造力的想法被现实的框架所束缚,让创造力自由成长吧! 多花时间,关心他(她)人,正如别人所关心你的。理想的腾飞与实现,没有别人的支持与帮助,是万万不能的。