I have a loop that goes through all the items in a tab file that looks about like this:
pFeat = table->GetNextFeature(); if(//check to see if it's a polygon etc... then if it is I get it's geometry and cast it to a polygon OGRGeometry *poGeom = pFeat->GetGeometryRef(); OGRPolygon *poPolygon = (OGRPolygon*)poGeom; OGRPoint *pPt = new OGRPoint; poPolygon->Centroid(pPt); Now if I call: pPt->getX() or pPt->getY() They always return 0.0 yet if I extract the rings I can calculate the Center of gravity just fine. Does anyone know what I might be doing wrong? Thank you, Andy ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hmjk9ik/M=362335.6886445.7839731.1510227/D=groups/S=1705007389:TM/Y=YAHOO/EXP=1122700845/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/mitab/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
