Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to store x-coordinates and y-coordinates of a polygon feature in a table. But, i am getting an error message: Item not found in this collection. The code is like this:

Do
 pFeature = pFeatureCursor.NextFeature  
 If Not (pFeature Is Nothing) Then  
   pPointCollection = pFeature.Shape  
   For lPnt = 0 To (pPointCollection.PointCount - 1)  
     ppolyrow = ptable.CreateRow()  
     ppolyrow.Value(coorxind) = pPointCollection.Point(lPnt).X()  
     ppolyrow.Value(cooryind) = pPointCollection.Point(lPnt).Y()  
     ppolyrow.Store()  

The error comes in this following line of code:

ppolyrow.Value(coorxind) = pPointCollection.Point(lPnt).X()  

Any help....

share|improve this question
    
What does the error message say? –  artwork21 Sep 5 '12 at 11:22
    
Thanks artwork21, ppolyrow.Value(coorxind) = Double.Parse(ppoint.X) ppolyrow.Value(cooryind)=Double.Parse(pPoint.Y) –  Navish Sep 15 '12 at 9:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.