POST
|
The following code is to change the size of feaures. It works on the Shapefile, but not work on the featureclass of File Geodatabase. There is no error in the code. Nothing will happen for the featureclass of Geodatabase. IFeatureCursor pFCursor = pFeatureclass.Update(null, false);
IFeature pFeature = pFCursor.NextFeature();
while (pFeature != null)
{
IGeometryCollection pPolColl = pFeature.Shape as IGeometryCollection;
//??uv??????????
ISegmentCollection pPathColl = pPolColl.get_Geometry(0) as ISegmentCollection;
ISegment pSegment = pPathColl.get_Segment(0);
//???uv???????????????????????????????????
ILine pLine = pSegment as ILine;
IPoint pPointOrigin = new PointClass();
pPointOrigin.PutCoords(pLine.FromPoint.X, pLine.FromPoint.Y);
//???uv??????????????????
Double dblOldX, dblOldY;
dblOldX = pLine.ToPoint.X;
dblOldY = pLine.ToPoint.Y;
ITransform2D pTransform2D = pLine as ITransform2D;
//uv????????????????????????
//double dblScale = Convert.ToDouble(this.numUpDownScale.Value);
pTransform2D.Scale(pPointOrigin, dblScale, dblScale);
//???uv?????????????????
Double dblNewX, dblNewY;
dblNewX = pLine.ToPoint.X;
dblNewY = pLine.ToPoint.Y;
//?????????????????????????
for (int i = 1; i < 3; i++)
{
pPathColl = pPolColl.get_Geometry(i) as ISegmentCollection;
pSegment = pPathColl.get_Segment(0);
pLine = pSegment as ILine;
//???????????
pPointOrigin.PutCoords(pLine.FromPoint.X, pLine.FromPoint.Y);
pTransform2D = pLine as ITransform2D;
//????
pTransform2D.Scale(pPointOrigin, dblScale, dblScale);
//?????????????????
pTransform2D.Move(dblNewX - dblOldX, dblNewY - dblOldY);
}
pPolColl.GeometriesChanged();
//??????
pFCursor.UpdateFeature(pFeature);
pFeature = pFCursor.NextFeature();
}
pFCursor.Flush();
... View more
09-17-2012
09:39 PM
|
0
|
0
|
568
|
POST
|
This might be do to the fact the TIN is not in a coordinate system. I would check to see if the TIN is projected or not. You do not even need the TIN in the scene in order to display it in 3d. You can just simply path to it. Try that and see if you are getting the desired results. Thanks a lot! Both the TIN and the Raster are projected on a same coordinate system, see the attached picture. But it is a custom system. If you add the raster first, everything is OK. If you add the TIN first, then remove it again, add the raster and path to the TIN, the result is not right. Anyway, I have found a way to avoid it. [ATTACH=CONFIG]14511[/ATTACH] [ATTACH=CONFIG]14512[/ATTACH]
... View more
05-21-2012
09:26 PM
|
0
|
0
|
410
|
POST
|
Thanks for your help. I want to display a raster floating on a TIN, the Raster Resolution button (grey )cannot use in this case. The drawing priority order do affect the result, but it is not the right result. In fact, I found that the order of adding the data is important. When I add a raster first, then a Tin, it is OK to disaplay the raster floating on the TIN. Otherwise, it is the display result as the above. I don't know why, but it is true. Is it a BUG?
... View more
05-18-2012
10:34 PM
|
0
|
0
|
410
|
POST
|
When I attempt to display a raster layer that floating on a TIN surface, the result is not right. There is some strange graphics around the raster. The raster is geodatabase raster format in the Personal or File geodatabase. [ATTACH=CONFIG]14288[/ATTACH]
... View more
05-13-2012
07:07 AM
|
0
|
4
|
718
|
POST
|
In ArcGIS 9.2, I used the Attach method to draw a datagraph into a picturebox. However, the Attach method was removed in ArcGIS 10. The new method was changed to DrawToDC method. Can anyone give me some codes for the new method? Thanks in advance!
... View more
05-12-2012
12:24 AM
|
0
|
0
|
679
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|