POST
|
My guess is that you are trying to do some type of rubber banding where you give the user immediate feedback. The way that you are doing this appears to be by actually modifying the underlying objects which seems inefficient. My guess is that rewriting this in C++ is not going to help you. I'm not sure how to do this efficiently in ArcMap. I did search the forums and found the following post: http://forums.arcgis.com/threads/82755-Save-a-Geometry-(draw-using-Rubberband)-as-a-feature-in-Feature-Class Actually I move many objects in 1 Hz (once a second). Application slows down as objects' number increase. I searched about dynamic display but it doesn't have many features that non-dynamic display have. So I can't use it. I'm really don't know what to do; since you say migration to C++ won't help me. Thank for your reply
... View more
05-21-2013
07:17 AM
|
0
|
0
|
360
|
POST
|
If a high percentage of the time is spent executing your code then refactoring or rewriting it can make sense. It really depends on exactly what your code is doing. My project has an ArcMap object which loads maps and DTED files. User can draw some lines, polygons, polylines, circles, etc. There is map navigation tools: Pan, Zoom in/out, etc. User can add text, add custom notes, custom signs, etc. ... My main problem is updating an element's locatin (PartialRefresh, DeleteElement, PartialRefresh, AddElement, PartialRefresh) every second. Maybe I should use dynamic map. Well, what do you think? Thanks for your reply
... View more
05-21-2013
05:46 AM
|
0
|
0
|
360
|
POST
|
Dear all, I developed an application in C# .NET with ArcGIS modules. I want to migrate my application from .NET to C++ to get better performance, since I'm not satisfied with ArcGIS's performance. What do you think? Does is worth? Why? Thanks Regards
... View more
05-21-2013
05:08 AM
|
0
|
4
|
966
|
POST
|
Dear all, I created a new C# project, added axMapControl and axToolbar with some elements in it. My toolbar has "New Line", "New Polygon", "New Circle" and etc. I can use them without any problem. My question is: How can I use/get data of a drawn shape/line/polygon? For example, how can I get a polygon's PointCollection and even edit it? Can I save them to a file? Are drawn shapes/lines layer or element? I need a good programming tutorial for this (.NET preffered) Thank you Sincerely
... View more
04-11-2013
02:38 AM
|
0
|
0
|
559
|
POST
|
to a-subbotin: Sorry, I didn't get what to do. How can I make ConstructAngleDistance function to use longtitude, latitude and meter? Can you please explain more or give me example code? Thank you to Wayne_Whitley: Thank you for your reply. Unfortunately I can't use toolboxes. I should implement it using .NET code. If you could help me on ConstructAngleDistance, that would be great. Actually I subtract 90 degrees; as you see: angle = 90 - angle; but I don't get correct angle. Thanks
... View more
04-10-2013
02:39 AM
|
0
|
0
|
1037
|
POST
|
You can convert the code to VB easily. for example PointClass p1 = new PointClass(); should be: Dim p1 as PointClass
Set p1 = new PointClass or p1.PutCoords(34.481560, 41.515391); should be: p1.PutCoords 34.481560, 41.515391 convert other lines like this. It's not hard. Tell me if you couldn't
... View more
04-08-2013
10:46 PM
|
0
|
0
|
1125
|
POST
|
Hi! To the point of your problem. You use the intricate algorithm. I think it's easier to use IConstructPoint.ConstructDeflection method with the negative value of the angle (in radians) and the necessary distance. Thank you a-subbotin for introducing me IConstructPoint. Well, I used it based on ArcObjects' Help but result point was not correct. I used IConstructPoint.ConstructAngleDistance but result X,Y is so large numbers! My X,Ys are longtitude,latitude and distance is meter. Do you know ConstructAngleDistance's unit? Thanks
... View more
04-08-2013
03:09 AM
|
0
|
0
|
1037
|
POST
|
Dear All, I have 2 points which creates a line. I want to get angle of line and then draw another line with +30 degree. I can do it but I always get 7-10 degree more than actual angle. I get distance between 2 points using IMeasurementTool.ConstructByPoints, then I get angle using IConstructAngle.ConstructLine. Here I have angle and distance between 2 points. Now, I'll give ConstructByPointDistAngle first point, distance and angle to get second point. Now I calculate angle between first point and result point of ConstructByPointDistAngle but I get angle with 8.266233055077116 degree difference. I think I'm not convert degree to azimuth correctly. Any idea? FYI: azimuth is degrees clockwise from north Here is my working code with comment and Debug results. Red texts are debug results.
PointClass p1 = new PointClass();
PointClass p2 = new PointClass();
// Add data to points for test
p1.PutCoords(34.481560, 41.515391);
p2.PutCoords(34.702832, 41.795668);
ILine lineForAngle = new Line();
IMeasurementTool measurementTool = new MeasurementToolClass();
measurementTool.ConstructByPoints(p1, p2);
// Here we calculate distance between two points: (p1, p2)
double distance = measurementTool.Distance;
GeometryEnvironment geoEnv = new GeometryEnvironment();
IConstructAngle angleCalculator = (IConstructAngle)geoEnv;
lineForAngle.PutCoords(p1, p2);
// Here we calculate angle of line between (p1, p2) and the positive x-axis
double angle = angleCalculator.ConstructLine(lineForAngle);
// Convert radian to degree
angle *= 180 / Math.PI; // = 51.709836807757121 Degree
// Convert angle to azimuth (still degree)
angle = 90 - angle; // = 38.290163192242879
// Here I give first point (p1), azimuth and distance to get p2
measurementTool.ConstructByPointDistAngle(p1, distance, angle);
geoEnv = new GeometryEnvironment();
angleCalculator = (IConstructAngle)geoEnv;
// I put p1 and result point of measurementTool which is a point
lineForAngle.PutCoords(p1, measurementTool.ToPoint);
// Now I have calculate angle between p1 and result of measurementTool
angle = angleCalculator.ConstructLine(lineForAngle);
angle *= 180 / Math.PI; // = 43.443603752680005
// first angle - result angle:
// 51.709836807757121 - 43.443603752680005 = 8.266233055077116
... View more
04-06-2013
12:35 AM
|
0
|
6
|
5463
|
POST
|
Code for calculating distance and angle between two points in C#:
PointClass p1 = new PointClass();
PointClass p2 = new PointClass();
// Add data to points for test
p1.PutCoords(34.481560, 41.515391);
p2.PutCoords(34.702832, 41.795668);
IMeasurementTool measurementTool = new MeasurementToolClass();
measurementTool.ConstructByPoints(p1, p2);
// Here we calculate distance between two points: (p1, p2)
double distance = measurementTool.Distance;
ILine lineForAngle = new Line();
GeometryEnvironment geoEnv = new GeometryEnvironment();
IConstructAngle angleCalculator = (IConstructAngle)geoEnv;
lineForAngle.PutCoords(p1, p2);
// Here we calculate angle of line between (p1, p2) and the positive x-axis
double angle = angleCalculator.ConstructLine(lineForAngle);
// Convert radian to degree
angle *= 180 / Math.PI;
Sinrecely
... View more
04-06-2013
12:12 AM
|
0
|
0
|
1125
|
POST
|
Thank you very much for your reply. Well, I did something similar to your suggestion. I create a polyline (which is a single line indeed) using FROM and TO points. Then, I get elevation of 100 points between FROM and TO points. It works. But I should replace 100 with significant data. Thank you again for your helpful reply. I appreciate it. Sincerely
... View more
04-06-2013
12:06 AM
|
0
|
0
|
301
|
POST
|
Thank you very much for your reply. I got a copy of your suggestion to my PC for future uses. Unfortunately I can't use Geoproccesing Tools. I mean, I'm not allowed to. So, I decided to write this on my own. I create a polyline (which is a single line indeed) using FROM and TO points. Then, I get elevation of 100 points between FROM and TO points. It works. But I should replace 100 with significant data. Thank you again for your helpful reply. I appreciate it. Sincerely
... View more
04-06-2013
12:01 AM
|
0
|
0
|
365
|
POST
|
Why don't you just simply use last version you can? If I were you, I would use sp4 on both.
... View more
04-04-2013
07:21 AM
|
0
|
0
|
219
|
POST
|
Dear All, I want to get DTED data (elevation) between two points (on a line). Is there any built-in function for this purpose or I should implement it on my own? What I want is similar to Linear Line of Sight (LLOS), but it should be on a direct line. I want to check if there is collision between two points or not. Thank you Sincerely
... View more
04-04-2013
07:10 AM
|
0
|
3
|
936
|
POST
|
Unfortunately I can't help you but I'm curious to know why do you need this? Why It's important to you? If you want to do it, you can use GetTickCount in kernel32.dll (win32) or Environment.TickCount in .NET; before and after of loading a layer. You want to know time of loading without actually loading it? I mean something like estimation? Well, it depends on your machine I think. Can you tell me why do you need this? Where will you use it?
... View more
04-02-2013
03:57 AM
|
0
|
0
|
156
|
POST
|
Before trying to re-invent the wheel, I think you should look at the ESRI ArcGIS for Aviation product. It has tools for creating and visualizing obstacle surfaces: ArcGIS for Aviation: Key Features Thank you mboeringa2010, but it's my fault to not mention that I want it for my own project which is in C#. I can't use another product. I should do it programmatically. Well, any idea?
... View more
04-02-2013
03:22 AM
|
0
|
0
|
365
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|