docs: static protected Geometry simplifyAsFeature(/* const */Geometry geometry, /* const */
  	SpatialReference spatialReference, boolean bForce,
  			ProgressTracker progressTracker) {
  		if (geometry.isEmpty())
  			return geometry;
  		Geometry.Type gt = geometry.getType();
  		if (gt == Geometry.Type.Point)
  			return geometry;
  
  		double tolerance = InternalUtils.calculateToleranceFromGeometry(
  				spatialReference, geometry, false);
  		if (gt == Geometry.Type.Envelope) {
  			Envelope env = (Envelope) geometry;
  			Envelope2D env2D = new Envelope2D();
  			env.queryEnvelope2D(env2D);
  			if (env2D.isDegenerate(tolerance)) {
  				return (Geometry) (env.createInstance()); // return empty
  															// geometry
  			}
  			return geometry;
  		} else if (Geometry.isSegment(gt.value())) {
  			Segment seg = (Segment) geometry;
  			Polyline polyline = new Polyline(seg.getDescription());
  			polyline.addSegment(seg, true);
  			return simplifyAsFeature(polyline, spatialReference, bForce,
  					progressTracker);
  		}
  
  		double geomTolerance = 0;
  		int isSimple = ((MultiVertexGeometryImpl) geometry._getImpl())
  				.getIsSimple(tolerance);
  		int knownSimpleResult = bForce ? GeometryXSimple.Unknown : isSimple;
  
  		// TODO: need to distinguish KnownSimple between SimpleAsFeature and
  		// SimplePlanar.
  		// From the first sight it seems the SimplePlanar implies
  		// SimpleAsFeature.
  		if (knownSimpleResult == GeometryXSimple.Strong) {
  	        if (gt == Geometry.Type.Polygon && ((Polygon)geometry).getFillRule() != Polygon.FillRule.enumFillRuleOddEven)
  	        {
  	          Geometry res = geometry.copy();
  	          ((Polygon)res).setFillRule(Polygon.FillRule.enumFillRuleOddEven);//standardize on odd_even fill rule
  	          return res;
  	        }			
  	        
  			return geometry;
  		}
  
  		OperatorSimplifyLocalHelper helper = new OperatorSimplifyLocalHelper(
  				geometry, spatialReference, knownSimpleResult, progressTracker,
  				false);
  
  		Geometry result;
  
  		if (gt == Geometry.Type.MultiPoint) {
  			result = (Geometry) (helper.multiPointSimplifyAsFeature_());
  		} else if (gt == Geometry.Type.Polyline) {
  			result = (Geometry) (helper.polylineSimplifyAsFeature_());
  		} else if (gt == Geometry.Type.Polygon) {
  			result = (Geometry) (helper.polygonSimplifyAsFeature_());
  		} else {
  			throw GeometryException.GeometryInternalError(); // what else?
  		}
  
  		return result;
  	}