6 reputation
2
bio website
location
age
visits member for 1 year, 9 months
seen Dec 9 at 17:54

Mar
15
awarded  Scholar
Mar
15
accepted ArcObjects Java Calculate Line Length
Mar
15
answered ArcObjects Java Calculate Line Length
Mar
12
comment ArcObjects Java Calculate Line Length
I'll have a look, but I would think the Line .getLength() and ICurve .getLength() would ultimatley yield the same result here. I think the issue is how I'm trying to get the length of a feature from a feature class by going through IFeature, Line, and IGeometry classes. It would be much easier if FeatureClass had a .getLength() method.
Mar
12
awarded  Student
Mar
12
comment ArcObjects Java Calculate Line Length
I know it is within the part of the code pasted below. I'm adding this in to ArcMap as an ESRI Add-In so I don't get error reports. IFeature feature = fc1.getFeature(0); Line line = new Line(); //Assume that the underlying feature is a Line. IGeometry geom = feature.getShape(); if (geom instanceof Line) line = (Line)geom; double length = line.getLength();
Mar
12
comment ArcObjects Java Calculate Line Length
I assume what I have here does work because I replaced the "length" variable in the .setValue method with a double value (e.g. 5.0) and that worked. I believe the prooblem is where I attempt to calculate the line length and assign it to "length" variable.
Mar
12
asked ArcObjects Java Calculate Line Length