if (!doShapes && size > 1) { setNeedToRegenerate(false); initLabelingDuringGenerate(); setLabelLocation(xpoints[0], ypoints[0]); return true;
if (!doShapes) { if (size > 1) { setNeedToRegenerate(false); initLabelingDuringGenerate(); setLabelLocation(xpoints[0], ypoints[0]); return true; } else { return false; }
    public boolean generate(Projection proj) {        int i, j, npts;        setShape(null);        if (proj == null) {            Debug.message("omgraphic", "OMPoly: null projection in generate!");            return false;        }        // answer the question now, saving calcuation for future        // calculations. The set method forces the calculation for        // the query.        setNeedToRegenerate(true);        isGeometryClosed();        switch (renderType) {        case RENDERTYPE_XY:            if (xs == null) {                Debug.message("omgraphic",                        "OMPoly x/y rendertype null coordinates");                return false;            }            // Need to keep these around for the LabeledOMPoly            xpoints = new int[1][0];            xpoints[0] = xs;            ypoints = new int[1][0];            ypoints[0] = ys;            break;        case RENDERTYPE_OFFSET:            if (xs == null) {                Debug.message("omgraphic",                        "OMPoly offset rendertype null coordinates");                return false;            }            npts = xs.length;            int[] _x = new int[npts];            int[] _y = new int[npts];            // forward project the radian point            Point origin = proj.forward(lat, lon, new Point(0, 0), true);//radians            if (coordMode == COORDMODE_ORIGIN) {                for (i = 0; i < npts; i++) {                    _x[i] = xs[i] + origin.x;                    _y[i] = ys[i] + origin.y;                }            } else { // CModePrevious offset deltas                _x[0] = xs[0] + origin.x;                _y[0] = ys[0] + origin.y;                for (i = 1; i < npts; i++) {                    _x[i] = xs[i] + _x[i - 1];                    _y[i] = ys[i] + _y[i - 1];                }            }            // Need to keep these around for the LabeledOMPoly            xpoints = new int[1][0];            xpoints[0] = _x;            ypoints = new int[1][0];            ypoints[0] = _y;            break;        case RENDERTYPE_LATLON:            // polygon/polyline project the polygon/polyline.            // Vertices should already be in radians.            ArrayList vector = proj.forwardPoly(rawllpts,                    lineType,                    nsegs,                    isPolygon);            int size = vector.size();            xpoints = new int[(int) (size / 2)][0];            ypoints = new int[xpoints.length][0];            for (i = 0, j = 0; i < size; i += 2, j++) {                xpoints[j] = (int[]) vector.get(i);                ypoints[j] = (int[]) vector.get(i + 1);            }            if (!doShapes && size > 1) {                setNeedToRegenerate(false);                initLabelingDuringGenerate();                setLabelLocation(xpoints[0], ypoints[0]);                return true;            }            break;        case RENDERTYPE_UNKNOWN:            Debug.error("OMPoly.generate: invalid RenderType");            return false;        }        setNeedToRegenerate(false);        createShape();        return true;    }