class AbstractGeographicProjection extends AbstractProjection {

    @Override
    public List<Vector3d> convertLinesToModel(List<? extends GeographicPosition> positions, int limit, LineType type,
            Vector3d modelCenter)
    {
        Utilities.checkNull(modelCenter, MODEL_CENTER_PARAMETER_NAME);
        List<Vector3d> positionList = New.list();
        int vertexCount = positions.size();
        Pair<Tessera<GeographicPosition>, ProjectionCursor> tessera = null;
        Vector3d previousModelPosition = null;
        for (int i = 1; i < limit; ++i)
        {
            int lineEndIndex = i % vertexCount;
            GeographicPosition lineEnd = positions.get(lineEndIndex);
            if (tessera == null)
            {
                tessera = convertLineToModel(positions.get(0), lineEnd, type, modelCenter);
            }
            else
            {
                tessera = convertLineToModel(tessera.getSecondObject(), lineEnd, type, modelCenter);
            }
            if (tessera.getFirstObject() != null)
            {
                List<? extends TesseraVertex<GeographicPosition>> modelVertices = tessera.getFirstObject().getTesseraVertices();
                int modelVertexCount = modelVertices.size();
                if (modelVertexCount > 0)
                {
                    if (i == 1)
                    {
                        Vector3d modelPos = ((GeographicTesseraVertex)modelVertices.get(0)).getModelCoordinates();
                        if (previousModelPosition == null || !modelPos.equals(previousModelPosition))
                        {
                            positionList.add(modelPos);
                            previousModelPosition = modelPos;
                        }
                    }
                    for (int j = 1; j < modelVertexCount; j++)
                    {
                        Vector3d modelPos = ((GeographicTesseraVertex)modelVertices.get(j)).getModelCoordinates();
                        if (previousModelPosition == null || !modelPos.equals(previousModelPosition))
                        {
                            positionList.add(modelPos);
                            previousModelPosition = modelPos;
                        }
                    }
                }
            }
        }

        return positionList;
    }

}