Is This Content Helpful?
We're glad to know this article was helpful.
The issue of the Identify tool or tasks returning the message 'Curves are not supported' has been resolved at version 9.3.
The Web ADF geometry library does not support curves. It only supports polygons and polylines composed of linear segments. As a result, polygon and polyline geometry returned from ArcGIS Server data sources must be linear to be used by the Web ADF.
The ArcObjects API can convert non-linear segments to linear segments and vice versa. It is necessary to work with an ArcGIS Server local data source to gain access to the ArcObjects API.
ArcObjects defines four types of segments: Line, EllipticArc, CircularArc, BezierCurve. Line is linear, while EllipticArc, CircularArc and BezierCurve are non-linear. To determine if a Web ADF application needs to convert feature geometry from non-linear to linear, each geometry returned from an operation with an ArcGIS Server data source must be evaluated. The following code block presents a technique for evaluating ArcObjects polygons and polylines, densifying non-linear geometry to create linear geometry, and converting to Web ADF geometry types.
// Get the geometry (shape) in results returned from a call to a map service's Identify method.
// The _result variable implements IMapServerIdentifyResult.
ESRI.ArcGIS.Geometry.IGeometry igeometry = _result.Shape;
// Convert the ArcObjects geometry to Web ADF geometry and store in this variable
ESRI.ArcGIS.ADF.Web.Geometry.Geometry adf_geometry = null;
// If a type of polycurve (polyline, polygon, etc.) check to see if linear. If not a polycurve,
// simply convert to Web ADF geometry.
if (igeometry is ESRI.ArcGIS.Geometry.IPolycurve)
ESRI.ArcGIS.Geometry.IPolycurve ipolycurve = (ESRI.ArcGIS.Geometry.IPolycurve)igeometry;
ESRI.ArcGIS.Geometry.ISegmentCollection isegmentcollection =
// Check first segment in polycurve.
ESRI.ArcGIS.Geometry.esriGeometryType ags_geometrytype = isegmentcollection.get_Segment(0).GeometryType;
// If non-linear, densify geometry using a resolution defined by the current map scale factor
// If linear, simply proceed without densifying
if (ags_geometrytype == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryBezier3Curve ||
ags_geometrytype == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryCircularArc ||
ags_geometrytype == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryEllipticArc)
double mapscale = m_map.Extent.Width / m_map.TilingScheme.ViewWidth;
if (igeometry is ESRI.ArcGIS.Geometry.IPolyline)
ESRI.ArcGIS.Geometry.IPolyline ipolyline = (ESRI.ArcGIS.Geometry.IPolyline)ipolycurve;
ESRI.ArcGIS.ADF.ArcGISServer.PolylineN polylinen = (ESRI.ArcGIS.ADF.ArcGISServer.PolylineN)
adf_geometry = ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter.ToAdfPolyline(polylinen);
else if (igeometry is ESRI.ArcGIS.Geometry.IPolygon)
ESRI.ArcGIS.Geometry.IPolygon ipolygon = (ESRI.ArcGIS.Geometry.IPolygon)ipolycurve;
ESRI.ArcGIS.ADF.ArcGISServer.PolygonN polygonn = (ESRI.ArcGIS.ADF.ArcGISServer.PolygonN)
adf_geometry = ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter.ToAdfPolygon(polygonn);
Issues to consider:
The code only checks the first segment in a curve to determine if it is linear or non-linear. A polygon or polyline can have a mix of linear and non-linear segments. An option is to check every segment in a curve, but this option increases processing time. The amount of time depends on the number of segments in each curve that is to be evaluated.
When densifying non-linear segments, the current map scale factor (map units per pixel) is used. The densified curves may appear unchanged, but may appear too coarse when zooming in. Use a map scale factor that can densify curves without losing resolution.
To modify the Identify tool, included with the Web Mapping Application template, perform the following steps.