Home > other >  C # AE do buffer analysis, the prompt will object reference not set to an instance of an object
C # AE do buffer analysis, the prompt will object reference not set to an instance of an object

Time:10-04

The code is as follows:
IFeatureLayer pFeatureLayer=chuanzhi. J;
IQueryFilter pFilter=new QueryFilterClass ();
PFilter. WhereClause="village name='" + textBox1. Text +"' ";
IFeatureCursor pFeatureCursor;
PFeatureCursor=pFeatureLayer. Search (pFilter, true);
IFeature pFeat;
PFeat=pFeatureCursor. NextFeature ();
IGeometry pGeometry;
ITopologicalOperator pTop;
PTop=pFeat as ITopologicalOperator;
PGeometry=pTop. Buffer (1000);//in this tip will object reference not set to an instance of an object

P.S. pFeatureLayer layer for from chuanzhi class assignment
  • Related